linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 6404/13375] drivers/i3c/master/mipi-i3c-hci/core.c:780:34: warning: unused variable 'i3c_hci_of_match'
@ 2020-12-14 20:01 kernel test robot
  2020-12-15 19:00 ` Souptick Joarder
  0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2020-12-14 20:01 UTC (permalink / raw)
  To: Nicolas Pitre
  Cc: kbuild-all, clang-built-linux, Linux Memory Management List,
	Boris Brezillon

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   7bba37a1591369e2e506d599b8f5d7d0516b2dbc
commit: 9ad9a52cce2828d932ae9495181e3d6414f72c07 [6404/13375] i3c/master: introduce the mipi-i3c-hci driver
config: x86_64-randconfig-a013-20201215 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project d38205144febf4dc42c9270c6aa3d978f1ef65e1)
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=9ad9a52cce2828d932ae9495181e3d6414f72c07
        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 9ad9a52cce2828d932ae9495181e3d6414f72c07
        # 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/i3c/master/mipi-i3c-hci/core.c:780:34: warning: unused variable 'i3c_hci_of_match' [-Wunused-const-variable]
   static const struct of_device_id i3c_hci_of_match[] = {
                                    ^
   1 warning generated.

vim +/i3c_hci_of_match +780 drivers/i3c/master/mipi-i3c-hci/core.c

   779	
 > 780	static const struct of_device_id i3c_hci_of_match[] = {
   781		{ .compatible = "mipi-i3c-hci", },
   782		{},
   783	};
   784	MODULE_DEVICE_TABLE(of, i3c_hci_of_match);
   785	

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

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

* Re: [linux-next:master 6404/13375] drivers/i3c/master/mipi-i3c-hci/core.c:780:34: warning: unused variable 'i3c_hci_of_match'
  2020-12-14 20:01 [linux-next:master 6404/13375] drivers/i3c/master/mipi-i3c-hci/core.c:780:34: warning: unused variable 'i3c_hci_of_match' kernel test robot
@ 2020-12-15 19:00 ` Souptick Joarder
  2020-12-16  3:28   ` Nicolas Pitre
  0 siblings, 1 reply; 5+ messages in thread
From: Souptick Joarder @ 2020-12-15 19:00 UTC (permalink / raw)
  To: kernel test robot
  Cc: Nicolas Pitre, kbuild-all, clang-built-linux,
	Linux Memory Management List, Boris Brezillon

On Tue, Dec 15, 2020 at 1:31 AM kernel test robot <lkp@intel.com> wrote:
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   7bba37a1591369e2e506d599b8f5d7d0516b2dbc
> commit: 9ad9a52cce2828d932ae9495181e3d6414f72c07 [6404/13375] i3c/master: introduce the mipi-i3c-hci driver
> config: x86_64-randconfig-a013-20201215 (attached as .config)
> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project d38205144febf4dc42c9270c6aa3d978f1ef65e1)
> 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=9ad9a52cce2828d932ae9495181e3d6414f72c07
>         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 9ad9a52cce2828d932ae9495181e3d6414f72c07
>         # 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/i3c/master/mipi-i3c-hci/core.c:780:34: warning: unused variable 'i3c_hci_of_match' [-Wunused-const-variable]
>    static const struct of_device_id i3c_hci_of_match[] = {
>                                     ^
>    1 warning generated.

CONFIG_OF not enabled.

Does it make sense to remove of_match_ptr() ?

static struct platform_driver i3c_hci_driver = {
.probe = i3c_hci_probe,
.remove = i3c_hci_remove,
.driver = {
.name = "mipi-i3c-hci",
.of_match_table = of_match_ptr(i3c_hci_of_match),
},


>
> vim +/i3c_hci_of_match +780 drivers/i3c/master/mipi-i3c-hci/core.c
>
>    779
>  > 780  static const struct of_device_id i3c_hci_of_match[] = {
>    781          { .compatible = "mipi-i3c-hci", },
>    782          {},
>    783  };
>    784  MODULE_DEVICE_TABLE(of, i3c_hci_of_match);
>    785
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


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

* Re: [linux-next:master 6404/13375] drivers/i3c/master/mipi-i3c-hci/core.c:780:34: warning: unused variable 'i3c_hci_of_match'
  2020-12-15 19:00 ` Souptick Joarder
@ 2020-12-16  3:28   ` Nicolas Pitre
  2020-12-16  8:46     ` Boris Brezillon
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Pitre @ 2020-12-16  3:28 UTC (permalink / raw)
  To: Souptick Joarder
  Cc: kernel test robot, kbuild-all, clang-built-linux,
	Linux Memory Management List, Boris Brezillon

On Wed, 16 Dec 2020, Souptick Joarder wrote:

> On Tue, Dec 15, 2020 at 1:31 AM kernel test robot <lkp@intel.com> wrote:
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   7bba37a1591369e2e506d599b8f5d7d0516b2dbc
> > commit: 9ad9a52cce2828d932ae9495181e3d6414f72c07 [6404/13375] i3c/master: introduce the mipi-i3c-hci driver
> > config: x86_64-randconfig-a013-20201215 (attached as .config)
> > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project d38205144febf4dc42c9270c6aa3d978f1ef65e1)
> > 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=9ad9a52cce2828d932ae9495181e3d6414f72c07
> >         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 9ad9a52cce2828d932ae9495181e3d6414f72c07
> >         # 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/i3c/master/mipi-i3c-hci/core.c:780:34: warning: unused variable 'i3c_hci_of_match' [-Wunused-const-variable]
> >    static const struct of_device_id i3c_hci_of_match[] = {
> >                                     ^
> >    1 warning generated.
> 
> CONFIG_OF not enabled.
> 
> Does it make sense to remove of_match_ptr() ?
> 
> static struct platform_driver i3c_hci_driver = {
> .probe = i3c_hci_probe,
> .remove = i3c_hci_remove,
> .driver = {
> .name = "mipi-i3c-hci",
> .of_match_table = of_match_ptr(i3c_hci_of_match),
> },

That... or having #ifdef CONFIG_OF around struct of_device_id.

> > vim +/i3c_hci_of_match +780 drivers/i3c/master/mipi-i3c-hci/core.c
> >
> >    779
> >  > 780  static const struct of_device_id i3c_hci_of_match[] = {
> >    781          { .compatible = "mipi-i3c-hci", },
> >    782          {},
> >    783  };
> >    784  MODULE_DEVICE_TABLE(of, i3c_hci_of_match);
> >    785
> >
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
> 


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

* Re: [linux-next:master 6404/13375] drivers/i3c/master/mipi-i3c-hci/core.c:780:34: warning: unused variable 'i3c_hci_of_match'
  2020-12-16  3:28   ` Nicolas Pitre
@ 2020-12-16  8:46     ` Boris Brezillon
  2020-12-16 14:44       ` Nicolas Pitre
  0 siblings, 1 reply; 5+ messages in thread
From: Boris Brezillon @ 2020-12-16  8:46 UTC (permalink / raw)
  To: Nicolas Pitre
  Cc: Souptick Joarder, kernel test robot, kbuild-all,
	clang-built-linux, Linux Memory Management List, Boris Brezillon

On Tue, 15 Dec 2020 22:28:42 -0500 (EST)
Nicolas Pitre <nico@fluxnic.net> wrote:

> On Wed, 16 Dec 2020, Souptick Joarder wrote:
> 
> > On Tue, Dec 15, 2020 at 1:31 AM kernel test robot <lkp@intel.com> wrote:  
> > >
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > head:   7bba37a1591369e2e506d599b8f5d7d0516b2dbc
> > > commit: 9ad9a52cce2828d932ae9495181e3d6414f72c07 [6404/13375] i3c/master: introduce the mipi-i3c-hci driver
> > > config: x86_64-randconfig-a013-20201215 (attached as .config)
> > > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project d38205144febf4dc42c9270c6aa3d978f1ef65e1)
> > > 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=9ad9a52cce2828d932ae9495181e3d6414f72c07
> > >         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 9ad9a52cce2828d932ae9495181e3d6414f72c07
> > >         # 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/i3c/master/mipi-i3c-hci/core.c:780:34: warning: unused variable 'i3c_hci_of_match' [-Wunused-const-variable]  
> > >    static const struct of_device_id i3c_hci_of_match[] = {
> > >                                     ^
> > >    1 warning generated.  
> > 
> > CONFIG_OF not enabled.
> > 
> > Does it make sense to remove of_match_ptr() ?
> > 
> > static struct platform_driver i3c_hci_driver = {
> > .probe = i3c_hci_probe,
> > .remove = i3c_hci_remove,
> > .driver = {
> > .name = "mipi-i3c-hci",
> > .of_match_table = of_match_ptr(i3c_hci_of_match),
> > },  
> 
> That... or having #ifdef CONFIG_OF around struct of_device_id.

Or adding a __maybe_unused qualifier. Can you send patch for this so I
can apply it before sending my PR to Linus?

> 
> > > vim +/i3c_hci_of_match +780 drivers/i3c/master/mipi-i3c-hci/core.c
> > >
> > >    779  
> > >  > 780  static const struct of_device_id i3c_hci_of_match[] = {  
> > >    781          { .compatible = "mipi-i3c-hci", },
> > >    782          {},
> > >    783  };
> > >    784  MODULE_DEVICE_TABLE(of, i3c_hci_of_match);
> > >    785
> > >
> > > ---
> > > 0-DAY CI Kernel Test Service, Intel Corporation
> > > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org  
> >   



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

* Re: [linux-next:master 6404/13375] drivers/i3c/master/mipi-i3c-hci/core.c:780:34: warning: unused variable 'i3c_hci_of_match'
  2020-12-16  8:46     ` Boris Brezillon
@ 2020-12-16 14:44       ` Nicolas Pitre
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Pitre @ 2020-12-16 14:44 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Souptick Joarder, kernel test robot, kbuild-all,
	clang-built-linux, Linux Memory Management List, Boris Brezillon

On Wed, 16 Dec 2020, Boris Brezillon wrote:

> Or adding a __maybe_unused qualifier. Can you send patch for this so I
> can apply it before sending my PR to Linus?

Here it is:

---------- >8
From: Nicolas Pitre <npitre@baylibre.com>
Subject: [PATCH] i3c/master/mipi-i3c-hci: quiet maybe-unused variable warning

If CONFIG_OF is disabled then the matching table is notreferenced.

Reported-by: kernel test robot <lkp@intel.com>
Signed-by: Nicolas Pitre <npitre@baylibre.com>

diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c
index 113c4c9054..500abd27fb 100644
--- a/drivers/i3c/master/mipi-i3c-hci/core.c
+++ b/drivers/i3c/master/mipi-i3c-hci/core.c
@@ -777,7 +777,7 @@ static int i3c_hci_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static const struct of_device_id i3c_hci_of_match[] = {
+static const struct __maybe_unused of_device_id i3c_hci_of_match[] = {
 	{ .compatible = "mipi-i3c-hci", },
 	{},
 };


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

end of thread, other threads:[~2020-12-16 14:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 20:01 [linux-next:master 6404/13375] drivers/i3c/master/mipi-i3c-hci/core.c:780:34: warning: unused variable 'i3c_hci_of_match' kernel test robot
2020-12-15 19:00 ` Souptick Joarder
2020-12-16  3:28   ` Nicolas Pitre
2020-12-16  8:46     ` Boris Brezillon
2020-12-16 14:44       ` Nicolas Pitre

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