netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] stmmac: Remove spin_lock call in stmmac_get_pauseparam()
@ 2014-06-02  9:30 Emil Goode
  2014-06-02 17:38 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Emil Goode @ 2014-06-02  9:30 UTC (permalink / raw)
  To: Yang Wei, David Miller, Giuseppe Cavallaro
  Cc: netdev, linux-kernel, kernel-janitors, Emil Goode

The following patch removed unnecessary spin_lock/unlock calls
in ethtool_ops callback functions. In the second and final version
of the patch one spin_lock call was left behind.

commit cab6715c3e8029e98b0b5d4056ceda007c0f6380
Author: Yang Wei <Wei.Yang@windriver.com>
Date:   Sun May 25 09:53:44 2014 +0800

    net: driver: stmicro: Remove some useless the lock protection

This introduced the following sparse warning:

drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c:424:1: warning:
	context imbalance in 'stmmac_get_pauseparam' -
	different lock contexts for basic block

Signed-off-by: Emil Goode <emilgoode@gmail.com>
---
Hello,

Some spin_lock/unlock calls where also left behind in
stmmac_ethtool_setsettings(), I'm not sure if it was intentional?

Best regards,

Emil Goode

 drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
index 7892666..c62e67f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
@@ -429,8 +429,6 @@ stmmac_get_pauseparam(struct net_device *netdev,
 	if (priv->pcs)	/* FIXME */
 		return;
 
-	spin_lock(&priv->lock);
-
 	pause->rx_pause = 0;
 	pause->tx_pause = 0;
 	pause->autoneg = priv->phydev->autoneg;
-- 
1.7.10.4

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

* Re: [PATCH] stmmac: Remove spin_lock call in stmmac_get_pauseparam()
  2014-06-02  9:30 [PATCH] stmmac: Remove spin_lock call in stmmac_get_pauseparam() Emil Goode
@ 2014-06-02 17:38 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-06-02 17:38 UTC (permalink / raw)
  To: emilgoode
  Cc: Wei.Yang, peppe.cavallaro, netdev, linux-kernel, kernel-janitors

From: Emil Goode <emilgoode@gmail.com>
Date: Mon,  2 Jun 2014 11:30:50 +0200

> The following patch removed unnecessary spin_lock/unlock calls
> in ethtool_ops callback functions. In the second and final version
> of the patch one spin_lock call was left behind.
> 
> commit cab6715c3e8029e98b0b5d4056ceda007c0f6380
> Author: Yang Wei <Wei.Yang@windriver.com>
> Date:   Sun May 25 09:53:44 2014 +0800
> 
>     net: driver: stmicro: Remove some useless the lock protection
> 
> This introduced the following sparse warning:
> 
> drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c:424:1: warning:
> 	context imbalance in 'stmmac_get_pauseparam' -
> 	different lock contexts for basic block
> 
> Signed-off-by: Emil Goode <emilgoode@gmail.com>

Good catch, applied, thanks Emil.

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

end of thread, other threads:[~2014-06-02 17:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-02  9:30 [PATCH] stmmac: Remove spin_lock call in stmmac_get_pauseparam() Emil Goode
2014-06-02 17:38 ` 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).