From: Simon Horman <horms@kernel.org>
To: Helge Deller <deller@gmx.de>
Cc: deller@kernel.org, netdev@vger.kernel.org,
linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: tulip: avoid unused variable warning
Date: Thu, 13 Mar 2025 11:50:43 +0100 [thread overview]
Message-ID: <20250313105043.GX4159220@kernel.org> (raw)
In-Reply-To: <d863db0a-1740-45d5-b8de-746fa9d44fcb@gmx.de>
On Wed, Mar 12, 2025 at 03:08:35PM +0100, Helge Deller wrote:
> On 3/12/25 14:14, Simon Horman wrote:
> > On Sun, Mar 09, 2025 at 10:42:38PM +0100, deller@kernel.org wrote:
> > > From: Helge Deller <deller@gmx.de>
> > >
> > > When compiling with W=1 and CONFIG_TULIP_MWI=n one gets this warning:
> > > drivers/net/ethernet/dec/tulip/tulip_core.c: In function ‘tulip_init_one’:
> > > drivers/net/ethernet/dec/tulip/tulip_core.c:1309:22: warning: variable ‘force_csr0’ set but not used
> > >
> > > Avoid it by annotating the variable __maybe_unused, which seems to be
> > > the easiest solution.
> > >
> > > Signed-off-by: Helge Deller <deller@gmx.de>
> >
> > Hi Helge,
> >
> > A few thoughts on this:
>
> Hi Simon,
>
> Thanks for following up on this!
>
> > Firstly, thanks for your patch, which I agree addresses the problem you
> > have described.
> >
> > However, AFAIK, this is a rather old driver and I'm not sure that
> > addressing somewhat cosmetic problems are worth the churn they cause:
> > maybe it's best to leave it be.
>
> Well, the only reason why I sent this patch is, because some people
> are interested to get a Linux kernel build without any warnings when "W=1"
> option is enabled.
> This code in the tulip driver is one of the last 10 places in the kernel where
> I see a warning at all, so I think it's worth fixing it, although it's just
> cosmetic.
>
>
> > But if we do want to fix this problem, I do wonder if the following
> > solution, which leverages IS_ENABLED, is somehow nicer as
> > it slightly reduces the amount of conditionally compiled code,
> > thus increasing compile test coverage.
>
> Full Ack from my side!
> I wanted to keep my patch small, but your proposed patch is the better one.
>
> I did not compile-test it, but if it builds you may add my:
> Acked-by: Helge Deller <deller@gmx.de>
Thanks, I posted v2 here:
https://lore.kernel.org/netdev/20250313-tulip-w1-v2-1-2ac0d3d909f9@kernel.org/T/#u
prev parent reply other threads:[~2025-03-13 10:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-09 21:42 [PATCH] net: tulip: avoid unused variable warning deller
2025-03-12 13:14 ` Simon Horman
2025-03-12 14:08 ` Helge Deller
2025-03-13 10:50 ` Simon Horman [this message]
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=20250313105043.GX4159220@kernel.org \
--to=horms@kernel.org \
--cc=deller@gmx.de \
--cc=deller@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.