All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: alx: remove redundant variable old_duplex
@ 2018-07-04  7:15 ` Colin King
  0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2018-07-04  7:15 UTC (permalink / raw)
  To: Jay Cliburn, Chris Snook, David S . Miller, Sabrina Dubroca, netdev
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

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 <colin.king@canonical.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] net: alx: remove redundant variable old_duplex
@ 2018-07-04  7:15 ` Colin King
  0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2018-07-04  7:15 UTC (permalink / raw)
  To: Jay Cliburn, Chris Snook, David S . Miller, Sabrina Dubroca, netdev
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

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 <colin.king@canonical.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: alx: remove redundant variable old_duplex
  2018-07-04  7:15 ` Colin King
@ 2018-07-04 13:40   ` David Miller
  -1 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-07-04 13:40 UTC (permalink / raw)
  To: colin.king
  Cc: jcliburn, chris.snook, sd, netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Wed,  4 Jul 2018 08:15:30 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> 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 <colin.king@canonical.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: alx: remove redundant variable old_duplex
@ 2018-07-04 13:40   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-07-04 13:40 UTC (permalink / raw)
  To: colin.king
  Cc: jcliburn, chris.snook, sd, netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Wed,  4 Jul 2018 08:15:30 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> 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 <colin.king@canonical.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-04 13:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-04  7:15 [PATCH] net: alx: remove redundant variable old_duplex Colin King
2018-07-04  7:15 ` Colin King
2018-07-04 13:40 ` David Miller
2018-07-04 13:40   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.