* [PATCH net-next] net: thunderx: remove set but not used variable 'tail'
@ 2020-03-23 6:51 Zheng Zengkai
2020-03-24 4:54 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Zheng Zengkai @ 2020-03-23 6:51 UTC (permalink / raw)
To: sgoutham, rrichter, davem, ast
Cc: linux-arm-kernel, netdev, linux-kernel, bpf, zhengzengkai
From: Zheng zengkai <zhengzengkai@huawei.com>
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/ethernet/cavium/thunder/nicvf_queues.c: In function nicvf_sq_free_used_descs:
drivers/net/ethernet/cavium/thunder/nicvf_queues.c:1182:12: warning:
variable tail set but not used [-Wunused-but-set-variable]
It's not used since commit 4863dea3fab01("net: Adding support for Cavium ThunderX network controller"),
so remove it.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng zengkai <zhengzengkai@huawei.com>
---
drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
index 4ab57d33a87e..069e7413f1ef 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
@@ -1179,13 +1179,12 @@ void nicvf_sq_disable(struct nicvf *nic, int qidx)
void nicvf_sq_free_used_descs(struct net_device *netdev, struct snd_queue *sq,
int qidx)
{
- u64 head, tail;
+ u64 head;
struct sk_buff *skb;
struct nicvf *nic = netdev_priv(netdev);
struct sq_hdr_subdesc *hdr;
head = nicvf_queue_reg_read(nic, NIC_QSET_SQ_0_7_HEAD, qidx) >> 4;
- tail = nicvf_queue_reg_read(nic, NIC_QSET_SQ_0_7_TAIL, qidx) >> 4;
while (sq->head != head) {
hdr = (struct sq_hdr_subdesc *)GET_SQ_DESC(sq, sq->head);
if (hdr->subdesc_type != SQ_DESC_TYPE_HEADER) {
--
2.18.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: thunderx: remove set but not used variable 'tail'
2020-03-23 6:51 [PATCH net-next] net: thunderx: remove set but not used variable 'tail' Zheng Zengkai
@ 2020-03-24 4:54 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-03-24 4:54 UTC (permalink / raw)
To: zhengzengkai
Cc: sgoutham, rrichter, ast, linux-arm-kernel, netdev, linux-kernel, bpf
From: Zheng Zengkai <zhengzengkai@huawei.com>
Date: Mon, 23 Mar 2020 14:51:16 +0800
> From: Zheng zengkai <zhengzengkai@huawei.com>
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/ethernet/cavium/thunder/nicvf_queues.c: In function nicvf_sq_free_used_descs:
> drivers/net/ethernet/cavium/thunder/nicvf_queues.c:1182:12: warning:
> variable tail set but not used [-Wunused-but-set-variable]
>
> It's not used since commit 4863dea3fab01("net: Adding support for Cavium ThunderX network controller"),
> so remove it.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zheng zengkai <zhengzengkai@huawei.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-24 4:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-23 6:51 [PATCH net-next] net: thunderx: remove set but not used variable 'tail' Zheng Zengkai
2020-03-24 4:54 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).