aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4
diff options
context:
space:
mode:
authorLuo Jiaxing <luojiaxing@huawei.com>2020-09-12 16:08:15 +0800
committerDavid S. Miller <davem@davemloft.net>2020-09-12 18:21:56 -0700
commite5e252ba21d243689a8e8bf2af5bf5579dabfea7 (patch)
tree684ca65742253f31a3b8ca188a09f9f5e6e33053 /drivers/net/ethernet/mellanox/mlx4
parentnet: phy: mchp: Add support for LAN8814 QUAD PHY (diff)
downloadlinux-dev-e5e252ba21d243689a8e8bf2af5bf5579dabfea7.tar.xz
linux-dev-e5e252ba21d243689a8e8bf2af5bf5579dabfea7.zip
net: ethernet: mlx4: Avoid assigning a value to ring_cons but not used it anymore in mlx4_en_xmit()
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_tx.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
index 9dff7b086c9f..d55434449c0c 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++;