From: Nathan Chancellor <natechancellor@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: kernel test robot <lkp@intel.com>,
Sven Van Asbroeck <thesven73@gmail.com>,
kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
linux-kernel@vger.kernel.org
Subject: Re: sound/soc/codecs/zl38060.c:614:34: warning: unused variable 'zl38_dt_ids'
Date: Fri, 10 Jul 2020 20:30:36 -0700 [thread overview]
Message-ID: <20200711033036.GA4486@Ryzen-9-3900X.localdomain> (raw)
In-Reply-To: <20200710122459.GE5653@sirena.org.uk>
On Fri, Jul 10, 2020 at 01:24:59PM +0100, Mark Brown wrote:
> On Thu, Jul 09, 2020 at 07:41:00PM -0700, Nathan Chancellor wrote:
>
> > When CONFIG_SND_SOC_ZL38060 is y, MODULE_DEVICE_TABLE expands to nothing
> > so zl38_dt_ids will be unused. This is a pretty common construct in the
> > kernel and the only way I can think of to resolve this through the code
> > is by adding __used annotations to all of these variables, which I think
> > is overkill for this.
>
> > Personally, I think this warning should be downgraded to W=2, thoughts?
>
> We've had that warning available for ever, we shouldn't need to disable
> it now. I had thought there was supposed to be magic which caused
> of_match_ptr() to make things look referenced when !OF but don't seem to
> actually see any sign of it. The other thing is to just have ifdefs
> around the table.
While it has been available, it's been hidden behind W=1, which is now
default on for 0day.
Sure, you could hide it behind an ifdef for either CONFIG_OF or MODULE
(since you could build this as a module with CONFIG_OF disabled).
I just figured this would be something frowned upon but if that is how
you would prefer it to be fixed, then I have no objections to it.
Cheers,
Nathan
next prev parent reply other threads:[~2020-07-11 3:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-09 16:47 sound/soc/codecs/zl38060.c:614:34: warning: unused variable 'zl38_dt_ids' kernel test robot
2020-07-10 2:41 ` Nathan Chancellor
2020-07-10 12:24 ` Mark Brown
2020-07-11 3:30 ` Nathan Chancellor [this message]
2020-07-11 15:08 ` Sven Van Asbroeck
-- strict thread matches above, loose matches on Subject: below --
2021-05-06 5:42 kernel test robot
2020-10-12 19:17 kernel test robot
2020-09-19 17:56 kernel test robot
2020-07-06 2:49 kernel test robot
2020-06-17 8:43 kernel test robot
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=20200711033036.GA4486@Ryzen-9-3900X.localdomain \
--to=natechancellor@gmail.com \
--cc=broonie@kernel.org \
--cc=clang-built-linux@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=thesven73@gmail.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).