linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: phy: marvell: remove set but not used variable 'pause'
@ 2018-11-12  1:47 YueHaibing
  2018-11-12  2:17 ` Andrew Lunn
  2018-11-12  2:20 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2018-11-12  1:47 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, David S. Miller
  Cc: YueHaibing, netdev, linux-kernel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/phy/marvell.c: In function 'm88e1510_config_init':
drivers/net/phy/marvell.c:850:7: warning:
 variable 'pause' set but not used [-Wunused-but-set-variable]

It not used any more after commit 3c1bcc8614db ("net: ethernet: Convert phydev
advertize and supported from u32 to link mode")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/phy/marvell.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 36a0db8..6a98819 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -847,7 +847,6 @@ static int m88e1510_config_init(struct phy_device *phydev)
 
 	/* SGMII-to-Copper mode initialization */
 	if (phydev->interface == PHY_INTERFACE_MODE_SGMII) {
-		u32 pause;
 
 		/* Select page 18 */
 		err = marvell_set_page(phydev, 18);
@@ -878,7 +877,6 @@ static int m88e1510_config_init(struct phy_device *phydev)
 		 * This means we can never be truely sure what was advertised,
 		 * so disable Pause support.
 		 */
-		pause = SUPPORTED_Pause | SUPPORTED_Asym_Pause;
 		linkmode_clear_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
 				   phydev->supported);
 		linkmode_clear_bit(ETHTOOL_LINK_MODE_Pause_BIT,




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

* Re: [PATCH net-next] net: phy: marvell: remove set but not used variable 'pause'
  2018-11-12  1:47 [PATCH net-next] net: phy: marvell: remove set but not used variable 'pause' YueHaibing
@ 2018-11-12  2:17 ` Andrew Lunn
  2018-11-12  2:20 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2018-11-12  2:17 UTC (permalink / raw)
  To: YueHaibing
  Cc: Florian Fainelli, David S. Miller, netdev, linux-kernel, kernel-janitors

On Mon, Nov 12, 2018 at 01:47:30AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/phy/marvell.c: In function 'm88e1510_config_init':
> drivers/net/phy/marvell.c:850:7: warning:
>  variable 'pause' set but not used [-Wunused-but-set-variable]
> 
> It not used any more after commit 3c1bcc8614db ("net: ethernet: Convert phydev
> advertize and supported from u32 to link mode")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH net-next] net: phy: marvell: remove set but not used variable 'pause'
  2018-11-12  1:47 [PATCH net-next] net: phy: marvell: remove set but not used variable 'pause' YueHaibing
  2018-11-12  2:17 ` Andrew Lunn
@ 2018-11-12  2:20 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-11-12  2:20 UTC (permalink / raw)
  To: yuehaibing; +Cc: andrew, f.fainelli, netdev, linux-kernel, kernel-janitors

From: YueHaibing <yuehaibing@huawei.com>
Date: Mon, 12 Nov 2018 01:47:30 +0000

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/phy/marvell.c: In function 'm88e1510_config_init':
> drivers/net/phy/marvell.c:850:7: warning:
>  variable 'pause' set but not used [-Wunused-but-set-variable]
> 
> It not used any more after commit 3c1bcc8614db ("net: ethernet: Convert phydev
> advertize and supported from u32 to link mode")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied.

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

end of thread, other threads:[~2018-11-12  2:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-12  1:47 [PATCH net-next] net: phy: marvell: remove set but not used variable 'pause' YueHaibing
2018-11-12  2:17 ` Andrew Lunn
2018-11-12  2:20 ` 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).