lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 21 Jun 2022 00:24:42 +0800
From:   kernel test robot <lkp@...el.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Linus Walleij <linus.walleij@...aro.org>
Subject: drivers/soc/ixp4xx/ixp4xx-npe.c:737:34: warning:
 'ixp4xx_npe_of_match' defined but not used

Hi Arnd,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4b35035bcf80ddb47c0112c4fbd84a63a2836a18
commit: 7f94b69ece515ac82defa60ef7cba2cf26180216 ARM: ixp4xx: fix compile-testing soc drivers
date:   11 months ago
config: x86_64-buildonly-randconfig-r003-20220620 (https://download.01.org/0day-ci/archive/20220621/202206210010.piIa6O1b-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7f94b69ece515ac82defa60ef7cba2cf26180216
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 7f94b69ece515ac82defa60ef7cba2cf26180216
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/rockchip/ drivers/irqchip/ drivers/soc/ixp4xx/ kernel/sched/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   drivers/soc/ixp4xx/ixp4xx-npe.c:696:25: note: in expansion of macro 'dev_info'
     696 |                         dev_info(dev, "NPE%d at 0x%08x-0x%08x not available\n",
         |                         ^~~~~~~~
   drivers/soc/ixp4xx/ixp4xx-npe.c:696:54: note: format string is defined here
     696 |                         dev_info(dev, "NPE%d at 0x%08x-0x%08x not available\n",
         |                                                   ~~~^
         |                                                      |
         |                                                      unsigned int
         |                                                   %08llx
   In file included from include/linux/device.h:15,
                    from include/linux/dma-mapping.h:7,
                    from drivers/soc/ixp4xx/ixp4xx-npe.c:15:
   drivers/soc/ixp4xx/ixp4xx-npe.c:696:39: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
     696 |                         dev_info(dev, "NPE%d at 0x%08x-0x%08x not available\n",
         |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
      19 | #define dev_fmt(fmt) fmt
         |                      ^~~
   drivers/soc/ixp4xx/ixp4xx-npe.c:696:25: note: in expansion of macro 'dev_info'
     696 |                         dev_info(dev, "NPE%d at 0x%08x-0x%08x not available\n",
         |                         ^~~~~~~~
   drivers/soc/ixp4xx/ixp4xx-npe.c:696:61: note: format string is defined here
     696 |                         dev_info(dev, "NPE%d at 0x%08x-0x%08x not available\n",
         |                                                          ~~~^
         |                                                             |
         |                                                             unsigned int
         |                                                          %08llx
   In file included from include/linux/device.h:15,
                    from include/linux/dma-mapping.h:7,
                    from drivers/soc/ixp4xx/ixp4xx-npe.c:15:
   drivers/soc/ixp4xx/ixp4xx-npe.c:705:39: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
     705 |                         dev_info(dev, "NPE%d at 0x%08x-0x%08x does not reset\n",
         |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
      19 | #define dev_fmt(fmt) fmt
         |                      ^~~
   drivers/soc/ixp4xx/ixp4xx-npe.c:705:25: note: in expansion of macro 'dev_info'
     705 |                         dev_info(dev, "NPE%d at 0x%08x-0x%08x does not reset\n",
         |                         ^~~~~~~~
   drivers/soc/ixp4xx/ixp4xx-npe.c:705:54: note: format string is defined here
     705 |                         dev_info(dev, "NPE%d at 0x%08x-0x%08x does not reset\n",
         |                                                   ~~~^
         |                                                      |
         |                                                      unsigned int
         |                                                   %08llx
   In file included from include/linux/device.h:15,
                    from include/linux/dma-mapping.h:7,
                    from drivers/soc/ixp4xx/ixp4xx-npe.c:15:
   drivers/soc/ixp4xx/ixp4xx-npe.c:705:39: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
     705 |                         dev_info(dev, "NPE%d at 0x%08x-0x%08x does not reset\n",
         |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
      19 | #define dev_fmt(fmt) fmt
         |                      ^~~
   drivers/soc/ixp4xx/ixp4xx-npe.c:705:25: note: in expansion of macro 'dev_info'
     705 |                         dev_info(dev, "NPE%d at 0x%08x-0x%08x does not reset\n",
         |                         ^~~~~~~~
   drivers/soc/ixp4xx/ixp4xx-npe.c:705:61: note: format string is defined here
     705 |                         dev_info(dev, "NPE%d at 0x%08x-0x%08x does not reset\n",
         |                                                          ~~~^
         |                                                             |
         |                                                             unsigned int
         |                                                          %08llx
   In file included from include/linux/device.h:15,
                    from include/linux/dma-mapping.h:7,
                    from drivers/soc/ixp4xx/ixp4xx-npe.c:15:
   drivers/soc/ixp4xx/ixp4xx-npe.c:710:31: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
     710 |                 dev_info(dev, "NPE%d at 0x%08x-0x%08x registered\n",
         |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
      19 | #define dev_fmt(fmt) fmt
         |                      ^~~
   drivers/soc/ixp4xx/ixp4xx-npe.c:710:17: note: in expansion of macro 'dev_info'
     710 |                 dev_info(dev, "NPE%d at 0x%08x-0x%08x registered\n",
         |                 ^~~~~~~~
   drivers/soc/ixp4xx/ixp4xx-npe.c:710:46: note: format string is defined here
     710 |                 dev_info(dev, "NPE%d at 0x%08x-0x%08x registered\n",
         |                                           ~~~^
         |                                              |
         |                                              unsigned int
         |                                           %08llx
   In file included from include/linux/device.h:15,
                    from include/linux/dma-mapping.h:7,
                    from drivers/soc/ixp4xx/ixp4xx-npe.c:15:
   drivers/soc/ixp4xx/ixp4xx-npe.c:710:31: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
     710 |                 dev_info(dev, "NPE%d at 0x%08x-0x%08x registered\n",
         |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
      19 | #define dev_fmt(fmt) fmt
         |                      ^~~
   drivers/soc/ixp4xx/ixp4xx-npe.c:710:17: note: in expansion of macro 'dev_info'
     710 |                 dev_info(dev, "NPE%d at 0x%08x-0x%08x registered\n",
         |                 ^~~~~~~~
   drivers/soc/ixp4xx/ixp4xx-npe.c:710:53: note: format string is defined here
     710 |                 dev_info(dev, "NPE%d at 0x%08x-0x%08x registered\n",
         |                                                  ~~~^
         |                                                     |
         |                                                     unsigned int
         |                                                  %08llx
   At top level:
>> drivers/soc/ixp4xx/ixp4xx-npe.c:737:34: warning: 'ixp4xx_npe_of_match' defined but not used [-Wunused-const-variable=]
     737 | static const struct of_device_id ixp4xx_npe_of_match[] = {
         |                                  ^~~~~~~~~~~~~~~~~~~


vim +/ixp4xx_npe_of_match +737 drivers/soc/ixp4xx/ixp4xx-npe.c

82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  679  
bc4d7eafb7ad59 drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  680  static int ixp4xx_npe_probe(struct platform_device *pdev)
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  681  {
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  682  	int i, found = 0;
0b458d7b10f83e drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  683  	struct device *dev = &pdev->dev;
76f24b4f46b8ca drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2021-05-25  684  	struct device_node *np = dev->of_node;
0b458d7b10f83e drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  685  	struct resource *res;
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  686  
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  687  	for (i = 0; i < NPE_COUNT; i++) {
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  688  		struct npe *npe = &npe_tab[i];
0b458d7b10f83e drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  689  
0b458d7b10f83e drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  690  		res = platform_get_resource(pdev, IORESOURCE_MEM, i);
0b458d7b10f83e drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  691  		if (!res)
0b458d7b10f83e drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  692  			return -ENODEV;
0b458d7b10f83e drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  693  
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  694  		if (!(ixp4xx_read_feature_bits() &
0b458d7b10f83e drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  695  		      (IXP4XX_FEATURE_RESET_NPEA << i))) {
0b458d7b10f83e drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  696  			dev_info(dev, "NPE%d at 0x%08x-0x%08x not available\n",
0b458d7b10f83e drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  697  				 i, res->start, res->end);
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  698  			continue; /* NPE already disabled or not present */
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  699  		}
0b458d7b10f83e drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  700  		npe->regs = devm_ioremap_resource(dev, res);
cd3967bee004bc drivers/soc/ixp4xx/ixp4xx-npe.c   Dan Carpenter    2019-06-18  701  		if (IS_ERR(npe->regs))
cd3967bee004bc drivers/soc/ixp4xx/ixp4xx-npe.c   Dan Carpenter    2019-06-18  702  			return PTR_ERR(npe->regs);
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  703  
0b458d7b10f83e drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  704  		if (npe_reset(npe)) {
0b458d7b10f83e drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  705  			dev_info(dev, "NPE%d at 0x%08x-0x%08x does not reset\n",
0b458d7b10f83e drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  706  				 i, res->start, res->end);
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  707  			continue;
0b458d7b10f83e drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  708  		}
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  709  		npe->valid = 1;
0b458d7b10f83e drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10 @710  		dev_info(dev, "NPE%d at 0x%08x-0x%08x registered\n",
0b458d7b10f83e drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  711  			 i, res->start, res->end);
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  712  		found++;
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  713  	}
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  714  
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  715  	if (!found)
3ba8c792055286 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof HaƂasa 2009-04-28  716  		return -ENODEV;
76f24b4f46b8ca drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2021-05-25  717  
76f24b4f46b8ca drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2021-05-25  718  	/* Spawn crypto subdevice if using device tree */
76f24b4f46b8ca drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2021-05-25  719  	if (IS_ENABLED(CONFIG_OF) && np)
76f24b4f46b8ca drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2021-05-25  720  		devm_of_platform_populate(dev);
76f24b4f46b8ca drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2021-05-25  721  
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  722  	return 0;
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  723  }
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  724  
bc4d7eafb7ad59 drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  725  static int ixp4xx_npe_remove(struct platform_device *pdev)
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  726  {
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  727  	int i;
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  728  
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  729  	for (i = 0; i < NPE_COUNT; i++)
0b458d7b10f83e drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  730  		if (npe_tab[i].regs) {
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  731  			npe_reset(&npe_tab[i]);
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  732  		}
bc4d7eafb7ad59 drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  733  
bc4d7eafb7ad59 drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  734  	return 0;
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  735  }
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01  736  
e00797f2e05b7f drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10 @737  static const struct of_device_id ixp4xx_npe_of_match[] = {
e00797f2e05b7f drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  738  	{
e00797f2e05b7f drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  739  		.compatible = "intel,ixp4xx-network-processing-engine",
e00797f2e05b7f drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  740          },
e00797f2e05b7f drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  741  	{},
e00797f2e05b7f drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  742  };
e00797f2e05b7f drivers/soc/ixp4xx/ixp4xx-npe.c   Linus Walleij    2019-02-10  743  

:::::: The code at line 737 was first introduced by commit
:::::: e00797f2e05b7f3758bb96e6248aff8d95999cec soc: ixp4xx: npe: Add DT probe code

:::::: TO: Linus Walleij <linus.walleij@...aro.org>
:::::: CC: Linus Walleij <linus.walleij@...aro.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ