Message ID | 20201104090610.1446616-3-lee.jones@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/12] net: usb: lan78xx: Remove lots of set but unused 'ret' variables | expand |
On Wed, Nov 04, 2020 at 09:06:00AM +0000, Lee Jones wrote: > 'status' is used to interact with a hardware register. It might not > be safe to remove it entirely. Mark it as __maybe_unused instead. Hi Lee https://www.mail-archive.com/netdev@vger.kernel.org/msg365875.html I'm working on driver/net/ethernet and net to make it w=1 clean. I suggest you hang out on the netdev mailing list so you don't waste your time reproducing what i am doing. Andrew
On Wed, 04 Nov 2020, Andrew Lunn wrote: > On Wed, Nov 04, 2020 at 09:06:00AM +0000, Lee Jones wrote: > > 'status' is used to interact with a hardware register. It might not > > be safe to remove it entirely. Mark it as __maybe_unused instead. > > Hi Lee > > https://www.mail-archive.com/netdev@vger.kernel.org/msg365875.html > > I'm working on driver/net/ethernet and net to make it w=1 clean. I > suggest you hang out on the netdev mailing list so you don't waste > your time reproducing what i am doing. I believe that ship has sailed. Net should be clean now. It was it pretty good shape considering. Only 2 sets. Wireless alone was more like 4. And SCSI, well ... :D Maybe that was down to some of your previous efforts?
On Wed, 04 Nov 2020, Lee Jones wrote: > On Wed, 04 Nov 2020, Andrew Lunn wrote: > > > On Wed, Nov 04, 2020 at 09:06:00AM +0000, Lee Jones wrote: > > > 'status' is used to interact with a hardware register. It might not > > > be safe to remove it entirely. Mark it as __maybe_unused instead. > > > > Hi Lee > > > > https://www.mail-archive.com/netdev@vger.kernel.org/msg365875.html > > > > I'm working on driver/net/ethernet and net to make it w=1 clean. I > > suggest you hang out on the netdev mailing list so you don't waste > > your time reproducing what i am doing. > > I believe that ship has sailed. Net should be clean now. > > It was it pretty good shape considering. Only 2 sets. > > Wireless alone was more like 4. And SCSI, well ... :D > > Maybe that was down to some of your previous efforts? Our of interest, are you planning on working on any other areas? I'm slowly working my way through the whole kernel. Completed so far: - ASoC - backlight - cpufreq - crypto - dmaengine - gpio - hwmon - iio - input - mfd - misc - mmc - mtd - net - pinctrl - pwm - regulator - remoteproc - scsi - soc - spi - tty - usb - wireless
On Wed, Nov 04, 2020 at 02:31:40PM +0000, Lee Jones wrote: > On Wed, 04 Nov 2020, Andrew Lunn wrote: > > > On Wed, Nov 04, 2020 at 09:06:00AM +0000, Lee Jones wrote: > > > 'status' is used to interact with a hardware register. It might not > > > be safe to remove it entirely. Mark it as __maybe_unused instead. > > > > Hi Lee > > > > https://www.mail-archive.com/netdev@vger.kernel.org/msg365875.html > > > > I'm working on driver/net/ethernet and net to make it w=1 clean. I > > suggest you hang out on the netdev mailing list so you don't waste > > your time reproducing what i am doing. > > I believe that ship has sailed. Net should be clean now. drivers/net is getting better, but is not clean. I have some patches from Arnd which allow W=1 to be enabled by default for subdirectories, and i have to skip a few. Also net, not driver/net has problems, which i'm working on. I hope Arnd will post his patches soon, so we can get them merged and prevent regressions with W=1. > Maybe that was down to some of your previous efforts? And Jakub running a bot which compile tests all new patches with W=1. Andrew
> Our of interest, are you planning on working on any other areas?
Hi Lee.
No, not really. I'm a networking guy, so will look mostly at
drivers/net and the core net code.
Andrew
On Wed, 04 Nov 2020, Andrew Lunn wrote: > On Wed, Nov 04, 2020 at 02:31:40PM +0000, Lee Jones wrote: > > On Wed, 04 Nov 2020, Andrew Lunn wrote: > > > > > On Wed, Nov 04, 2020 at 09:06:00AM +0000, Lee Jones wrote: > > > > 'status' is used to interact with a hardware register. It might not > > > > be safe to remove it entirely. Mark it as __maybe_unused instead. > > > > > > Hi Lee > > > > > > https://www.mail-archive.com/netdev@vger.kernel.org/msg365875.html > > > > > > I'm working on driver/net/ethernet and net to make it w=1 clean. I > > > suggest you hang out on the netdev mailing list so you don't waste > > > your time reproducing what i am doing. > > > > I believe that ship has sailed. Net should be clean now. > > drivers/net is getting better, but is not clean. I have some patches > from Arnd which allow W=1 to be enabled by default for subdirectories, > and i have to skip a few. Also net, not driver/net has problems, which > i'm working on. I hope Arnd will post his patches soon, so we can get > them merged and prevent regressions with W=1. That's odd. I wonder why I'm not seeing any more issues? > > Maybe that was down to some of your previous efforts? > > And Jakub running a bot which compile tests all new patches with W=1. That's great! My aim is for all maintainers to be doing that. > No, not really. I'm a networking guy, so will look mostly at > drivers/net and the core net code. Duly noted. I'll leave 'net' alone then.
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__);
'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(-)