[PATCH] net: alx: remove redundant variable old_duplex

Subsystems: atlx ethernet drivers, networking drivers, the rest

STALE2965d

2 messages, 2 authors, 2018-07-04 · open the first message on its own page

[PATCH] net: alx: remove redundant variable old_duplex

From: Colin King <hidden>
Date: 2018-07-04 07:15:38

From: Colin Ian King <redacted>

Variable old_duplex is being assigned but is never used hence it is
redundant and can be removed.

Cleans up clang warning:
warning: variable 'old_duplex' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <redacted>
---
 drivers/net/ethernet/atheros/alx/main.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
index 5e5022fa1d04..6d3221134927 100644
--- a/drivers/net/ethernet/atheros/alx/main.c
+++ b/drivers/net/ethernet/atheros/alx/main.c
@@ -1279,7 +1279,6 @@ static void alx_check_link(struct alx_priv *alx)
 	struct alx_hw *hw = &alx->hw;
 	unsigned long flags;
 	int old_speed;
-	u8 old_duplex;
 	int err;
 
 	/* clear PHY internal interrupt status, otherwise the main
@@ -1288,7 +1287,6 @@ static void alx_check_link(struct alx_priv *alx)
 	alx_clear_phy_intr(hw);
 
 	old_speed = hw->link_speed;
-	old_duplex = hw->duplex;
 	err = alx_read_phy_link(hw);
 	if (err < 0)
 		goto reset;
-- 
2.17.1

Re: [PATCH] net: alx: remove redundant variable old_duplex

From: David Miller <davem@davemloft.net>
Date: 2018-07-04 13:40:31

From: Colin King <redacted>
Date: Wed,  4 Jul 2018 08:15:30 +0100
From: Colin Ian King <redacted>

Variable old_duplex is being assigned but is never used hence it is
redundant and can be removed.

Cleans up clang warning:
warning: variable 'old_duplex' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help