Skip to content

Commit

Permalink
mt76: Remove set but not used variable 'idx'
Browse files Browse the repository at this point in the history
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/wireless/mediatek/mt76/dma.c: In function mt76_dma_rx_fill:
drivers/net/wireless/mediatek/mt76/dma.c:377:6: warning: variable idx set but not used [-Wunused-but-set-variable]

It is not used since commit 17f1de56df05 ("mt76:
add common code shared between multiple chipsets")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
zhengbin13 authored and nbd168 committed Nov 20, 2019
1 parent 3cbaf81 commit ea19cd7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dma.c
Expand Up @@ -365,7 +365,6 @@ mt76_dma_rx_fill(struct mt76_dev *dev, struct mt76_queue *q)
int frames = 0;
int len = SKB_WITH_OVERHEAD(q->buf_size);
int offset = q->buf_offset;
int idx;

spin_lock_bh(&q->lock);

Expand All @@ -384,7 +383,7 @@ mt76_dma_rx_fill(struct mt76_dev *dev, struct mt76_queue *q)

qbuf.addr = addr + offset;
qbuf.len = len - offset;
idx = mt76_dma_add_buf(dev, q, &qbuf, 1, 0, buf, NULL);
mt76_dma_add_buf(dev, q, &qbuf, 1, 0, buf, NULL);
frames++;
}

Expand Down

0 comments on commit ea19cd7

Please sign in to comment.