* drivers/comedi/drivers/tests/../ni_stc.h:1140:35: warning: 'range_ni_E_ao_ext' defined but not used
@ 2023-11-06 8:49 kernel test robot
2023-11-06 9:00 ` Greg Kroah-Hartman
0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2023-11-06 8:49 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: oe-kbuild-all, linux-kernel
Hi Greg,
kernel test robot noticed the following build warnings:
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1c41041124bd14dd6610da256a3da4e5b74ce6b1
commit: 8ffdff6a8cfbdc174a3a390b6f825a277b5bb895 staging: comedi: move out of staging directory
date: 2 years, 7 months ago
config: i386-randconfig-013-20231101 (https://download.01.org/0day-ci/archive/20231106/202311060001.aEuf1q9y-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231106/202311060001.aEuf1q9y-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <yujie.liu@intel.com>
| Closes: https://lore.kernel.org/r/202311060001.aEuf1q9y-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/comedi/drivers/tests/ni_routes_test.c:23:
>> drivers/comedi/drivers/tests/../ni_stc.h:1140:35: warning: 'range_ni_E_ao_ext' defined but not used [-Wunused-const-variable=]
1140 | static const struct comedi_lrange range_ni_E_ao_ext;
| ^~~~~~~~~~~~~~~~~
vim +/range_ni_E_ao_ext +1140 drivers/comedi/drivers/tests/../ni_stc.h
a8b774308dd803 drivers/staging/comedi/drivers/ni_stc.h David Schleef 2009-02-12 1139
35bb871663ddb0 drivers/staging/comedi/drivers/ni_stc.h H Hartley Sweeten 2015-05-01 @1140 static const struct comedi_lrange range_ni_E_ao_ext;
35bb871663ddb0 drivers/staging/comedi/drivers/ni_stc.h H Hartley Sweeten 2015-05-01 1141
:::::: The code at line 1140 was first introduced by commit
:::::: 35bb871663ddb06df9d601b32deac5f4f06b65b4 staging: comedi: ni_stc.h: final cleanup
:::::: TO: H Hartley Sweeten <hsweeten@visionengravers.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: drivers/comedi/drivers/tests/../ni_stc.h:1140:35: warning: 'range_ni_E_ao_ext' defined but not used
2023-11-06 8:49 drivers/comedi/drivers/tests/../ni_stc.h:1140:35: warning: 'range_ni_E_ao_ext' defined but not used kernel test robot
@ 2023-11-06 9:00 ` Greg Kroah-Hartman
2023-11-06 9:31 ` Yujie Liu
0 siblings, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-06 9:00 UTC (permalink / raw)
To: kernel test robot; +Cc: oe-kbuild-all, linux-kernel
On Mon, Nov 06, 2023 at 04:49:17PM +0800, kernel test robot wrote:
> Hi Greg,
>
> kernel test robot noticed the following build warnings:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 1c41041124bd14dd6610da256a3da4e5b74ce6b1
> commit: 8ffdff6a8cfbdc174a3a390b6f825a277b5bb895 staging: comedi: move out of staging directory
> date: 2 years, 7 months ago
Have you tested a newer kernel? Testing a 2 1/2 year old commit feels
odd to me, was this intentional?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: drivers/comedi/drivers/tests/../ni_stc.h:1140:35: warning: 'range_ni_E_ao_ext' defined but not used
2023-11-06 9:00 ` Greg Kroah-Hartman
@ 2023-11-06 9:31 ` Yujie Liu
2023-11-06 9:48 ` Greg Kroah-Hartman
0 siblings, 1 reply; 6+ messages in thread
From: Yujie Liu @ 2023-11-06 9:31 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: oe-kbuild-all, linux-kernel
Hi Greg,
On Mon, Nov 06, 2023 at 10:00:14AM +0100, Greg Kroah-Hartman wrote:
> On Mon, Nov 06, 2023 at 04:49:17PM +0800, kernel test robot wrote:
> > Hi Greg,
> >
> > kernel test robot noticed the following build warnings:
> >
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: 1c41041124bd14dd6610da256a3da4e5b74ce6b1
> > commit: 8ffdff6a8cfbdc174a3a390b6f825a277b5bb895 staging: comedi: move out of staging directory
> > date: 2 years, 7 months ago
>
> Have you tested a newer kernel? Testing a 2 1/2 year old commit feels
> odd to me, was this intentional?
We did test new kernels with W=1, and the issue was captured by the
bot, then bisected to this 2 years 7 months ago commit that was likely
to introduce this issue initially. We have no intention of directly
testing a very old commit, and we're sorry that the date info may
cause some misunderstanding.
This can be reproduced by allyesconfig build on v6.6 with W=1:
$ git checkout v6.6
HEAD is now at ffc253263a13 Linux 6.6
$ make ARCH=x86_64 allyesconfig
$ make W=1 ARCH=x86_64 drivers/comedi/drivers/tests/ni_routes_test.o
...
CC drivers/comedi/drivers/tests/ni_routes_test.o
In file included from drivers/comedi/drivers/tests/ni_routes_test.c:22:
drivers/comedi/drivers/tests/../ni_stc.h:1140:35: error: ‘range_ni_E_ao_ext’ defined but not used [-Werror=unused-const-variable=]
1140 | static const struct comedi_lrange range_ni_E_ao_ext;
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[6]: *** [scripts/Makefile.build:243: drivers/comedi/drivers/tests/ni_routes_test.o] Error 1
make[5]: *** [scripts/Makefile.build:480: drivers/comedi/drivers/tests] Error 2
make[4]: *** [scripts/Makefile.build:480: drivers/comedi/drivers] Error 2
make[3]: *** [scripts/Makefile.build:480: drivers/comedi] Error 2
make[2]: *** [scripts/Makefile.build:480: drivers] Error 2
Best Regards,
Yujie
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: drivers/comedi/drivers/tests/../ni_stc.h:1140:35: warning: 'range_ni_E_ao_ext' defined but not used
2023-11-06 9:31 ` Yujie Liu
@ 2023-11-06 9:48 ` Greg Kroah-Hartman
2023-11-07 1:27 ` Yujie Liu
0 siblings, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-06 9:48 UTC (permalink / raw)
To: Yujie Liu; +Cc: oe-kbuild-all, linux-kernel
On Mon, Nov 06, 2023 at 05:31:26PM +0800, Yujie Liu wrote:
> Hi Greg,
>
> On Mon, Nov 06, 2023 at 10:00:14AM +0100, Greg Kroah-Hartman wrote:
> > On Mon, Nov 06, 2023 at 04:49:17PM +0800, kernel test robot wrote:
> > > Hi Greg,
> > >
> > > kernel test robot noticed the following build warnings:
> > >
> > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > > head: 1c41041124bd14dd6610da256a3da4e5b74ce6b1
> > > commit: 8ffdff6a8cfbdc174a3a390b6f825a277b5bb895 staging: comedi: move out of staging directory
> > > date: 2 years, 7 months ago
> >
> > Have you tested a newer kernel? Testing a 2 1/2 year old commit feels
> > odd to me, was this intentional?
>
> We did test new kernels with W=1, and the issue was captured by the
> bot, then bisected to this 2 years 7 months ago commit that was likely
> to introduce this issue initially.
This commit is a "move files around" commit, so it obviously was not the
original problem commit here :)
> We have no intention of directly
> testing a very old commit, and we're sorry that the date info may
> cause some misunderstanding.
>
> This can be reproduced by allyesconfig build on v6.6 with W=1:
>
> $ git checkout v6.6
> HEAD is now at ffc253263a13 Linux 6.6
>
> $ make ARCH=x86_64 allyesconfig
>
> $ make W=1 ARCH=x86_64 drivers/comedi/drivers/tests/ni_routes_test.o
> ...
> CC drivers/comedi/drivers/tests/ni_routes_test.o
> In file included from drivers/comedi/drivers/tests/ni_routes_test.c:22:
> drivers/comedi/drivers/tests/../ni_stc.h:1140:35: error: ‘range_ni_E_ao_ext’ defined but not used [-Werror=unused-const-variable=]
> 1140 | static const struct comedi_lrange range_ni_E_ao_ext;
> | ^~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
This is odd in that a static constant is being defined in a .h file, so
anything that happens to include it, like this test, will then need to
use it in order to silence this warning. I don't think that's going to
happen any time soon, so it's good that we don't really care aobut W=1
just yet :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: drivers/comedi/drivers/tests/../ni_stc.h:1140:35: warning: 'range_ni_E_ao_ext' defined but not used
2023-11-06 9:48 ` Greg Kroah-Hartman
@ 2023-11-07 1:27 ` Yujie Liu
0 siblings, 0 replies; 6+ messages in thread
From: Yujie Liu @ 2023-11-07 1:27 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: oe-kbuild-all, linux-kernel
On Mon, Nov 06, 2023 at 10:48:57AM +0100, Greg Kroah-Hartman wrote:
> On Mon, Nov 06, 2023 at 05:31:26PM +0800, Yujie Liu wrote:
> > Hi Greg,
> >
> > On Mon, Nov 06, 2023 at 10:00:14AM +0100, Greg Kroah-Hartman wrote:
> > > On Mon, Nov 06, 2023 at 04:49:17PM +0800, kernel test robot wrote:
> > > > Hi Greg,
> > > >
> > > > kernel test robot noticed the following build warnings:
> > > >
> > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > > > head: 1c41041124bd14dd6610da256a3da4e5b74ce6b1
> > > > commit: 8ffdff6a8cfbdc174a3a390b6f825a277b5bb895 staging: comedi: move out of staging directory
> > > > date: 2 years, 7 months ago
> > >
> > > Have you tested a newer kernel? Testing a 2 1/2 year old commit feels
> > > odd to me, was this intentional?
> >
> > We did test new kernels with W=1, and the issue was captured by the
> > bot, then bisected to this 2 years 7 months ago commit that was likely
> > to introduce this issue initially.
>
> This commit is a "move files around" commit, so it obviously was not the
> original problem commit here :)
>
> > We have no intention of directly
> > testing a very old commit, and we're sorry that the date info may
> > cause some misunderstanding.
> >
> > This can be reproduced by allyesconfig build on v6.6 with W=1:
> >
> > $ git checkout v6.6
> > HEAD is now at ffc253263a13 Linux 6.6
> >
> > $ make ARCH=x86_64 allyesconfig
> >
> > $ make W=1 ARCH=x86_64 drivers/comedi/drivers/tests/ni_routes_test.o
> > ...
> > CC drivers/comedi/drivers/tests/ni_routes_test.o
> > In file included from drivers/comedi/drivers/tests/ni_routes_test.c:22:
> > drivers/comedi/drivers/tests/../ni_stc.h:1140:35: error: ‘range_ni_E_ao_ext’ defined but not used [-Werror=unused-const-variable=]
> > 1140 | static const struct comedi_lrange range_ni_E_ao_ext;
> > | ^~~~~~~~~~~~~~~~~
> > cc1: all warnings being treated as errors
>
> This is odd in that a static constant is being defined in a .h file, so
> anything that happens to include it, like this test, will then need to
> use it in order to silence this warning. I don't think that's going to
> happen any time soon, so it's good that we don't really care aobut W=1
> just yet :)
Thanks a lot for the information. We will learn from this case and be
more careful when handling similar reports on "old commits", thus to
reduce false positives.
Best Regards,
Yujie
^ permalink raw reply [flat|nested] 6+ messages in thread
* drivers/comedi/drivers/tests/../ni_stc.h:1140:35: warning: 'range_ni_E_ao_ext' defined but not used
@ 2024-01-06 10:36 kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2024-01-06 10:36 UTC (permalink / raw)
Cc: oe-kbuild-all, linux-kernel
Hi Greg,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 95c8a35f1c017327eab3b6a2ff5c04255737c856
commit: 8ffdff6a8cfbdc174a3a390b6f825a277b5bb895 staging: comedi: move out of staging directory
date: 2 years, 9 months ago
config: x86_64-randconfig-005-20240105 (https://download.01.org/0day-ci/archive/20240106/202401061842.LfwqRo6V-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240106/202401061842.LfwqRo6V-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401061842.LfwqRo6V-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/comedi/drivers/tests/ni_routes_test.c:23:0:
>> drivers/comedi/drivers/tests/../ni_stc.h:1140:35: warning: 'range_ni_E_ao_ext' defined but not used [-Wunused-const-variable=]
static const struct comedi_lrange range_ni_E_ao_ext;
^~~~~~~~~~~~~~~~~
vim +/range_ni_E_ao_ext +1140 drivers/comedi/drivers/tests/../ni_stc.h
a8b774308dd803 drivers/staging/comedi/drivers/ni_stc.h David Schleef 2009-02-12 1139
35bb871663ddb0 drivers/staging/comedi/drivers/ni_stc.h H Hartley Sweeten 2015-05-01 @1140 static const struct comedi_lrange range_ni_E_ao_ext;
35bb871663ddb0 drivers/staging/comedi/drivers/ni_stc.h H Hartley Sweeten 2015-05-01 1141
:::::: The code at line 1140 was first introduced by commit
:::::: 35bb871663ddb06df9d601b32deac5f4f06b65b4 staging: comedi: ni_stc.h: final cleanup
:::::: TO: H Hartley Sweeten <hsweeten@visionengravers.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-01-06 10:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-06 8:49 drivers/comedi/drivers/tests/../ni_stc.h:1140:35: warning: 'range_ni_E_ao_ext' defined but not used kernel test robot
2023-11-06 9:00 ` Greg Kroah-Hartman
2023-11-06 9:31 ` Yujie Liu
2023-11-06 9:48 ` Greg Kroah-Hartman
2023-11-07 1:27 ` Yujie Liu
-- strict thread matches above, loose matches on Subject: below --
2024-01-06 10:36 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox