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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 14 Oct 2022 10:27:02 +0800
From:   kernel test robot <lkp@...el.com>
To:     Nathan Chancellor <nathan@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>
Cc:     kbuild-all@...ts.01.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, Matt Flax <flatmax@...tmax.com>,
        Nathan Chancellor <nathan@...nel.org>
Subject: Re: [PATCH] of: Define of_match_ptr() with PTR_IF() to avoid unused
 variable warnings

Hi Nathan,

I love your patch! Yet something to improve:

[auto build test ERROR on 4fe89d07dcc2804c8b562f6c7896a45643d34b2f]

url:    https://github.com/intel-lab-lkp/linux/commits/Nathan-Chancellor/of-Define-of_match_ptr-with-PTR_IF-to-avoid-unused-variable-warnings/20221014-035324
base:   4fe89d07dcc2804c8b562f6c7896a45643d34b2f
config: m68k-randconfig-r005-20221012
compiler: m68k-linux-gcc (GCC) 12.1.0
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
        # https://github.com/intel-lab-lkp/linux/commit/d312b5902005bf2f4497687edc1b1df76baa337b
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Nathan-Chancellor/of-Define-of_match_ptr-with-PTR_IF-to-avoid-unused-variable-warnings/20221014-035324
        git checkout d312b5902005bf2f4497687edc1b1df76baa337b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/char/tpm/ drivers/fpga/ drivers/gpio/ drivers/hwmon/ drivers/input/joystick/ drivers/media/i2c/ drivers/media/radio/si470x/ drivers/mfd/ drivers/misc/lis3lv02d/ drivers/regulator/ drivers/spi/ drivers/uio/

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

All errors (new ones prefixed by >>):

   In file included from include/linux/cpumask.h:10,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/rcupdate.h:29,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/delay.h:23,
                    from drivers/fpga/xilinx-spi.c:13:
>> drivers/fpga/xilinx-spi.c:267:48: error: 'xlnx_spi_of_match' undeclared here (not in a function)
     267 |                 .of_match_table = of_match_ptr(xlnx_spi_of_match),
         |                                                ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:57:44: note: in definition of macro 'PTR_IF'
      57 | #define PTR_IF(cond, ptr)       ((cond) ? (ptr) : NULL)
         |                                            ^~~
   drivers/fpga/xilinx-spi.c:267:35: note: in expansion of macro 'of_match_ptr'
     267 |                 .of_match_table = of_match_ptr(xlnx_spi_of_match),
         |                                   ^~~~~~~~~~~~
--
   In file included from include/linux/cpumask.h:10,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/rcupdate.h:29,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/delay.h:23,
                    from drivers/fpga/microchip-spi.c:7:
>> drivers/fpga/microchip-spi.c:391:48: error: 'mpf_of_ids' undeclared here (not in a function); did you mean 'mpf_spi_ids'?
     391 |                 .of_match_table = of_match_ptr(mpf_of_ids),
         |                                                ^~~~~~~~~~
   include/linux/kernel.h:57:44: note: in definition of macro 'PTR_IF'
      57 | #define PTR_IF(cond, ptr)       ((cond) ? (ptr) : NULL)
         |                                            ^~~
   drivers/fpga/microchip-spi.c:391:35: note: in expansion of macro 'of_match_ptr'
     391 |                 .of_match_table = of_match_ptr(mpf_of_ids),
         |                                   ^~~~~~~~~~~~
--
   In file included from drivers/gpio/gpio-mmio.c:46:
>> drivers/gpio/gpio-mmio.c:810:48: error: 'bgpio_of_match' undeclared here (not in a function)
     810 |                 .of_match_table = of_match_ptr(bgpio_of_match),
         |                                                ^~~~~~~~~~~~~~
   include/linux/kernel.h:57:44: note: in definition of macro 'PTR_IF'
      57 | #define PTR_IF(cond, ptr)       ((cond) ? (ptr) : NULL)
         |                                            ^~~
   drivers/gpio/gpio-mmio.c:810:35: note: in expansion of macro 'of_match_ptr'
     810 |                 .of_match_table = of_match_ptr(bgpio_of_match),
         |                                   ^~~~~~~~~~~~
--
   In file included from include/linux/cpumask.h:10,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/rcupdate.h:29,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/gpio/driver.h:5,
                    from drivers/gpio/gpio-max3191x.c:37:
>> drivers/gpio/gpio-max3191x.c:487:48: error: 'max3191x_of_id' undeclared here (not in a function); did you mean 'max3191x_spi_id'?
     487 |                 .of_match_table = of_match_ptr(max3191x_of_id),
         |                                                ^~~~~~~~~~~~~~
   include/linux/kernel.h:57:44: note: in definition of macro 'PTR_IF'
      57 | #define PTR_IF(cond, ptr)       ((cond) ? (ptr) : NULL)
         |                                            ^~~
   drivers/gpio/gpio-max3191x.c:487:35: note: in expansion of macro 'of_match_ptr'
     487 |                 .of_match_table = of_match_ptr(max3191x_of_id),
         |                                   ^~~~~~~~~~~~
--
   In file included from include/linux/cpumask.h:10,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/mutex.h:17,
                    from include/linux/kernfs.h:11,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/of.h:18,
                    from include/linux/irqdomain.h:35,
                    from include/linux/acpi.h:13,
                    from include/linux/i2c.h:13,
                    from drivers/char/tpm/tpm_tis_i2c.c:13:
>> drivers/char/tpm/tpm_tis_i2c.c:381:48: error: 'of_tis_i2c_match' undeclared here (not in a function)
     381 |                 .of_match_table = of_match_ptr(of_tis_i2c_match),
         |                                                ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:57:44: note: in definition of macro 'PTR_IF'
      57 | #define PTR_IF(cond, ptr)       ((cond) ? (ptr) : NULL)
         |                                            ^~~
   drivers/char/tpm/tpm_tis_i2c.c:381:35: note: in expansion of macro 'of_match_ptr'
     381 |                 .of_match_table = of_match_ptr(of_tis_i2c_match),
         |                                   ^~~~~~~~~~~~
--
   In file included from include/linux/cpumask.h:10,
                    from include/linux/mm_types_task.h:14,
                    from include/linux/mm_types.h:5,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from drivers/hwmon/lm70.c:17:
>> drivers/hwmon/lm70.c:212:48: error: 'lm70_of_ids' undeclared here (not in a function); did you mean 'lm70_ids'?
     212 |                 .of_match_table = of_match_ptr(lm70_of_ids),
         |                                                ^~~~~~~~~~~
   include/linux/kernel.h:57:44: note: in definition of macro 'PTR_IF'
      57 | #define PTR_IF(cond, ptr)       ((cond) ? (ptr) : NULL)
         |                                            ^~~
   drivers/hwmon/lm70.c:212:35: note: in expansion of macro 'of_match_ptr'
     212 |                 .of_match_table = of_match_ptr(lm70_of_ids),
         |                                   ^~~~~~~~~~~~
--
   In file included from include/linux/cpumask.h:10,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/mutex.h:17,
                    from include/linux/kernfs.h:11,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/of.h:18,
                    from include/linux/irqdomain.h:35,
                    from include/linux/acpi.h:13,
                    from drivers/mfd/arizona-spi.c:10:
>> drivers/mfd/arizona-spi.c:286:48: error: 'arizona_spi_of_match' undeclared here (not in a function); did you mean 'arizona_spi_remove'?
     286 |                 .of_match_table = of_match_ptr(arizona_spi_of_match),
         |                                                ^~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:57:44: note: in definition of macro 'PTR_IF'
      57 | #define PTR_IF(cond, ptr)       ((cond) ? (ptr) : NULL)
         |                                            ^~~
   drivers/mfd/arizona-spi.c:286:35: note: in expansion of macro 'of_match_ptr'
     286 |                 .of_match_table = of_match_ptr(arizona_spi_of_match),
         |                                   ^~~~~~~~~~~~
--
   In file included from include/linux/cpumask.h:10,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:62,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:7,
                    from include/linux/slab.h:15,
                    from drivers/mfd/tps65910.c:13:
>> drivers/mfd/tps65910.c:536:51: error: 'tps65910_of_match' undeclared here (not in a function)
     536 |                    .of_match_table = of_match_ptr(tps65910_of_match),
         |                                                   ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:57:44: note: in definition of macro 'PTR_IF'
      57 | #define PTR_IF(cond, ptr)       ((cond) ? (ptr) : NULL)
         |                                            ^~~
   drivers/mfd/tps65910.c:536:38: note: in expansion of macro 'of_match_ptr'
     536 |                    .of_match_table = of_match_ptr(tps65910_of_match),
         |                                      ^~~~~~~~~~~~
--
   In file included from include/linux/cpumask.h:10,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/mutex.h:17,
                    from include/linux/kernfs.h:11,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/of.h:18,
                    from include/linux/irqdomain.h:35,
                    from include/linux/acpi.h:13,
                    from include/linux/i2c.h:13,
                    from drivers/mfd/max8907.c:10:
>> drivers/mfd/max8907.c:317:48: error: 'max8907_of_match' undeclared here (not in a function)
     317 |                 .of_match_table = of_match_ptr(max8907_of_match),
         |                                                ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:57:44: note: in definition of macro 'PTR_IF'
      57 | #define PTR_IF(cond, ptr)       ((cond) ? (ptr) : NULL)
         |                                            ^~~
   drivers/mfd/max8907.c:317:35: note: in expansion of macro 'of_match_ptr'
     317 |                 .of_match_table = of_match_ptr(max8907_of_match),
         |                                   ^~~~~~~~~~~~
--
   In file included from include/linux/cpumask.h:10,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:62,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:7,
                    from include/linux/slab.h:15,
                    from drivers/mfd/max8998.c:11:
>> drivers/mfd/max8998.c:349:51: error: 'max8998_dt_match' undeclared here (not in a function); did you mean 'max8998_dump'?
     349 |                    .of_match_table = of_match_ptr(max8998_dt_match),
         |                                                   ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:57:44: note: in definition of macro 'PTR_IF'
      57 | #define PTR_IF(cond, ptr)       ((cond) ? (ptr) : NULL)
         |                                            ^~~
   drivers/mfd/max8998.c:349:38: note: in expansion of macro 'of_match_ptr'
     349 |                    .of_match_table = of_match_ptr(max8998_dt_match),
         |                                      ^~~~~~~~~~~~
--
   In file included from include/linux/interrupt.h:6,
                    from drivers/mfd/tps65090.c:10:
>> drivers/mfd/tps65090.c:239:48: error: 'tps65090_of_match' undeclared here (not in a function)
     239 |                 .of_match_table = of_match_ptr(tps65090_of_match),
         |                                                ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:57:44: note: in definition of macro 'PTR_IF'
      57 | #define PTR_IF(cond, ptr)       ((cond) ? (ptr) : NULL)
         |                                            ^~~
   drivers/mfd/tps65090.c:239:35: note: in expansion of macro 'of_match_ptr'
     239 |                 .of_match_table = of_match_ptr(tps65090_of_match),
         |                                   ^~~~~~~~~~~~
..


vim +/xlnx_spi_of_match +267 drivers/fpga/xilinx-spi.c

061c97d13f1a69c Anatolij Gustschin 2017-03-23  263  
061c97d13f1a69c Anatolij Gustschin 2017-03-23  264  static struct spi_driver xilinx_slave_spi_driver = {
061c97d13f1a69c Anatolij Gustschin 2017-03-23  265  	.driver = {
061c97d13f1a69c Anatolij Gustschin 2017-03-23  266  		.name = "xlnx-slave-spi",
061c97d13f1a69c Anatolij Gustschin 2017-03-23 @267  		.of_match_table = of_match_ptr(xlnx_spi_of_match),
061c97d13f1a69c Anatolij Gustschin 2017-03-23  268  	},
061c97d13f1a69c Anatolij Gustschin 2017-03-23  269  	.probe = xilinx_spi_probe,
061c97d13f1a69c Anatolij Gustschin 2017-03-23  270  };
061c97d13f1a69c Anatolij Gustschin 2017-03-23  271  

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

View attachment "config" of type "text/plain" (118968 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ