From: Luo Jiaxing <luojiaxing@huawei.com>
To: <davem@davemloft.net>, <kuba@kernel.org>, <idos@mellanox.com>,
<ogerlitz@mellanox.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linuxarm@huawei.com>
Subject: [PATCH net-next] net: ethernet: mlx4: Avoid assigning a value to ring_cons but not used it anymore in mlx4_en_xmit()
Date: Sat, 12 Sep 2020 16:08:15 +0800 [thread overview]
Message-ID: <1599898095-10712-1-git-send-email-luojiaxing@huawei.com> (raw)
We found a set but not used variable 'ring_cons' in mlx4_en_xmit(), it will
cause a warning when build the kernel. And after checking the commit record
of this function, we found that it was introduced by a previous patch.
So, We delete this redundant assignment code.
Fixes: 488a9b48e398 ("net/mlx4_en: Wake TX queues only when there's enough room")
Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
---
drivers/net/ethernet/mellanox/mlx4/en_tx.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
index 9dff7b0..d554344 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
@@ -1075,7 +1075,6 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
*/
smp_rmb();
- ring_cons = READ_ONCE(ring->cons);
if (unlikely(!mlx4_en_is_tx_ring_full(ring))) {
netif_tx_wake_queue(ring->tx_queue);
ring->wake_queue++;
--
2.7.4
next reply other threads:[~2020-09-12 8:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-12 8:08 Luo Jiaxing [this message]
2020-09-13 1:22 ` David Miller
2020-09-13 10:12 ` Tariq Toukan
2020-09-13 21:33 ` David Miller
2020-09-14 20:02 ` Jakub Kicinski
2020-09-15 12:06 ` Tariq Toukan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1599898095-10712-1-git-send-email-luojiaxing@huawei.com \
--to=luojiaxing@huawei.com \
--cc=davem@davemloft.net \
--cc=idos@mellanox.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®