All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 1932/6331] drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids'
@ 2021-06-02 10:26 ` kernel test robot
  0 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2021-06-02 10:26 UTC (permalink / raw)
  To: Sergio Paracuellos
  Cc: kbuild-all, clang-built-linux, Linux Memory Management List, Vinod Koul

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   ed5d0667a6540293c9485dd95babb5f1e241226a
commit: 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a [1932/6331] phy: ralink: Kconfig: enable COMPILE_TEST on mt7621-pci-phy driver
config: x86_64-randconfig-r016-20210602 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project db26cd30b6dd65e88d786e97a1e453af5cd48966)
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=28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
        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 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
        # 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/phy/ralink/phy-mt7621-pci.c:277:4: warning: cast to smaller integer type 'unsigned int' from 'void *' [-Wvoid-pointer-to-int-cast]
                    (unsigned int)mt7621_phy->port_base, mt7621_phy->has_dual_port);
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:118:33: note: expanded from macro 'dev_info'
           _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
                                          ^~~~~~~~~~~
>> drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids' [-Wunused-const-variable]
   static const struct of_device_id mt7621_pci_phy_ids[] = {
                                    ^
   2 warnings generated.


vim +/mt7621_pci_phy_ids +341 drivers/phy/ralink/phy-mt7621-pci.c

d87da32372a03c Sergio Paracuellos 2020-11-21  340  
d87da32372a03c Sergio Paracuellos 2020-11-21 @341  static const struct of_device_id mt7621_pci_phy_ids[] = {
d87da32372a03c Sergio Paracuellos 2020-11-21  342  	{ .compatible = "mediatek,mt7621-pci-phy" },
d87da32372a03c Sergio Paracuellos 2020-11-21  343  	{},
d87da32372a03c Sergio Paracuellos 2020-11-21  344  };
8145dcb07d0c8b Sergio Paracuellos 2020-12-01  345  MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids);
d87da32372a03c Sergio Paracuellos 2020-11-21  346  

:::::: The code at line 341 was first introduced by commit
:::::: d87da32372a03ce121fc65ccd2c9a43edf56b364 phy: ralink: Add PHY driver for MT7621 PCIe PHY

:::::: TO: Sergio Paracuellos <sergio.paracuellos@gmail.com>
:::::: CC: Vinod Koul <vkoul@kernel.org>

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

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

* [linux-next:master 1932/6331] drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids'
@ 2021-06-02 10:26 ` kernel test robot
  0 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2021-06-02 10:26 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   ed5d0667a6540293c9485dd95babb5f1e241226a
commit: 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a [1932/6331] phy: ralink: Kconfig: enable COMPILE_TEST on mt7621-pci-phy driver
config: x86_64-randconfig-r016-20210602 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project db26cd30b6dd65e88d786e97a1e453af5cd48966)
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=28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
        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 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
        # 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/phy/ralink/phy-mt7621-pci.c:277:4: warning: cast to smaller integer type 'unsigned int' from 'void *' [-Wvoid-pointer-to-int-cast]
                    (unsigned int)mt7621_phy->port_base, mt7621_phy->has_dual_port);
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:118:33: note: expanded from macro 'dev_info'
           _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
                                          ^~~~~~~~~~~
>> drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids' [-Wunused-const-variable]
   static const struct of_device_id mt7621_pci_phy_ids[] = {
                                    ^
   2 warnings generated.


vim +/mt7621_pci_phy_ids +341 drivers/phy/ralink/phy-mt7621-pci.c

d87da32372a03c Sergio Paracuellos 2020-11-21  340  
d87da32372a03c Sergio Paracuellos 2020-11-21 @341  static const struct of_device_id mt7621_pci_phy_ids[] = {
d87da32372a03c Sergio Paracuellos 2020-11-21  342  	{ .compatible = "mediatek,mt7621-pci-phy" },
d87da32372a03c Sergio Paracuellos 2020-11-21  343  	{},
d87da32372a03c Sergio Paracuellos 2020-11-21  344  };
8145dcb07d0c8b Sergio Paracuellos 2020-12-01  345  MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids);
d87da32372a03c Sergio Paracuellos 2020-11-21  346  

:::::: The code at line 341 was first introduced by commit
:::::: d87da32372a03ce121fc65ccd2c9a43edf56b364 phy: ralink: Add PHY driver for MT7621 PCIe PHY

:::::: TO: Sergio Paracuellos <sergio.paracuellos@gmail.com>
:::::: CC: Vinod Koul <vkoul@kernel.org>

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

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

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

* Re: [linux-next:master 1932/6331] drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids'
  2021-06-02 10:26 ` kernel test robot
@ 2021-06-02 10:38   ` Sergio Paracuellos
  -1 siblings, 0 replies; 12+ messages in thread
From: Sergio Paracuellos @ 2021-06-02 10:38 UTC (permalink / raw)
  To: kernel test robot
  Cc: kbuild-all, clang-built-linux, Linux Memory Management List, Vinod Koul

Hi,

On Wed, Jun 2, 2021 at 12:27 PM kernel test robot <lkp@intel.com> wrote:
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   ed5d0667a6540293c9485dd95babb5f1e241226a
> commit: 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a [1932/6331] phy: ralink: Kconfig: enable COMPILE_TEST on mt7621-pci-phy driver
> config: x86_64-randconfig-r016-20210602 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project db26cd30b6dd65e88d786e97a1e453af5cd48966)
> 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=28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
>         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 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
>         # 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/phy/ralink/phy-mt7621-pci.c:277:4: warning: cast to smaller integer type 'unsigned int' from 'void *' [-Wvoid-pointer-to-int-cast]
>                     (unsigned int)mt7621_phy->port_base, mt7621_phy->has_dual_port);
>                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    include/linux/dev_printk.h:118:33: note: expanded from macro 'dev_info'
>            _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)

Already fixed in:
https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git/commit/drivers/phy/ralink/phy-mt7621-pci.c?h=next&id=652a6a2e3824ce2ebf79a2d5326940d05c4db036

>                                           ^~~~~~~~~~~
> >> drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids' [-Wunused-const-variable]
>    static const struct of_device_id mt7621_pci_phy_ids[] = {
>                                     ^

Mmmm... This one is used through MODULE_DEVICE_TABLE macro... Am I
missing something??

>    2 warnings generated.
>
>
> vim +/mt7621_pci_phy_ids +341 drivers/phy/ralink/phy-mt7621-pci.c
>
> d87da32372a03c Sergio Paracuellos 2020-11-21  340
> d87da32372a03c Sergio Paracuellos 2020-11-21 @341  static const struct of_device_id mt7621_pci_phy_ids[] = {
> d87da32372a03c Sergio Paracuellos 2020-11-21  342       { .compatible = "mediatek,mt7621-pci-phy" },
> d87da32372a03c Sergio Paracuellos 2020-11-21  343       {},
> d87da32372a03c Sergio Paracuellos 2020-11-21  344  };
> 8145dcb07d0c8b Sergio Paracuellos 2020-12-01  345  MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids);
> d87da32372a03c Sergio Paracuellos 2020-11-21  346
>
> :::::: The code at line 341 was first introduced by commit
> :::::: d87da32372a03ce121fc65ccd2c9a43edf56b364 phy: ralink: Add PHY driver for MT7621 PCIe PHY
>
> :::::: TO: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> :::::: CC: Vinod Koul <vkoul@kernel.org>
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Best regards,
    Sergio Paracuellos


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

* Re: [linux-next:master 1932/6331] drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids'
@ 2021-06-02 10:38   ` Sergio Paracuellos
  0 siblings, 0 replies; 12+ messages in thread
From: Sergio Paracuellos @ 2021-06-02 10:38 UTC (permalink / raw)
  To: kbuild-all

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

Hi,

On Wed, Jun 2, 2021 at 12:27 PM kernel test robot <lkp@intel.com> wrote:
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   ed5d0667a6540293c9485dd95babb5f1e241226a
> commit: 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a [1932/6331] phy: ralink: Kconfig: enable COMPILE_TEST on mt7621-pci-phy driver
> config: x86_64-randconfig-r016-20210602 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project db26cd30b6dd65e88d786e97a1e453af5cd48966)
> 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=28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
>         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 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
>         # 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/phy/ralink/phy-mt7621-pci.c:277:4: warning: cast to smaller integer type 'unsigned int' from 'void *' [-Wvoid-pointer-to-int-cast]
>                     (unsigned int)mt7621_phy->port_base, mt7621_phy->has_dual_port);
>                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    include/linux/dev_printk.h:118:33: note: expanded from macro 'dev_info'
>            _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)

Already fixed in:
https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git/commit/drivers/phy/ralink/phy-mt7621-pci.c?h=next&id=652a6a2e3824ce2ebf79a2d5326940d05c4db036

>                                           ^~~~~~~~~~~
> >> drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids' [-Wunused-const-variable]
>    static const struct of_device_id mt7621_pci_phy_ids[] = {
>                                     ^

Mmmm... This one is used through MODULE_DEVICE_TABLE macro... Am I
missing something??

>    2 warnings generated.
>
>
> vim +/mt7621_pci_phy_ids +341 drivers/phy/ralink/phy-mt7621-pci.c
>
> d87da32372a03c Sergio Paracuellos 2020-11-21  340
> d87da32372a03c Sergio Paracuellos 2020-11-21 @341  static const struct of_device_id mt7621_pci_phy_ids[] = {
> d87da32372a03c Sergio Paracuellos 2020-11-21  342       { .compatible = "mediatek,mt7621-pci-phy" },
> d87da32372a03c Sergio Paracuellos 2020-11-21  343       {},
> d87da32372a03c Sergio Paracuellos 2020-11-21  344  };
> 8145dcb07d0c8b Sergio Paracuellos 2020-12-01  345  MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids);
> d87da32372a03c Sergio Paracuellos 2020-11-21  346
>
> :::::: The code at line 341 was first introduced by commit
> :::::: d87da32372a03ce121fc65ccd2c9a43edf56b364 phy: ralink: Add PHY driver for MT7621 PCIe PHY
>
> :::::: TO: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> :::::: CC: Vinod Koul <vkoul@kernel.org>
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

Best regards,
    Sergio Paracuellos

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

* Re: [linux-next:master 1932/6331] drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids'
  2021-06-02 10:38   ` Sergio Paracuellos
@ 2021-06-02 16:47     ` Nick Desaulniers
  -1 siblings, 0 replies; 12+ messages in thread
From: Nick Desaulniers @ 2021-06-02 16:47 UTC (permalink / raw)
  To: Sergio Paracuellos
  Cc: kernel test robot, kbuild-all, clang-built-linux,
	Linux Memory Management List, Vinod Koul

On Wed, Jun 2, 2021 at 3:38 AM Sergio Paracuellos
<sergio.paracuellos@gmail.com> wrote:
>
> Hi,
>
> On Wed, Jun 2, 2021 at 12:27 PM kernel test robot <lkp@intel.com> wrote:
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   ed5d0667a6540293c9485dd95babb5f1e241226a
> > commit: 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a [1932/6331] phy: ralink: Kconfig: enable COMPILE_TEST on mt7621-pci-phy driver
> > config: x86_64-randconfig-r016-20210602 (attached as .config)

^ randconfig

> > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project db26cd30b6dd65e88d786e97a1e453af5cd48966)
> > 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=28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
> >         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 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
> >         # 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/phy/ralink/phy-mt7621-pci.c:277:4: warning: cast to smaller integer type 'unsigned int' from 'void *' [-Wvoid-pointer-to-int-cast]
> >                     (unsigned int)mt7621_phy->port_base, mt7621_phy->has_dual_port);
> >                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >    include/linux/dev_printk.h:118:33: note: expanded from macro 'dev_info'
> >            _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
>
> Already fixed in:
> https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git/commit/drivers/phy/ralink/phy-mt7621-pci.c?h=next&id=652a6a2e3824ce2ebf79a2d5326940d05c4db036
>
> >                                           ^~~~~~~~~~~
> > >> drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids' [-Wunused-const-variable]
> >    static const struct of_device_id mt7621_pci_phy_ids[] = {
> >                                     ^
>
> Mmmm... This one is used through MODULE_DEVICE_TABLE macro... Am I
> missing something??

Pretty sure there's a config in MODULE_DEVICE_TABLE that's being
disabled by the randconfig; the definition of mt7621_pci_phy_ids
should also be behind preprocessor checks for that.

>
> >    2 warnings generated.
> >
> >
> > vim +/mt7621_pci_phy_ids +341 drivers/phy/ralink/phy-mt7621-pci.c
> >
> > d87da32372a03c Sergio Paracuellos 2020-11-21  340
> > d87da32372a03c Sergio Paracuellos 2020-11-21 @341  static const struct of_device_id mt7621_pci_phy_ids[] = {
> > d87da32372a03c Sergio Paracuellos 2020-11-21  342       { .compatible = "mediatek,mt7621-pci-phy" },
> > d87da32372a03c Sergio Paracuellos 2020-11-21  343       {},
> > d87da32372a03c Sergio Paracuellos 2020-11-21  344  };
> > 8145dcb07d0c8b Sergio Paracuellos 2020-12-01  345  MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids);
> > d87da32372a03c Sergio Paracuellos 2020-11-21  346
> >
> > :::::: The code at line 341 was first introduced by commit
> > :::::: d87da32372a03ce121fc65ccd2c9a43edf56b364 phy: ralink: Add PHY driver for MT7621 PCIe PHY
> >
> > :::::: TO: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > :::::: CC: Vinod Koul <vkoul@kernel.org>
> >
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>
> Best regards,
>     Sergio Paracuellos
>
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAMhs-H8qyOKQmPtChYO%2BjfC%2BZmj8U9yGeZJORUx14MzyLeT5QA%40mail.gmail.com.



-- 
Thanks,
~Nick Desaulniers


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

* Re: [linux-next:master 1932/6331] drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids'
@ 2021-06-02 16:47     ` Nick Desaulniers
  0 siblings, 0 replies; 12+ messages in thread
From: Nick Desaulniers @ 2021-06-02 16:47 UTC (permalink / raw)
  To: kbuild-all

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

On Wed, Jun 2, 2021 at 3:38 AM Sergio Paracuellos
<sergio.paracuellos@gmail.com> wrote:
>
> Hi,
>
> On Wed, Jun 2, 2021 at 12:27 PM kernel test robot <lkp@intel.com> wrote:
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   ed5d0667a6540293c9485dd95babb5f1e241226a
> > commit: 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a [1932/6331] phy: ralink: Kconfig: enable COMPILE_TEST on mt7621-pci-phy driver
> > config: x86_64-randconfig-r016-20210602 (attached as .config)

^ randconfig

> > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project db26cd30b6dd65e88d786e97a1e453af5cd48966)
> > 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=28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
> >         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 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
> >         # 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/phy/ralink/phy-mt7621-pci.c:277:4: warning: cast to smaller integer type 'unsigned int' from 'void *' [-Wvoid-pointer-to-int-cast]
> >                     (unsigned int)mt7621_phy->port_base, mt7621_phy->has_dual_port);
> >                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >    include/linux/dev_printk.h:118:33: note: expanded from macro 'dev_info'
> >            _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
>
> Already fixed in:
> https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git/commit/drivers/phy/ralink/phy-mt7621-pci.c?h=next&id=652a6a2e3824ce2ebf79a2d5326940d05c4db036
>
> >                                           ^~~~~~~~~~~
> > >> drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids' [-Wunused-const-variable]
> >    static const struct of_device_id mt7621_pci_phy_ids[] = {
> >                                     ^
>
> Mmmm... This one is used through MODULE_DEVICE_TABLE macro... Am I
> missing something??

Pretty sure there's a config in MODULE_DEVICE_TABLE that's being
disabled by the randconfig; the definition of mt7621_pci_phy_ids
should also be behind preprocessor checks for that.

>
> >    2 warnings generated.
> >
> >
> > vim +/mt7621_pci_phy_ids +341 drivers/phy/ralink/phy-mt7621-pci.c
> >
> > d87da32372a03c Sergio Paracuellos 2020-11-21  340
> > d87da32372a03c Sergio Paracuellos 2020-11-21 @341  static const struct of_device_id mt7621_pci_phy_ids[] = {
> > d87da32372a03c Sergio Paracuellos 2020-11-21  342       { .compatible = "mediatek,mt7621-pci-phy" },
> > d87da32372a03c Sergio Paracuellos 2020-11-21  343       {},
> > d87da32372a03c Sergio Paracuellos 2020-11-21  344  };
> > 8145dcb07d0c8b Sergio Paracuellos 2020-12-01  345  MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids);
> > d87da32372a03c Sergio Paracuellos 2020-11-21  346
> >
> > :::::: The code at line 341 was first introduced by commit
> > :::::: d87da32372a03ce121fc65ccd2c9a43edf56b364 phy: ralink: Add PHY driver for MT7621 PCIe PHY
> >
> > :::::: TO: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > :::::: CC: Vinod Koul <vkoul@kernel.org>
> >
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
>
> Best regards,
>     Sergio Paracuellos
>
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe(a)googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAMhs-H8qyOKQmPtChYO%2BjfC%2BZmj8U9yGeZJORUx14MzyLeT5QA%40mail.gmail.com.



-- 
Thanks,
~Nick Desaulniers

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

* Re: [linux-next:master 1932/6331] drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids'
  2021-06-02 16:47     ` Nick Desaulniers
@ 2021-06-02 18:08       ` Sergio Paracuellos
  -1 siblings, 0 replies; 12+ messages in thread
From: Sergio Paracuellos @ 2021-06-02 18:08 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: kernel test robot, kbuild-all, clang-built-linux,
	Linux Memory Management List, Vinod Koul

Hi Nick,

On Wed, Jun 2, 2021 at 6:47 PM Nick Desaulniers <ndesaulniers@google.com> wrote:
>
> On Wed, Jun 2, 2021 at 3:38 AM Sergio Paracuellos
> <sergio.paracuellos@gmail.com> wrote:
> >
> > Hi,
> >
> > On Wed, Jun 2, 2021 at 12:27 PM kernel test robot <lkp@intel.com> wrote:
> > >
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > head:   ed5d0667a6540293c9485dd95babb5f1e241226a
> > > commit: 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a [1932/6331] phy: ralink: Kconfig: enable COMPILE_TEST on mt7621-pci-phy driver
> > > config: x86_64-randconfig-r016-20210602 (attached as .config)
>
> ^ randconfig
>
> > > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project db26cd30b6dd65e88d786e97a1e453af5cd48966)
> > > 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=28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
> > >         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 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
> > >         # 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/phy/ralink/phy-mt7621-pci.c:277:4: warning: cast to smaller integer type 'unsigned int' from 'void *' [-Wvoid-pointer-to-int-cast]
> > >                     (unsigned int)mt7621_phy->port_base, mt7621_phy->has_dual_port);
> > >                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >    include/linux/dev_printk.h:118:33: note: expanded from macro 'dev_info'
> > >            _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
> >
> > Already fixed in:
> > https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git/commit/drivers/phy/ralink/phy-mt7621-pci.c?h=next&id=652a6a2e3824ce2ebf79a2d5326940d05c4db036
> >
> > >                                           ^~~~~~~~~~~
> > > >> drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids' [-Wunused-const-variable]
> > >    static const struct of_device_id mt7621_pci_phy_ids[] = {
> > >                                     ^
> >
> > Mmmm... This one is used through MODULE_DEVICE_TABLE macro... Am I
> > missing something??
>
> Pretty sure there's a config in MODULE_DEVICE_TABLE that's being
> disabled by the randconfig; the definition of mt7621_pci_phy_ids
> should also be behind preprocessor checks for that.

So, the driver uses 'mt7621_pci_phy_ids' in two places :

static const struct of_device_id mt7621_pci_phy_ids[] = {
    { .compatible = "mediatek,mt7621-pci-phy" },
    {},
};
MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids);
^
This one is inside the 'MODULE' preprocessor directive.

static struct platform_driver mt7621_pci_phy_driver = {
    .probe = mt7621_pci_phy_probe,
    .driver = {
        .name = "mt7621-pci-phy",
        .of_match_table = of_match_ptr(mt7621_pci_phy_ids),
                                     ^
                                     This one is inside 'CONFIG_OF'
    },
};

randconfig is not setting 'CONFIG_OF' nor defining MODULE. I've been
looking into different drivers code and all of them follow the same
pattern and nothing is behind preprocessor checks at all. So I wonder
if this is really something that needs to be fixed.

Thanks in advance for clarifications.

Best regards,
    Sergio Paracuellos


>
> >
> > >    2 warnings generated.
> > >
> > >
> > > vim +/mt7621_pci_phy_ids +341 drivers/phy/ralink/phy-mt7621-pci.c
> > >
> > > d87da32372a03c Sergio Paracuellos 2020-11-21  340
> > > d87da32372a03c Sergio Paracuellos 2020-11-21 @341  static const struct of_device_id mt7621_pci_phy_ids[] = {
> > > d87da32372a03c Sergio Paracuellos 2020-11-21  342       { .compatible = "mediatek,mt7621-pci-phy" },
> > > d87da32372a03c Sergio Paracuellos 2020-11-21  343       {},
> > > d87da32372a03c Sergio Paracuellos 2020-11-21  344  };
> > > 8145dcb07d0c8b Sergio Paracuellos 2020-12-01  345  MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids);
> > > d87da32372a03c Sergio Paracuellos 2020-11-21  346
> > >
> > > :::::: The code at line 341 was first introduced by commit
> > > :::::: d87da32372a03ce121fc65ccd2c9a43edf56b364 phy: ralink: Add PHY driver for MT7621 PCIe PHY
> > >
> > > :::::: TO: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > > :::::: CC: Vinod Koul <vkoul@kernel.org>
> > >
> > > ---
> > > 0-DAY CI Kernel Test Service, Intel Corporation
> > > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
> >
> > Best regards,
> >     Sergio Paracuellos
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAMhs-H8qyOKQmPtChYO%2BjfC%2BZmj8U9yGeZJORUx14MzyLeT5QA%40mail.gmail.com.
>
>
>
> --
> Thanks,
> ~Nick Desaulniers


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

* Re: [linux-next:master 1932/6331] drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids'
@ 2021-06-02 18:08       ` Sergio Paracuellos
  0 siblings, 0 replies; 12+ messages in thread
From: Sergio Paracuellos @ 2021-06-02 18:08 UTC (permalink / raw)
  To: kbuild-all

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

Hi Nick,

On Wed, Jun 2, 2021 at 6:47 PM Nick Desaulniers <ndesaulniers@google.com> wrote:
>
> On Wed, Jun 2, 2021 at 3:38 AM Sergio Paracuellos
> <sergio.paracuellos@gmail.com> wrote:
> >
> > Hi,
> >
> > On Wed, Jun 2, 2021 at 12:27 PM kernel test robot <lkp@intel.com> wrote:
> > >
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > head:   ed5d0667a6540293c9485dd95babb5f1e241226a
> > > commit: 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a [1932/6331] phy: ralink: Kconfig: enable COMPILE_TEST on mt7621-pci-phy driver
> > > config: x86_64-randconfig-r016-20210602 (attached as .config)
>
> ^ randconfig
>
> > > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project db26cd30b6dd65e88d786e97a1e453af5cd48966)
> > > 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=28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
> > >         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 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
> > >         # 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/phy/ralink/phy-mt7621-pci.c:277:4: warning: cast to smaller integer type 'unsigned int' from 'void *' [-Wvoid-pointer-to-int-cast]
> > >                     (unsigned int)mt7621_phy->port_base, mt7621_phy->has_dual_port);
> > >                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >    include/linux/dev_printk.h:118:33: note: expanded from macro 'dev_info'
> > >            _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
> >
> > Already fixed in:
> > https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git/commit/drivers/phy/ralink/phy-mt7621-pci.c?h=next&id=652a6a2e3824ce2ebf79a2d5326940d05c4db036
> >
> > >                                           ^~~~~~~~~~~
> > > >> drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids' [-Wunused-const-variable]
> > >    static const struct of_device_id mt7621_pci_phy_ids[] = {
> > >                                     ^
> >
> > Mmmm... This one is used through MODULE_DEVICE_TABLE macro... Am I
> > missing something??
>
> Pretty sure there's a config in MODULE_DEVICE_TABLE that's being
> disabled by the randconfig; the definition of mt7621_pci_phy_ids
> should also be behind preprocessor checks for that.

So, the driver uses 'mt7621_pci_phy_ids' in two places :

static const struct of_device_id mt7621_pci_phy_ids[] = {
    { .compatible = "mediatek,mt7621-pci-phy" },
    {},
};
MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids);
^
This one is inside the 'MODULE' preprocessor directive.

static struct platform_driver mt7621_pci_phy_driver = {
    .probe = mt7621_pci_phy_probe,
    .driver = {
        .name = "mt7621-pci-phy",
        .of_match_table = of_match_ptr(mt7621_pci_phy_ids),
                                     ^
                                     This one is inside 'CONFIG_OF'
    },
};

randconfig is not setting 'CONFIG_OF' nor defining MODULE. I've been
looking into different drivers code and all of them follow the same
pattern and nothing is behind preprocessor checks at all. So I wonder
if this is really something that needs to be fixed.

Thanks in advance for clarifications.

Best regards,
    Sergio Paracuellos


>
> >
> > >    2 warnings generated.
> > >
> > >
> > > vim +/mt7621_pci_phy_ids +341 drivers/phy/ralink/phy-mt7621-pci.c
> > >
> > > d87da32372a03c Sergio Paracuellos 2020-11-21  340
> > > d87da32372a03c Sergio Paracuellos 2020-11-21 @341  static const struct of_device_id mt7621_pci_phy_ids[] = {
> > > d87da32372a03c Sergio Paracuellos 2020-11-21  342       { .compatible = "mediatek,mt7621-pci-phy" },
> > > d87da32372a03c Sergio Paracuellos 2020-11-21  343       {},
> > > d87da32372a03c Sergio Paracuellos 2020-11-21  344  };
> > > 8145dcb07d0c8b Sergio Paracuellos 2020-12-01  345  MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids);
> > > d87da32372a03c Sergio Paracuellos 2020-11-21  346
> > >
> > > :::::: The code at line 341 was first introduced by commit
> > > :::::: d87da32372a03ce121fc65ccd2c9a43edf56b364 phy: ralink: Add PHY driver for MT7621 PCIe PHY
> > >
> > > :::::: TO: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > > :::::: CC: Vinod Koul <vkoul@kernel.org>
> > >
> > > ---
> > > 0-DAY CI Kernel Test Service, Intel Corporation
> > > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
> >
> > Best regards,
> >     Sergio Paracuellos
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe(a)googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAMhs-H8qyOKQmPtChYO%2BjfC%2BZmj8U9yGeZJORUx14MzyLeT5QA%40mail.gmail.com.
>
>
>
> --
> Thanks,
> ~Nick Desaulniers

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

* Re: [linux-next:master 1932/6331] drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids'
  2021-06-02 18:08       ` Sergio Paracuellos
@ 2021-06-02 18:17         ` Nick Desaulniers
  -1 siblings, 0 replies; 12+ messages in thread
From: Nick Desaulniers @ 2021-06-02 18:17 UTC (permalink / raw)
  To: Sergio Paracuellos
  Cc: kernel test robot, kbuild-all, clang-built-linux,
	Linux Memory Management List, Vinod Koul

On Wed, Jun 2, 2021 at 11:09 AM Sergio Paracuellos
<sergio.paracuellos@gmail.com> wrote:
>
> Hi Nick,
>
> On Wed, Jun 2, 2021 at 6:47 PM Nick Desaulniers <ndesaulniers@google.com> wrote:
> >
> > On Wed, Jun 2, 2021 at 3:38 AM Sergio Paracuellos
> > <sergio.paracuellos@gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > On Wed, Jun 2, 2021 at 12:27 PM kernel test robot <lkp@intel.com> wrote:
> > > >
> > > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > > head:   ed5d0667a6540293c9485dd95babb5f1e241226a
> > > > commit: 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a [1932/6331] phy: ralink: Kconfig: enable COMPILE_TEST on mt7621-pci-phy driver
> > > > config: x86_64-randconfig-r016-20210602 (attached as .config)
> >
> > ^ randconfig
> >
> > > > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project db26cd30b6dd65e88d786e97a1e453af5cd48966)
> > > > 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=28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
> > > >         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 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
> > > >         # 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/phy/ralink/phy-mt7621-pci.c:277:4: warning: cast to smaller integer type 'unsigned int' from 'void *' [-Wvoid-pointer-to-int-cast]
> > > >                     (unsigned int)mt7621_phy->port_base, mt7621_phy->has_dual_port);
> > > >                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > >    include/linux/dev_printk.h:118:33: note: expanded from macro 'dev_info'
> > > >            _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
> > >
> > > Already fixed in:
> > > https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git/commit/drivers/phy/ralink/phy-mt7621-pci.c?h=next&id=652a6a2e3824ce2ebf79a2d5326940d05c4db036
> > >
> > > >                                           ^~~~~~~~~~~
> > > > >> drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids' [-Wunused-const-variable]
> > > >    static const struct of_device_id mt7621_pci_phy_ids[] = {
> > > >                                     ^
> > >
> > > Mmmm... This one is used through MODULE_DEVICE_TABLE macro... Am I
> > > missing something??
> >
> > Pretty sure there's a config in MODULE_DEVICE_TABLE that's being
> > disabled by the randconfig; the definition of mt7621_pci_phy_ids
> > should also be behind preprocessor checks for that.
>
> So, the driver uses 'mt7621_pci_phy_ids' in two places :
>
> static const struct of_device_id mt7621_pci_phy_ids[] = {
>     { .compatible = "mediatek,mt7621-pci-phy" },
>     {},
> };
> MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids);
> ^
> This one is inside the 'MODULE' preprocessor directive.
>
> static struct platform_driver mt7621_pci_phy_driver = {
>     .probe = mt7621_pci_phy_probe,
>     .driver = {
>         .name = "mt7621-pci-phy",
>         .of_match_table = of_match_ptr(mt7621_pci_phy_ids),
>                                      ^
>                                      This one is inside 'CONFIG_OF'
>     },
> };
>
> randconfig is not setting 'CONFIG_OF' nor defining MODULE. I've been

^ yeah gating the definition on CONFIG_OF would resolve this.

> looking into different drivers code and all of them follow the same
> pattern and nothing is behind preprocessor checks at all. So I wonder

They are starting to when they get these warnings from 0day bot;
there's a lot of drivers though.

> if this is really something that needs to be fixed.

It's a W=1 build as well; fix it or don't.  I'm a sign, not a cop.

>
> Thanks in advance for clarifications.
>
> Best regards,
>     Sergio Paracuellos
>
>
> >
> > >
> > > >    2 warnings generated.
> > > >
> > > >
> > > > vim +/mt7621_pci_phy_ids +341 drivers/phy/ralink/phy-mt7621-pci.c
> > > >
> > > > d87da32372a03c Sergio Paracuellos 2020-11-21  340
> > > > d87da32372a03c Sergio Paracuellos 2020-11-21 @341  static const struct of_device_id mt7621_pci_phy_ids[] = {
> > > > d87da32372a03c Sergio Paracuellos 2020-11-21  342       { .compatible = "mediatek,mt7621-pci-phy" },
> > > > d87da32372a03c Sergio Paracuellos 2020-11-21  343       {},
> > > > d87da32372a03c Sergio Paracuellos 2020-11-21  344  };
> > > > 8145dcb07d0c8b Sergio Paracuellos 2020-12-01  345  MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids);
> > > > d87da32372a03c Sergio Paracuellos 2020-11-21  346
> > > >
> > > > :::::: The code at line 341 was first introduced by commit
> > > > :::::: d87da32372a03ce121fc65ccd2c9a43edf56b364 phy: ralink: Add PHY driver for MT7621 PCIe PHY
> > > >
> > > > :::::: TO: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > > > :::::: CC: Vinod Koul <vkoul@kernel.org>
> > > >
> > > > ---
> > > > 0-DAY CI Kernel Test Service, Intel Corporation
> > > > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
> > >
> > > Best regards,
> > >     Sergio Paracuellos
> > >
> > > --
> > > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com.
> > > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAMhs-H8qyOKQmPtChYO%2BjfC%2BZmj8U9yGeZJORUx14MzyLeT5QA%40mail.gmail.com.
> >
> >
> >
> > --
> > Thanks,
> > ~Nick Desaulniers



-- 
Thanks,
~Nick Desaulniers


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

* Re: [linux-next:master 1932/6331] drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids'
@ 2021-06-02 18:17         ` Nick Desaulniers
  0 siblings, 0 replies; 12+ messages in thread
From: Nick Desaulniers @ 2021-06-02 18:17 UTC (permalink / raw)
  To: kbuild-all

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

On Wed, Jun 2, 2021 at 11:09 AM Sergio Paracuellos
<sergio.paracuellos@gmail.com> wrote:
>
> Hi Nick,
>
> On Wed, Jun 2, 2021 at 6:47 PM Nick Desaulniers <ndesaulniers@google.com> wrote:
> >
> > On Wed, Jun 2, 2021 at 3:38 AM Sergio Paracuellos
> > <sergio.paracuellos@gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > On Wed, Jun 2, 2021 at 12:27 PM kernel test robot <lkp@intel.com> wrote:
> > > >
> > > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > > head:   ed5d0667a6540293c9485dd95babb5f1e241226a
> > > > commit: 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a [1932/6331] phy: ralink: Kconfig: enable COMPILE_TEST on mt7621-pci-phy driver
> > > > config: x86_64-randconfig-r016-20210602 (attached as .config)
> >
> > ^ randconfig
> >
> > > > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project db26cd30b6dd65e88d786e97a1e453af5cd48966)
> > > > 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=28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
> > > >         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 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
> > > >         # 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/phy/ralink/phy-mt7621-pci.c:277:4: warning: cast to smaller integer type 'unsigned int' from 'void *' [-Wvoid-pointer-to-int-cast]
> > > >                     (unsigned int)mt7621_phy->port_base, mt7621_phy->has_dual_port);
> > > >                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > >    include/linux/dev_printk.h:118:33: note: expanded from macro 'dev_info'
> > > >            _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
> > >
> > > Already fixed in:
> > > https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git/commit/drivers/phy/ralink/phy-mt7621-pci.c?h=next&id=652a6a2e3824ce2ebf79a2d5326940d05c4db036
> > >
> > > >                                           ^~~~~~~~~~~
> > > > >> drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids' [-Wunused-const-variable]
> > > >    static const struct of_device_id mt7621_pci_phy_ids[] = {
> > > >                                     ^
> > >
> > > Mmmm... This one is used through MODULE_DEVICE_TABLE macro... Am I
> > > missing something??
> >
> > Pretty sure there's a config in MODULE_DEVICE_TABLE that's being
> > disabled by the randconfig; the definition of mt7621_pci_phy_ids
> > should also be behind preprocessor checks for that.
>
> So, the driver uses 'mt7621_pci_phy_ids' in two places :
>
> static const struct of_device_id mt7621_pci_phy_ids[] = {
>     { .compatible = "mediatek,mt7621-pci-phy" },
>     {},
> };
> MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids);
> ^
> This one is inside the 'MODULE' preprocessor directive.
>
> static struct platform_driver mt7621_pci_phy_driver = {
>     .probe = mt7621_pci_phy_probe,
>     .driver = {
>         .name = "mt7621-pci-phy",
>         .of_match_table = of_match_ptr(mt7621_pci_phy_ids),
>                                      ^
>                                      This one is inside 'CONFIG_OF'
>     },
> };
>
> randconfig is not setting 'CONFIG_OF' nor defining MODULE. I've been

^ yeah gating the definition on CONFIG_OF would resolve this.

> looking into different drivers code and all of them follow the same
> pattern and nothing is behind preprocessor checks at all. So I wonder

They are starting to when they get these warnings from 0day bot;
there's a lot of drivers though.

> if this is really something that needs to be fixed.

It's a W=1 build as well; fix it or don't.  I'm a sign, not a cop.

>
> Thanks in advance for clarifications.
>
> Best regards,
>     Sergio Paracuellos
>
>
> >
> > >
> > > >    2 warnings generated.
> > > >
> > > >
> > > > vim +/mt7621_pci_phy_ids +341 drivers/phy/ralink/phy-mt7621-pci.c
> > > >
> > > > d87da32372a03c Sergio Paracuellos 2020-11-21  340
> > > > d87da32372a03c Sergio Paracuellos 2020-11-21 @341  static const struct of_device_id mt7621_pci_phy_ids[] = {
> > > > d87da32372a03c Sergio Paracuellos 2020-11-21  342       { .compatible = "mediatek,mt7621-pci-phy" },
> > > > d87da32372a03c Sergio Paracuellos 2020-11-21  343       {},
> > > > d87da32372a03c Sergio Paracuellos 2020-11-21  344  };
> > > > 8145dcb07d0c8b Sergio Paracuellos 2020-12-01  345  MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids);
> > > > d87da32372a03c Sergio Paracuellos 2020-11-21  346
> > > >
> > > > :::::: The code at line 341 was first introduced by commit
> > > > :::::: d87da32372a03ce121fc65ccd2c9a43edf56b364 phy: ralink: Add PHY driver for MT7621 PCIe PHY
> > > >
> > > > :::::: TO: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > > > :::::: CC: Vinod Koul <vkoul@kernel.org>
> > > >
> > > > ---
> > > > 0-DAY CI Kernel Test Service, Intel Corporation
> > > > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
> > >
> > > Best regards,
> > >     Sergio Paracuellos
> > >
> > > --
> > > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe(a)googlegroups.com.
> > > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAMhs-H8qyOKQmPtChYO%2BjfC%2BZmj8U9yGeZJORUx14MzyLeT5QA%40mail.gmail.com.
> >
> >
> >
> > --
> > Thanks,
> > ~Nick Desaulniers



-- 
Thanks,
~Nick Desaulniers

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

* Re: [linux-next:master 1932/6331] drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids'
  2021-06-02 18:17         ` Nick Desaulniers
@ 2021-06-03  4:18           ` Sergio Paracuellos
  -1 siblings, 0 replies; 12+ messages in thread
From: Sergio Paracuellos @ 2021-06-03  4:18 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: kernel test robot, kbuild-all, clang-built-linux,
	Linux Memory Management List, Vinod Koul

Hi Nick,

On Wed, Jun 2, 2021 at 8:18 PM Nick Desaulniers <ndesaulniers@google.com> wrote:
>
> On Wed, Jun 2, 2021 at 11:09 AM Sergio Paracuellos
> <sergio.paracuellos@gmail.com> wrote:
> >
> > Hi Nick,
> >
> > On Wed, Jun 2, 2021 at 6:47 PM Nick Desaulniers <ndesaulniers@google.com> wrote:
> > >
> > > On Wed, Jun 2, 2021 at 3:38 AM Sergio Paracuellos
> > > <sergio.paracuellos@gmail.com> wrote:
> > > >
> > > > Hi,
> > > >
> > > > On Wed, Jun 2, 2021 at 12:27 PM kernel test robot <lkp@intel.com> wrote:
> > > > >
> > > > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > > > head:   ed5d0667a6540293c9485dd95babb5f1e241226a
> > > > > commit: 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a [1932/6331] phy: ralink: Kconfig: enable COMPILE_TEST on mt7621-pci-phy driver
> > > > > config: x86_64-randconfig-r016-20210602 (attached as .config)
> > >
> > > ^ randconfig
> > >
> > > > > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project db26cd30b6dd65e88d786e97a1e453af5cd48966)
> > > > > 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=28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
> > > > >         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 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
> > > > >         # 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/phy/ralink/phy-mt7621-pci.c:277:4: warning: cast to smaller integer type 'unsigned int' from 'void *' [-Wvoid-pointer-to-int-cast]
> > > > >                     (unsigned int)mt7621_phy->port_base, mt7621_phy->has_dual_port);
> > > > >                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > >    include/linux/dev_printk.h:118:33: note: expanded from macro 'dev_info'
> > > > >            _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
> > > >
> > > > Already fixed in:
> > > > https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git/commit/drivers/phy/ralink/phy-mt7621-pci.c?h=next&id=652a6a2e3824ce2ebf79a2d5326940d05c4db036
> > > >
> > > > >                                           ^~~~~~~~~~~
> > > > > >> drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids' [-Wunused-const-variable]
> > > > >    static const struct of_device_id mt7621_pci_phy_ids[] = {
> > > > >                                     ^
> > > >
> > > > Mmmm... This one is used through MODULE_DEVICE_TABLE macro... Am I
> > > > missing something??
> > >
> > > Pretty sure there's a config in MODULE_DEVICE_TABLE that's being
> > > disabled by the randconfig; the definition of mt7621_pci_phy_ids
> > > should also be behind preprocessor checks for that.
> >
> > So, the driver uses 'mt7621_pci_phy_ids' in two places :
> >
> > static const struct of_device_id mt7621_pci_phy_ids[] = {
> >     { .compatible = "mediatek,mt7621-pci-phy" },
> >     {},
> > };
> > MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids);
> > ^
> > This one is inside the 'MODULE' preprocessor directive.
> >
> > static struct platform_driver mt7621_pci_phy_driver = {
> >     .probe = mt7621_pci_phy_probe,
> >     .driver = {
> >         .name = "mt7621-pci-phy",
> >         .of_match_table = of_match_ptr(mt7621_pci_phy_ids),
> >                                      ^
> >                                      This one is inside 'CONFIG_OF'
> >     },
> > };
> >
> > randconfig is not setting 'CONFIG_OF' nor defining MODULE. I've been
>
> ^ yeah gating the definition on CONFIG_OF would resolve this.
>
> > looking into different drivers code and all of them follow the same
> > pattern and nothing is behind preprocessor checks at all. So I wonder
>
> They are starting to when they get these warnings from 0day bot;
> there's a lot of drivers though.

I see. Thanks for clarification. I will search for a driver already
fixing this and send a similar patch to silence this one also.

>
> > if this is really something that needs to be fixed.
>
> It's a W=1 build as well; fix it or don't.  I'm a sign, not a cop.
>

Thank you very much for your help.

Best regards,
    Sergio Paracuellos

> >
> > Thanks in advance for clarifications.
> >
> > Best regards,
> >     Sergio Paracuellos
> >
> >
> > >
> > > >
> > > > >    2 warnings generated.
> > > > >
> > > > >
> > > > > vim +/mt7621_pci_phy_ids +341 drivers/phy/ralink/phy-mt7621-pci.c
> > > > >
> > > > > d87da32372a03c Sergio Paracuellos 2020-11-21  340
> > > > > d87da32372a03c Sergio Paracuellos 2020-11-21 @341  static const struct of_device_id mt7621_pci_phy_ids[] = {
> > > > > d87da32372a03c Sergio Paracuellos 2020-11-21  342       { .compatible = "mediatek,mt7621-pci-phy" },
> > > > > d87da32372a03c Sergio Paracuellos 2020-11-21  343       {},
> > > > > d87da32372a03c Sergio Paracuellos 2020-11-21  344  };
> > > > > 8145dcb07d0c8b Sergio Paracuellos 2020-12-01  345  MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids);
> > > > > d87da32372a03c Sergio Paracuellos 2020-11-21  346
> > > > >
> > > > > :::::: The code at line 341 was first introduced by commit
> > > > > :::::: d87da32372a03ce121fc65ccd2c9a43edf56b364 phy: ralink: Add PHY driver for MT7621 PCIe PHY
> > > > >
> > > > > :::::: TO: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > > > > :::::: CC: Vinod Koul <vkoul@kernel.org>
> > > > >
> > > > > ---
> > > > > 0-DAY CI Kernel Test Service, Intel Corporation
> > > > > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
> > > >
> > > > Best regards,
> > > >     Sergio Paracuellos
> > > >
> > > > --
> > > > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> > > > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com.
> > > > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAMhs-H8qyOKQmPtChYO%2BjfC%2BZmj8U9yGeZJORUx14MzyLeT5QA%40mail.gmail.com.
> > >
> > >
> > >
> > > --
> > > Thanks,
> > > ~Nick Desaulniers
>
>
>
> --
> Thanks,
> ~Nick Desaulniers


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

* Re: [linux-next:master 1932/6331] drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids'
@ 2021-06-03  4:18           ` Sergio Paracuellos
  0 siblings, 0 replies; 12+ messages in thread
From: Sergio Paracuellos @ 2021-06-03  4:18 UTC (permalink / raw)
  To: kbuild-all

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

Hi Nick,

On Wed, Jun 2, 2021 at 8:18 PM Nick Desaulniers <ndesaulniers@google.com> wrote:
>
> On Wed, Jun 2, 2021 at 11:09 AM Sergio Paracuellos
> <sergio.paracuellos@gmail.com> wrote:
> >
> > Hi Nick,
> >
> > On Wed, Jun 2, 2021 at 6:47 PM Nick Desaulniers <ndesaulniers@google.com> wrote:
> > >
> > > On Wed, Jun 2, 2021 at 3:38 AM Sergio Paracuellos
> > > <sergio.paracuellos@gmail.com> wrote:
> > > >
> > > > Hi,
> > > >
> > > > On Wed, Jun 2, 2021 at 12:27 PM kernel test robot <lkp@intel.com> wrote:
> > > > >
> > > > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > > > head:   ed5d0667a6540293c9485dd95babb5f1e241226a
> > > > > commit: 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a [1932/6331] phy: ralink: Kconfig: enable COMPILE_TEST on mt7621-pci-phy driver
> > > > > config: x86_64-randconfig-r016-20210602 (attached as .config)
> > >
> > > ^ randconfig
> > >
> > > > > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project db26cd30b6dd65e88d786e97a1e453af5cd48966)
> > > > > 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=28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
> > > > >         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 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a
> > > > >         # 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/phy/ralink/phy-mt7621-pci.c:277:4: warning: cast to smaller integer type 'unsigned int' from 'void *' [-Wvoid-pointer-to-int-cast]
> > > > >                     (unsigned int)mt7621_phy->port_base, mt7621_phy->has_dual_port);
> > > > >                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > >    include/linux/dev_printk.h:118:33: note: expanded from macro 'dev_info'
> > > > >            _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
> > > >
> > > > Already fixed in:
> > > > https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git/commit/drivers/phy/ralink/phy-mt7621-pci.c?h=next&id=652a6a2e3824ce2ebf79a2d5326940d05c4db036
> > > >
> > > > >                                           ^~~~~~~~~~~
> > > > > >> drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids' [-Wunused-const-variable]
> > > > >    static const struct of_device_id mt7621_pci_phy_ids[] = {
> > > > >                                     ^
> > > >
> > > > Mmmm... This one is used through MODULE_DEVICE_TABLE macro... Am I
> > > > missing something??
> > >
> > > Pretty sure there's a config in MODULE_DEVICE_TABLE that's being
> > > disabled by the randconfig; the definition of mt7621_pci_phy_ids
> > > should also be behind preprocessor checks for that.
> >
> > So, the driver uses 'mt7621_pci_phy_ids' in two places :
> >
> > static const struct of_device_id mt7621_pci_phy_ids[] = {
> >     { .compatible = "mediatek,mt7621-pci-phy" },
> >     {},
> > };
> > MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids);
> > ^
> > This one is inside the 'MODULE' preprocessor directive.
> >
> > static struct platform_driver mt7621_pci_phy_driver = {
> >     .probe = mt7621_pci_phy_probe,
> >     .driver = {
> >         .name = "mt7621-pci-phy",
> >         .of_match_table = of_match_ptr(mt7621_pci_phy_ids),
> >                                      ^
> >                                      This one is inside 'CONFIG_OF'
> >     },
> > };
> >
> > randconfig is not setting 'CONFIG_OF' nor defining MODULE. I've been
>
> ^ yeah gating the definition on CONFIG_OF would resolve this.
>
> > looking into different drivers code and all of them follow the same
> > pattern and nothing is behind preprocessor checks at all. So I wonder
>
> They are starting to when they get these warnings from 0day bot;
> there's a lot of drivers though.

I see. Thanks for clarification. I will search for a driver already
fixing this and send a similar patch to silence this one also.

>
> > if this is really something that needs to be fixed.
>
> It's a W=1 build as well; fix it or don't.  I'm a sign, not a cop.
>

Thank you very much for your help.

Best regards,
    Sergio Paracuellos

> >
> > Thanks in advance for clarifications.
> >
> > Best regards,
> >     Sergio Paracuellos
> >
> >
> > >
> > > >
> > > > >    2 warnings generated.
> > > > >
> > > > >
> > > > > vim +/mt7621_pci_phy_ids +341 drivers/phy/ralink/phy-mt7621-pci.c
> > > > >
> > > > > d87da32372a03c Sergio Paracuellos 2020-11-21  340
> > > > > d87da32372a03c Sergio Paracuellos 2020-11-21 @341  static const struct of_device_id mt7621_pci_phy_ids[] = {
> > > > > d87da32372a03c Sergio Paracuellos 2020-11-21  342       { .compatible = "mediatek,mt7621-pci-phy" },
> > > > > d87da32372a03c Sergio Paracuellos 2020-11-21  343       {},
> > > > > d87da32372a03c Sergio Paracuellos 2020-11-21  344  };
> > > > > 8145dcb07d0c8b Sergio Paracuellos 2020-12-01  345  MODULE_DEVICE_TABLE(of, mt7621_pci_phy_ids);
> > > > > d87da32372a03c Sergio Paracuellos 2020-11-21  346
> > > > >
> > > > > :::::: The code at line 341 was first introduced by commit
> > > > > :::::: d87da32372a03ce121fc65ccd2c9a43edf56b364 phy: ralink: Add PHY driver for MT7621 PCIe PHY
> > > > >
> > > > > :::::: TO: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > > > > :::::: CC: Vinod Koul <vkoul@kernel.org>
> > > > >
> > > > > ---
> > > > > 0-DAY CI Kernel Test Service, Intel Corporation
> > > > > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
> > > >
> > > > Best regards,
> > > >     Sergio Paracuellos
> > > >
> > > > --
> > > > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> > > > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe(a)googlegroups.com.
> > > > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAMhs-H8qyOKQmPtChYO%2BjfC%2BZmj8U9yGeZJORUx14MzyLeT5QA%40mail.gmail.com.
> > >
> > >
> > >
> > > --
> > > Thanks,
> > > ~Nick Desaulniers
>
>
>
> --
> Thanks,
> ~Nick Desaulniers

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

end of thread, other threads:[~2021-06-03  4:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02 10:26 [linux-next:master 1932/6331] drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids' kernel test robot
2021-06-02 10:26 ` kernel test robot
2021-06-02 10:38 ` Sergio Paracuellos
2021-06-02 10:38   ` Sergio Paracuellos
2021-06-02 16:47   ` Nick Desaulniers
2021-06-02 16:47     ` Nick Desaulniers
2021-06-02 18:08     ` Sergio Paracuellos
2021-06-02 18:08       ` Sergio Paracuellos
2021-06-02 18:17       ` Nick Desaulniers
2021-06-02 18:17         ` Nick Desaulniers
2021-06-03  4:18         ` Sergio Paracuellos
2021-06-03  4:18           ` Sergio Paracuellos

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.