From: Nathan Chancellor <natechancellor@gmail.com>
To: kernel test robot <lkp@intel.com>
Cc: Sven Van Asbroeck <thesven73@gmail.com>,
kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>
Subject: Re: sound/soc/codecs/zl38060.c:614:34: warning: unused variable 'zl38_dt_ids'
Date: Thu, 9 Jul 2020 19:41:00 -0700 [thread overview]
Message-ID: <20200710024100.GA2055744@ubuntu-n2-xlarge-x86> (raw)
In-Reply-To: <202007100026.oufYkhwZ%lkp@intel.com>
On Fri, Jul 10, 2020 at 12:47:31AM +0800, kernel test robot wrote:
> Hi Sven,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 0bddd227f3dc55975e2b8dfa7fc6f959b062a2c7
> commit: 52e8a94baf9026276fcdc9ff21a50dc2ca0bc94b ASoC: Add initial ZL38060 driver
> date: 3 months ago
> config: x86_64-randconfig-r004-20200709 (attached as .config)
> compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # install x86_64 cross compiling tool for clang build
> # apt-get install binutils-x86-64-linux-gnu
> git checkout 52e8a94baf9026276fcdc9ff21a50dc2ca0bc94b
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> >> sound/soc/codecs/zl38060.c:614:34: warning: unused variable 'zl38_dt_ids' [-Wunused-const-variable]
> static const struct of_device_id zl38_dt_ids[] = {
> ^
> 1 warning generated.
>
> vim +/zl38_dt_ids +614 sound/soc/codecs/zl38060.c
>
> 613
> > 614 static const struct of_device_id zl38_dt_ids[] = {
> 615 { .compatible = "mscc,zl38060", },
> 616 { /* sentinel */ }
> 617 };
> 618 MODULE_DEVICE_TABLE(of, zl38_dt_ids);
> 619
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>
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?
Cheers,
Nathan
next prev parent reply other threads:[~2020-07-10 2:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-09 16:47 kernel test robot
2020-07-10 2:41 ` Nathan Chancellor [this message]
2020-07-10 12:24 ` Mark Brown
2020-07-11 3:30 ` Nathan Chancellor
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=20200710024100.GA2055744@ubuntu-n2-xlarge-x86 \
--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
all inboxes | Powered by JetHome®