netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emil Goode <emilgoode@gmail.com>
To: Yang Wei <Wei.Yang@windriver.com>,
	David Miller <davem@davemloft.net>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org, Emil Goode <emilgoode@gmail.com>
Subject: [PATCH] stmmac: Remove spin_lock call in stmmac_get_pauseparam()
Date: Mon,  2 Jun 2014 11:30:50 +0200	[thread overview]
Message-ID: <1401701450-1203-1-git-send-email-emilgoode@gmail.com> (raw)

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

             reply	other threads:[~2014-06-02  9:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-02  9:30 Emil Goode [this message]
2014-06-02 17:38 ` [PATCH] stmmac: Remove spin_lock call in stmmac_get_pauseparam() David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1401701450-1203-1-git-send-email-emilgoode@gmail.com \
    --to=emilgoode@gmail.com \
    --cc=Wei.Yang@windriver.com \
    --cc=davem@davemloft.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).