linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 7313/8469] drivers/gpio/gpio-sim.c:388:34: warning: unused variable 'gpio_sim_of_match'
@ 2021-03-30  4:15 kernel test robot
  2021-03-30  9:11 ` Andy Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2021-03-30  4:15 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: kbuild-all, clang-built-linux, Linux Memory Management List,
	Andy Shevchenko, Linus Walleij

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   9d49ed9ca93b8c564033c1d6808017bc9052b5db
commit: 3f0279eb9e3767f37939358a42054c226503233a [7313/8469] gpio: sim: new testing module
config: arm-randconfig-r001-20210330 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 482283042f795ecc27838a3b2f76b5494991401c)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=3f0279eb9e3767f37939358a42054c226503233a
        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 3f0279eb9e3767f37939358a42054c226503233a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

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/gpio/gpio-sim.c:388:34: warning: unused variable 'gpio_sim_of_match' [-Wunused-const-variable]
   static const struct of_device_id gpio_sim_of_match[] = {
                                    ^
   1 warning generated.


vim +/gpio_sim_of_match +388 drivers/gpio/gpio-sim.c

   387	
 > 388	static const struct of_device_id gpio_sim_of_match[] = {
   389		{ .compatible = "gpio-simulator" },
   390		{ }
   391	};
   392	MODULE_DEVICE_TABLE(of, gpio_sim_of_match);
   393	

---
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: 35012 bytes --]

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

* Re: [linux-next:master 7313/8469] drivers/gpio/gpio-sim.c:388:34: warning: unused variable 'gpio_sim_of_match'
  2021-03-30  4:15 [linux-next:master 7313/8469] drivers/gpio/gpio-sim.c:388:34: warning: unused variable 'gpio_sim_of_match' kernel test robot
@ 2021-03-30  9:11 ` Andy Shevchenko
  2021-03-30  9:26   ` Bartosz Golaszewski
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2021-03-30  9:11 UTC (permalink / raw)
  To: kernel test robot
  Cc: Bartosz Golaszewski, kbuild-all, clang-built-linux,
	Linux Memory Management List, Linus Walleij

On Tue, Mar 30, 2021 at 12:15:04PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   9d49ed9ca93b8c564033c1d6808017bc9052b5db
> commit: 3f0279eb9e3767f37939358a42054c226503233a [7313/8469] gpio: sim: new testing module
> config: arm-randconfig-r001-20210330 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 482283042f795ecc27838a3b2f76b5494991401c)
> 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 arm cross compiling tool for clang build
>         # apt-get install binutils-arm-linux-gnueabi
>         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=3f0279eb9e3767f37939358a42054c226503233a
>         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 3f0279eb9e3767f37939358a42054c226503233a
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 
> 
> 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/gpio/gpio-sim.c:388:34: warning: unused variable 'gpio_sim_of_match' [-Wunused-const-variable]
>    static const struct of_device_id gpio_sim_of_match[] = {
>                                     ^
>    1 warning generated.

of_match_ptr() should be removed AFAIU the case.

> vim +/gpio_sim_of_match +388 drivers/gpio/gpio-sim.c
> 
>    387	
>  > 388	static const struct of_device_id gpio_sim_of_match[] = {
>    389		{ .compatible = "gpio-simulator" },
>    390		{ }
>    391	};
>    392	MODULE_DEVICE_TABLE(of, gpio_sim_of_match);
>    393	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org



-- 
With Best Regards,
Andy Shevchenko




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

* Re: [linux-next:master 7313/8469] drivers/gpio/gpio-sim.c:388:34: warning: unused variable 'gpio_sim_of_match'
  2021-03-30  9:11 ` Andy Shevchenko
@ 2021-03-30  9:26   ` Bartosz Golaszewski
  2021-03-30  9:55     ` Andy Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Bartosz Golaszewski @ 2021-03-30  9:26 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: kernel test robot, kbuild-all, clang-built-linux,
	Linux Memory Management List, Linus Walleij

On Tue, Mar 30, 2021 at 11:11 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Tue, Mar 30, 2021 at 12:15:04PM +0800, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   9d49ed9ca93b8c564033c1d6808017bc9052b5db
> > commit: 3f0279eb9e3767f37939358a42054c226503233a [7313/8469] gpio: sim: new testing module
> > config: arm-randconfig-r001-20210330 (attached as .config)
> > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 482283042f795ecc27838a3b2f76b5494991401c)
> > 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 arm cross compiling tool for clang build
> >         # apt-get install binutils-arm-linux-gnueabi
> >         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=3f0279eb9e3767f37939358a42054c226503233a
> >         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 3f0279eb9e3767f37939358a42054c226503233a
> >         # save the attached .config to linux build tree
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
> >
> > 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/gpio/gpio-sim.c:388:34: warning: unused variable 'gpio_sim_of_match' [-Wunused-const-variable]
> >    static const struct of_device_id gpio_sim_of_match[] = {
> >                                     ^
> >    1 warning generated.
>
> of_match_ptr() should be removed AFAIU the case.
>

I'm not using it though... Other drivers do the same thing as I did
here. Can this be a false positive?

Bart

> > vim +/gpio_sim_of_match +388 drivers/gpio/gpio-sim.c
> >
> >    387
> >  > 388        static const struct of_device_id gpio_sim_of_match[] = {
> >    389                { .compatible = "gpio-simulator" },
> >    390                { }
> >    391        };
> >    392        MODULE_DEVICE_TABLE(of, gpio_sim_of_match);
> >    393
> >
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>
>
>
> --
> With Best Regards,
> Andy Shevchenko
>
>


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

* Re: [linux-next:master 7313/8469] drivers/gpio/gpio-sim.c:388:34: warning: unused variable 'gpio_sim_of_match'
  2021-03-30  9:26   ` Bartosz Golaszewski
@ 2021-03-30  9:55     ` Andy Shevchenko
  2021-03-30  9:58       ` Bartosz Golaszewski
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2021-03-30  9:55 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: kernel test robot, kbuild-all, clang-built-linux,
	Linux Memory Management List, Linus Walleij

On Tue, Mar 30, 2021 at 11:26:17AM +0200, Bartosz Golaszewski wrote:
> On Tue, Mar 30, 2021 at 11:11 AM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Tue, Mar 30, 2021 at 12:15:04PM +0800, kernel test robot wrote:
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > head:   9d49ed9ca93b8c564033c1d6808017bc9052b5db
> > > commit: 3f0279eb9e3767f37939358a42054c226503233a [7313/8469] gpio: sim: new testing module
> > > config: arm-randconfig-r001-20210330 (attached as .config)
> > > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 482283042f795ecc27838a3b2f76b5494991401c)
> > > 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 arm cross compiling tool for clang build
> > >         # apt-get install binutils-arm-linux-gnueabi
> > >         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=3f0279eb9e3767f37939358a42054c226503233a
> > >         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 3f0279eb9e3767f37939358a42054c226503233a
> > >         # save the attached .config to linux build tree
> > >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
> > >
> > > 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/gpio/gpio-sim.c:388:34: warning: unused variable 'gpio_sim_of_match' [-Wunused-const-variable]
> > >    static const struct of_device_id gpio_sim_of_match[] = {
> > >                                     ^
> > >    1 warning generated.
> >
> > of_match_ptr() should be removed AFAIU the case.
> >
> 
> I'm not using it though... Other drivers do the same thing as I did
> here. Can this be a false positive?

Ah, you simply missed to add it to the platform driver structure.

No, it's not false positive.

> > > vim +/gpio_sim_of_match +388 drivers/gpio/gpio-sim.c
> > >
> > >    387
> > >  > 388        static const struct of_device_id gpio_sim_of_match[] = {
> > >    389                { .compatible = "gpio-simulator" },
> > >    390                { }
> > >    391        };
> > >    392        MODULE_DEVICE_TABLE(of, gpio_sim_of_match);

-- 
With Best Regards,
Andy Shevchenko




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

* Re: [linux-next:master 7313/8469] drivers/gpio/gpio-sim.c:388:34: warning: unused variable 'gpio_sim_of_match'
  2021-03-30  9:55     ` Andy Shevchenko
@ 2021-03-30  9:58       ` Bartosz Golaszewski
  0 siblings, 0 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2021-03-30  9:58 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: kernel test robot, kbuild-all, clang-built-linux,
	Linux Memory Management List, Linus Walleij

On Tue, Mar 30, 2021 at 11:55 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Tue, Mar 30, 2021 at 11:26:17AM +0200, Bartosz Golaszewski wrote:
> > On Tue, Mar 30, 2021 at 11:11 AM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > > On Tue, Mar 30, 2021 at 12:15:04PM +0800, kernel test robot wrote:
> > > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > > head:   9d49ed9ca93b8c564033c1d6808017bc9052b5db
> > > > commit: 3f0279eb9e3767f37939358a42054c226503233a [7313/8469] gpio: sim: new testing module
> > > > config: arm-randconfig-r001-20210330 (attached as .config)
> > > > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 482283042f795ecc27838a3b2f76b5494991401c)
> > > > 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 arm cross compiling tool for clang build
> > > >         # apt-get install binutils-arm-linux-gnueabi
> > > >         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=3f0279eb9e3767f37939358a42054c226503233a
> > > >         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 3f0279eb9e3767f37939358a42054c226503233a
> > > >         # save the attached .config to linux build tree
> > > >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
> > > >
> > > > 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/gpio/gpio-sim.c:388:34: warning: unused variable 'gpio_sim_of_match' [-Wunused-const-variable]
> > > >    static const struct of_device_id gpio_sim_of_match[] = {
> > > >                                     ^
> > > >    1 warning generated.
> > >
> > > of_match_ptr() should be removed AFAIU the case.
> > >
> >
> > I'm not using it though... Other drivers do the same thing as I did
> > here. Can this be a false positive?
>
> Ah, you simply missed to add it to the platform driver structure.
>
> No, it's not false positive.
>
> > > > vim +/gpio_sim_of_match +388 drivers/gpio/gpio-sim.c
> > > >
> > > >    387
> > > >  > 388        static const struct of_device_id gpio_sim_of_match[] = {
> > > >    389                { .compatible = "gpio-simulator" },
> > > >    390                { }
> > > >    391        };
> > > >    392        MODULE_DEVICE_TABLE(of, gpio_sim_of_match);
>
> --
> With Best Regards,
> Andy Shevchenko
>
>

Indeed. I'll send a patch.

Bartosz


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

end of thread, other threads:[~2021-03-30  9:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30  4:15 [linux-next:master 7313/8469] drivers/gpio/gpio-sim.c:388:34: warning: unused variable 'gpio_sim_of_match' kernel test robot
2021-03-30  9:11 ` Andy Shevchenko
2021-03-30  9:26   ` Bartosz Golaszewski
2021-03-30  9:55     ` Andy Shevchenko
2021-03-30  9:58       ` Bartosz Golaszewski

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).