linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 3824/6048] drivers/net/dsa/xrs700x/xrs700x_i2c.c:127:34: warning: unused variable 'xrs700x_i2c_dt_ids'
@ 2021-02-06 18:01 kernel test robot
  2021-02-09 16:33 ` Souptick Joarder
  0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2021-02-06 18:01 UTC (permalink / raw)
  To: George McCollister
  Cc: kbuild-all, clang-built-linux, Linux Memory Management List,
	Jakub Kicinski, Florian Fainelli, Andrew Lunn, Vladimir Oltean

[-- Attachment #1: Type: text/plain, Size: 2183 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   59fa6a163ffabc1bf25c5e0e33899e268a96d3cc
commit: ee00b24f32eb822f55190efd1078fe572e931d5c [3824/6048] net: dsa: add Arrow SpeedChips XRS700x driver
config: x86_64-randconfig-a011-20210207 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ee00b24f32eb822f55190efd1078fe572e931d5c
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout ee00b24f32eb822f55190efd1078fe572e931d5c
        # 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 >>):

>> drivers/net/dsa/xrs700x/xrs700x_i2c.c:127:34: warning: unused variable 'xrs700x_i2c_dt_ids' [-Wunused-const-variable]
   static const struct of_device_id xrs700x_i2c_dt_ids[] = {
                                    ^
   1 warning generated.


vim +/xrs700x_i2c_dt_ids +127 drivers/net/dsa/xrs700x/xrs700x_i2c.c

   126	
 > 127	static const struct of_device_id xrs700x_i2c_dt_ids[] = {
   128		{ .compatible = "arrow,xrs7003e", .data = &xrs7003e_info },
   129		{ .compatible = "arrow,xrs7003f", .data = &xrs7003f_info },
   130		{ .compatible = "arrow,xrs7004e", .data = &xrs7004e_info },
   131		{ .compatible = "arrow,xrs7004f", .data = &xrs7004f_info },
   132		{},
   133	};
   134	MODULE_DEVICE_TABLE(of, xrs700x_i2c_dt_ids);
   135	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30493 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-next:master 3824/6048] drivers/net/dsa/xrs700x/xrs700x_i2c.c:127:34: warning: unused variable 'xrs700x_i2c_dt_ids'
  2021-02-06 18:01 [linux-next:master 3824/6048] drivers/net/dsa/xrs700x/xrs700x_i2c.c:127:34: warning: unused variable 'xrs700x_i2c_dt_ids' kernel test robot
@ 2021-02-09 16:33 ` Souptick Joarder
  2021-02-09 17:18   ` George McCollister
  0 siblings, 1 reply; 6+ messages in thread
From: Souptick Joarder @ 2021-02-09 16:33 UTC (permalink / raw)
  To: kernel test robot
  Cc: George McCollister, kbuild-all, clang-built-linux,
	Linux Memory Management List, Jakub Kicinski, Florian Fainelli,
	Andrew Lunn, Vladimir Oltean

On Sat, Feb 6, 2021 at 11:32 PM kernel test robot <lkp@intel.com> wrote:
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   59fa6a163ffabc1bf25c5e0e33899e268a96d3cc
> commit: ee00b24f32eb822f55190efd1078fe572e931d5c [3824/6048] net: dsa: add Arrow SpeedChips XRS700x driver
> config: x86_64-randconfig-a011-20210207 (attached as .config)
> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
> 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
>         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ee00b24f32eb822f55190efd1078fe572e931d5c
>         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>         git fetch --no-tags linux-next master
>         git checkout ee00b24f32eb822f55190efd1078fe572e931d5c
>         # 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 >>):
>
> >> drivers/net/dsa/xrs700x/xrs700x_i2c.c:127:34: warning: unused variable 'xrs700x_i2c_dt_ids' [-Wunused-const-variable]
>    static const struct of_device_id xrs700x_i2c_dt_ids[] = {
>                                     ^
>    1 warning generated.

I think, this can defined under #ifdef CONFIG_OF.

>
>
> vim +/xrs700x_i2c_dt_ids +127 drivers/net/dsa/xrs700x/xrs700x_i2c.c
>
>    126
>  > 127  static const struct of_device_id xrs700x_i2c_dt_ids[] = {
>    128          { .compatible = "arrow,xrs7003e", .data = &xrs7003e_info },
>    129          { .compatible = "arrow,xrs7003f", .data = &xrs7003f_info },
>    130          { .compatible = "arrow,xrs7004e", .data = &xrs7004e_info },
>    131          { .compatible = "arrow,xrs7004f", .data = &xrs7004f_info },
>    132          {},
>    133  };
>    134  MODULE_DEVICE_TABLE(of, xrs700x_i2c_dt_ids);
>    135
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-next:master 3824/6048] drivers/net/dsa/xrs700x/xrs700x_i2c.c:127:34: warning: unused variable 'xrs700x_i2c_dt_ids'
  2021-02-09 16:33 ` Souptick Joarder
@ 2021-02-09 17:18   ` George McCollister
  2021-02-09 17:23     ` Vladimir Oltean
  0 siblings, 1 reply; 6+ messages in thread
From: George McCollister @ 2021-02-09 17:18 UTC (permalink / raw)
  To: Souptick Joarder
  Cc: kernel test robot, kbuild-all, clang-built-linux,
	Linux Memory Management List, Jakub Kicinski, Florian Fainelli,
	Andrew Lunn, Vladimir Oltean

On Tue, Feb 9, 2021 at 10:33 AM Souptick Joarder <jrdr.linux@gmail.com> wrote:
>
> On Sat, Feb 6, 2021 at 11:32 PM kernel test robot <lkp@intel.com> wrote:
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   59fa6a163ffabc1bf25c5e0e33899e268a96d3cc
> > commit: ee00b24f32eb822f55190efd1078fe572e931d5c [3824/6048] net: dsa: add Arrow SpeedChips XRS700x driver
> > config: x86_64-randconfig-a011-20210207 (attached as .config)
> > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
> > 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
> >         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ee00b24f32eb822f55190efd1078fe572e931d5c
> >         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> >         git fetch --no-tags linux-next master
> >         git checkout ee00b24f32eb822f55190efd1078fe572e931d5c
> >         # 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 >>):
> >
> > >> drivers/net/dsa/xrs700x/xrs700x_i2c.c:127:34: warning: unused variable 'xrs700x_i2c_dt_ids' [-Wunused-const-variable]
> >    static const struct of_device_id xrs700x_i2c_dt_ids[] = {
> >                                     ^
> >    1 warning generated.
>
> I think, this can defined under #ifdef CONFIG_OF.

Was this robot reporting this warning for other DSA drivers? A lot of
them appear to use of_device_id in the same manner (unless I'm missing
something). Do we need to do something DSA wide to deal with this?

>
> >
> >
> > vim +/xrs700x_i2c_dt_ids +127 drivers/net/dsa/xrs700x/xrs700x_i2c.c
> >
> >    126
> >  > 127  static const struct of_device_id xrs700x_i2c_dt_ids[] = {
> >    128          { .compatible = "arrow,xrs7003e", .data = &xrs7003e_info },
> >    129          { .compatible = "arrow,xrs7003f", .data = &xrs7003f_info },
> >    130          { .compatible = "arrow,xrs7004e", .data = &xrs7004e_info },
> >    131          { .compatible = "arrow,xrs7004f", .data = &xrs7004f_info },
> >    132          {},
> >    133  };
> >    134  MODULE_DEVICE_TABLE(of, xrs700x_i2c_dt_ids);
> >    135
> >
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

-George


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-next:master 3824/6048] drivers/net/dsa/xrs700x/xrs700x_i2c.c:127:34: warning: unused variable 'xrs700x_i2c_dt_ids'
  2021-02-09 17:18   ` George McCollister
@ 2021-02-09 17:23     ` Vladimir Oltean
  2021-02-09 17:25       ` Florian Fainelli
  0 siblings, 1 reply; 6+ messages in thread
From: Vladimir Oltean @ 2021-02-09 17:23 UTC (permalink / raw)
  To: George McCollister
  Cc: Souptick Joarder, kernel test robot, kbuild-all,
	clang-built-linux, Linux Memory Management List, Jakub Kicinski,
	Florian Fainelli, Andrew Lunn

On Tue, Feb 09, 2021 at 11:18:12AM -0600, George McCollister wrote:
> On Tue, Feb 9, 2021 at 10:33 AM Souptick Joarder <jrdr.linux@gmail.com> wrote:
> > I think, this can defined under #ifdef CONFIG_OF.
> 
> Was this robot reporting this warning for other DSA drivers? A lot of
> them appear to use of_device_id in the same manner (unless I'm missing
> something). Do we need to do something DSA wide to deal with this?

Probably not DSA-wide since we still have drivers that probe on platform
data and not OF (dsa_loop), but individual drivers should have "depends
on OF" in Kconfig as far as I can tell.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-next:master 3824/6048] drivers/net/dsa/xrs700x/xrs700x_i2c.c:127:34: warning: unused variable 'xrs700x_i2c_dt_ids'
  2021-02-09 17:23     ` Vladimir Oltean
@ 2021-02-09 17:25       ` Florian Fainelli
  2021-02-09 19:16         ` Souptick Joarder
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2021-02-09 17:25 UTC (permalink / raw)
  To: Vladimir Oltean, George McCollister
  Cc: Souptick Joarder, kernel test robot, kbuild-all,
	clang-built-linux, Linux Memory Management List, Jakub Kicinski,
	Andrew Lunn

On 2/9/21 9:23 AM, Vladimir Oltean wrote:
> On Tue, Feb 09, 2021 at 11:18:12AM -0600, George McCollister wrote:
>> On Tue, Feb 9, 2021 at 10:33 AM Souptick Joarder <jrdr.linux@gmail.com> wrote:
>>> I think, this can defined under #ifdef CONFIG_OF.
>>
>> Was this robot reporting this warning for other DSA drivers? A lot of
>> them appear to use of_device_id in the same manner (unless I'm missing
>> something). Do we need to do something DSA wide to deal with this?
> 
> Probably not DSA-wide since we still have drivers that probe on platform
> data and not OF (dsa_loop), but individual drivers should have "depends
> on OF" in Kconfig as far as I can tell.

Not necessarily, there is a runtime dependency on OF being available for
probing but as far as building goes there are stubs provided for when
CONFIG_OF=n which allow the driver to continue to build.

Adding either an #ifdef CONFIG_OF or __maybe_unused should silence those
warnings.
-- 
Florian


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-next:master 3824/6048] drivers/net/dsa/xrs700x/xrs700x_i2c.c:127:34: warning: unused variable 'xrs700x_i2c_dt_ids'
  2021-02-09 17:25       ` Florian Fainelli
@ 2021-02-09 19:16         ` Souptick Joarder
  0 siblings, 0 replies; 6+ messages in thread
From: Souptick Joarder @ 2021-02-09 19:16 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Vladimir Oltean, George McCollister, kernel test robot,
	kbuild-all, clang-built-linux, Linux Memory Management List,
	Jakub Kicinski, Andrew Lunn

On Tue, Feb 9, 2021 at 10:55 PM Florian Fainelli <f.fainelli@gmail.com> wrote:
>
> On 2/9/21 9:23 AM, Vladimir Oltean wrote:
> > On Tue, Feb 09, 2021 at 11:18:12AM -0600, George McCollister wrote:
> >> On Tue, Feb 9, 2021 at 10:33 AM Souptick Joarder <jrdr.linux@gmail.com> wrote:
> >>> I think, this can defined under #ifdef CONFIG_OF.
> >>
> >> Was this robot reporting this warning for other DSA drivers? A lot of
> >> them appear to use of_device_id in the same manner (unless I'm missing
> >> something). Do we need to do something DSA wide to deal with this?
> >
> > Probably not DSA-wide since we still have drivers that probe on platform
> > data and not OF (dsa_loop), but individual drivers should have "depends
> > on OF" in Kconfig as far as I can tell.
>
> Not necessarily, there is a runtime dependency on OF being available for
> probing but as far as building goes there are stubs provided for when
> CONFIG_OF=n which allow the driver to continue to build.
>
> Adding either an #ifdef CONFIG_OF or __maybe_unused should silence those
> warnings.

Agree. Some of the similar warning in other drivers was fixed in the same way.
> --
> Florian


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-09 19:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-06 18:01 [linux-next:master 3824/6048] drivers/net/dsa/xrs700x/xrs700x_i2c.c:127:34: warning: unused variable 'xrs700x_i2c_dt_ids' kernel test robot
2021-02-09 16:33 ` Souptick Joarder
2021-02-09 17:18   ` George McCollister
2021-02-09 17:23     ` Vladimir Oltean
2021-02-09 17:25       ` Florian Fainelli
2021-02-09 19:16         ` Souptick Joarder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox