mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: davem@davemloft.net, kuba@kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Lee Jones <lee.jones@linaro.org>,
	Dustin McIntire <dustin@sensoria.com>,
	netdev@vger.kernel.org
Subject: [PATCH 02/12] net: ethernet: smsc: smc911x: Mark 'status' as __maybe_unused
Date: Wed,  4 Nov 2020 09:06:00 +0000	[thread overview]
Message-ID: <20201104090610.1446616-3-lee.jones@linaro.org> (raw)
In-Reply-To: <20201104090610.1446616-1-lee.jones@linaro.org>

'status' is used to interact with a hardware register.  It might not
be safe to remove it entirely.  Mark it as __maybe_unused instead.

Fixes the following W=1 kernel build warning(s):

 drivers/net/ethernet/smsc/smc911x.c: In function ‘smc911x_phy_configure’:
 drivers/net/ethernet/smsc/smc911x.c:882:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
 drivers/net/ethernet/smsc/smc911x.c: In function ‘smc911x_phy_interrupt’:
 drivers/net/ethernet/smsc/smc911x.c:976:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
 drivers/net/ethernet/smsc/smc911x.c: In function ‘smc911x_timeout’:
 drivers/net/ethernet/smsc/smc911x.c:1251:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Dustin McIntire <dustin@sensoria.com>
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/ethernet/smsc/smc911x.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c
index 01069dfaf75c9..552953c376fe3 100644
--- a/drivers/net/ethernet/smsc/smc911x.c
+++ b/drivers/net/ethernet/smsc/smc911x.c
@@ -879,7 +879,7 @@ static void smc911x_phy_configure(struct work_struct *work)
 	int phyaddr = lp->mii.phy_id;
 	int my_phy_caps; /* My PHY capabilities */
 	int my_ad_caps; /* My Advertised capabilities */
-	int status;
+	int __maybe_unused status;
 	unsigned long flags;
 
 	DBG(SMC_DEBUG_FUNC, dev, "--> %s()\n", __func__);
@@ -973,7 +973,7 @@ static void smc911x_phy_interrupt(struct net_device *dev)
 {
 	struct smc911x_local *lp = netdev_priv(dev);
 	int phyaddr = lp->mii.phy_id;
-	int status;
+	int __maybe_unused status;
 
 	DBG(SMC_DEBUG_FUNC, dev, "--> %s\n", __func__);
 
@@ -1248,7 +1248,7 @@ static void smc911x_poll_controller(struct net_device *dev)
 static void smc911x_timeout(struct net_device *dev, unsigned int txqueue)
 {
 	struct smc911x_local *lp = netdev_priv(dev);
-	int status, mask;
+	int __maybe_unused status, mask;
 	unsigned long flags;
 
 	DBG(SMC_DEBUG_FUNC, dev, "--> %s\n", __func__);
-- 
2.25.1


  parent reply	other threads:[~2020-11-04  9:06 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04  9:05 [PATCH 00/12] [Set 2] Rid W=1 warnings in Net Lee Jones
2020-11-04  9:05 ` [PATCH 01/12] net: usb: lan78xx: Remove lots of set but unused 'ret' variables Lee Jones
2020-11-04 13:23   ` Andrew Lunn
2020-11-04  9:06 ` Lee Jones [this message]
2020-11-04 13:22   ` [PATCH 02/12] net: ethernet: smsc: smc911x: Mark 'status' as __maybe_unused Andrew Lunn
2020-11-04 14:31     ` Lee Jones
2020-11-04 14:38       ` Lee Jones
2020-11-04 14:47         ` Andrew Lunn
2020-11-04 14:45       ` Andrew Lunn
2020-11-04 14:56         ` Lee Jones
2020-11-04  9:06 ` [PATCH 03/12] net: ethernet: xilinx: xilinx_emaclite: Document 'txqueue' even if it is unused Lee Jones
2020-11-04 13:24   ` Andrew Lunn
2020-11-04  9:06 ` [PATCH 04/12] net: ethernet: smsc: smc91x: Demote non-conformant kernel function header Lee Jones
2020-11-04  9:06 ` [PATCH 05/12] net: xen-netback: xenbus: Demote nonconformant kernel-doc headers Lee Jones
2020-11-04 12:00   ` Wei Liu
2020-11-04 13:27   ` Andrew Lunn
2020-11-04  9:06 ` [PATCH 06/12] net: ethernet: ti: am65-cpsw-qos: Demote non-conformant function header Lee Jones
2020-11-04 13:33   ` Andrew Lunn
2020-11-04 14:28     ` Lee Jones
2020-11-04 14:38       ` Andrew Lunn
2020-11-04 15:02         ` Lee Jones
2020-11-04  9:06 ` [PATCH 07/12] net: ethernet: ti: am65-cpts: Document am65_cpts_rx_enable()'s 'en' parameter Lee Jones
2020-11-04 11:37   ` Grygorii Strashko
2020-11-04  9:06 ` [PATCH 08/12] net: xen-netfront: Demote non-kernel-doc headers to standard comment blocks Lee Jones
2020-11-04  9:31   ` Jürgen Groß
2020-11-04 13:36   ` Andrew Lunn
2020-11-04  9:06 ` [PATCH 09/12] net: ethernet: ibm: ibmvnic: Fix some kernel-doc misdemeanours Lee Jones
2020-11-04 13:38   ` Andrew Lunn
2020-11-04 17:54     ` drt
2020-11-04  9:06 ` [PATCH 10/12] net: ethernet: toshiba: ps3_gelic_net: " Lee Jones
2020-11-04 13:41   ` Andrew Lunn
2020-11-04  9:06 ` [PATCH 11/12] net: ethernet: toshiba: spider_net: Document a whole bunch of function parameters Lee Jones
2020-11-04 13:43   ` Andrew Lunn
2020-11-04  9:06 ` [PATCH 12/12] net: ethernet: ibm: ibmvnic: Fix some kernel-doc issues Lee Jones
2020-11-04 17:59   ` drt

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=20201104090610.1446616-3-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=davem@davemloft.net \
    --cc=dustin@sensoria.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®