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: x86_64-rhel-8.3-func compiler: gcc-11 (Debian 11.3.0-8) 11.3.0 reproduce (this is a W=1 build): # 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 make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/char/tpm/ drivers/dma/dw/ drivers/hwmon/ drivers/i2c/busses/ drivers/input/mouse/ drivers/input/rmi4/ drivers/input/serio/ drivers/misc/lis3lv02d/ drivers/rtc/ drivers/uio/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from arch/x86/include/asm/percpu.h:27, from arch/x86/include/asm/current.h:6, from include/linux/sched.h:12, from include/linux/delay.h:23, from drivers/hwmon/pmbus/ltc2978.c:11: >> drivers/hwmon/pmbus/ltc2978.c:923:51: error: 'ltc2978_of_match' undeclared here (not in a function); did you mean 'ltc2978_data'? 923 | .of_match_table = of_match_ptr(ltc2978_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/hwmon/pmbus/ltc2978.c:923:38: note: in expansion of macro 'of_match_ptr' 923 | .of_match_table = of_match_ptr(ltc2978_of_match), | ^~~~~~~~~~~~ -- In file included from arch/x86/include/asm/percpu.h:27, from arch/x86/include/asm/current.h:6, from include/linux/mutex.h:14, 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/i2c/busses/i2c-designware-platdrv.c:11: >> drivers/i2c/busses/i2c-designware-platdrv.c:504:48: error: 'dw_i2c_of_match' undeclared here (not in a function); did you mean 'dw_i2c_acpi_match'? 504 | .of_match_table = of_match_ptr(dw_i2c_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/i2c/busses/i2c-designware-platdrv.c:504:35: note: in expansion of macro 'of_match_ptr' 504 | .of_match_table = of_match_ptr(dw_i2c_of_match), | ^~~~~~~~~~~~ -- In file included from drivers/i2c/busses/i2c-pca-platform.c:11: >> drivers/i2c/busses/i2c-pca-platform.c:247:48: error: 'i2c_pca_of_match_table' undeclared here (not in a function) 247 | .of_match_table = of_match_ptr(i2c_pca_of_match_table), | ^~~~~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:57:44: note: in definition of macro 'PTR_IF' 57 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL) | ^~~ drivers/i2c/busses/i2c-pca-platform.c:247:35: note: in expansion of macro 'of_match_ptr' 247 | .of_match_table = of_match_ptr(i2c_pca_of_match_table), | ^~~~~~~~~~~~ -- In file included from arch/x86/include/asm/percpu.h:27, from arch/x86/include/asm/current.h:6, from include/linux/sched.h:12, from include/linux/delay.h:23, from drivers/input/mouse/cyapa.c:17: >> drivers/input/mouse/cyapa.c:1490:48: error: 'cyapa_of_match' undeclared here (not in a function) 1490 | .of_match_table = of_match_ptr(cyapa_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/input/mouse/cyapa.c:1490:35: note: in expansion of macro 'of_match_ptr' 1490 | .of_match_table = of_match_ptr(cyapa_of_match), | ^~~~~~~~~~~~ -- In file included from arch/x86/include/asm/percpu.h:27, from arch/x86/include/asm/current.h:6, from include/linux/mutex.h:14, 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/input/mouse/elan_i2c_core.c:18: >> drivers/input/mouse/elan_i2c_core.c:1443:48: error: 'elan_of_match' undeclared here (not in a function) 1443 | .of_match_table = of_match_ptr(elan_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/input/mouse/elan_i2c_core.c:1443:35: note: in expansion of macro 'of_match_ptr' 1443 | .of_match_table = of_match_ptr(elan_of_match), | ^~~~~~~~~~~~ -- In file included from arch/x86/include/asm/percpu.h:27, from arch/x86/include/asm/nospec-branch.h:14, from arch/x86/include/asm/paravirt_types.h:40, from arch/x86/include/asm/ptrace.h:97, from arch/x86/include/asm/math_emu.h:5, from arch/x86/include/asm/processor.h:13, from arch/x86/include/asm/timex.h:5, from include/linux/timex.h:67, from include/linux/time32.h:13, from include/linux/time.h:60, from include/linux/stat.h:19, from include/linux/module.h:13, from drivers/input/mouse/synaptics_i2c.c:13: >> drivers/input/mouse/synaptics_i2c.c:652:48: error: 'synaptics_i2c_of_match' undeclared here (not in a function); did you mean 'synaptics_i2c_id_table'? 652 | .of_match_table = of_match_ptr(synaptics_i2c_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/input/mouse/synaptics_i2c.c:652:35: note: in expansion of macro 'of_match_ptr' 652 | .of_match_table = of_match_ptr(synaptics_i2c_of_match), | ^~~~~~~~~~~~ -- In file included from arch/x86/include/asm/percpu.h:27, from arch/x86/include/asm/current.h:6, from include/linux/mutex.h:14, 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/input/rmi4/rmi_i2c.c:7: >> drivers/input/rmi4/rmi_i2c.c:383:48: error: 'rmi_i2c_of_match' undeclared here (not in a function) 383 | .of_match_table = of_match_ptr(rmi_i2c_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/input/rmi4/rmi_i2c.c:383:35: note: in expansion of macro 'of_match_ptr' 383 | .of_match_table = of_match_ptr(rmi_i2c_of_match), | ^~~~~~~~~~~~ -- In file included from drivers/input/rmi4/rmi_spi.c:7: >> drivers/input/rmi4/rmi_spi.c:522:48: error: 'rmi_spi_of_match' undeclared here (not in a function); did you mean 'rmi_spi_of_probe'? 522 | .of_match_table = of_match_ptr(rmi_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/input/rmi4/rmi_spi.c:522:35: note: in expansion of macro 'of_match_ptr' 522 | .of_match_table = of_match_ptr(rmi_spi_of_match), | ^~~~~~~~~~~~ -- In file included from arch/x86/include/asm/percpu.h:27, from arch/x86/include/asm/nospec-branch.h:14, from arch/x86/include/asm/paravirt_types.h:40, from arch/x86/include/asm/ptrace.h:97, from arch/x86/include/asm/math_emu.h:5, from arch/x86/include/asm/processor.h:13, from arch/x86/include/asm/timex.h:5, from include/linux/timex.h:67, from include/linux/time32.h:13, from include/linux/time.h:60, from include/linux/stat.h:19, from include/linux/module.h:13, from drivers/input/serio/altera_ps2.c:11: >> drivers/input/serio/altera_ps2.c:156:48: error: 'altera_ps2_match' undeclared here (not in a function); did you mean 'altera_ps2_probe'? 156 | .of_match_table = of_match_ptr(altera_ps2_match), | ^~~~~~~~~~~~~~~~ include/linux/kernel.h:57:44: note: in definition of macro 'PTR_IF' 57 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL) | ^~~ drivers/input/serio/altera_ps2.c:156:35: note: in expansion of macro 'of_match_ptr' 156 | .of_match_table = of_match_ptr(altera_ps2_match), | ^~~~~~~~~~~~ -- In file included from arch/x86/include/asm/percpu.h:27, from arch/x86/include/asm/nospec-branch.h:14, from arch/x86/include/asm/paravirt_types.h:40, from arch/x86/include/asm/ptrace.h:97, from arch/x86/include/asm/math_emu.h:5, from arch/x86/include/asm/processor.h:13, from arch/x86/include/asm/timex.h:5, from include/linux/timex.h:67, from include/linux/time32.h:13, from include/linux/time.h:60, from include/linux/stat.h:19, from include/linux/module.h:13, from drivers/input/serio/arc_ps2.c:9: >> drivers/input/serio/arc_ps2.c:264:48: error: 'arc_ps2_match' undeclared here (not in a function); did you mean 'arc_ps2_data'? 264 | .of_match_table = of_match_ptr(arc_ps2_match), | ^~~~~~~~~~~~~ include/linux/kernel.h:57:44: note: in definition of macro 'PTR_IF' 57 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL) | ^~~ drivers/input/serio/arc_ps2.c:264:35: note: in expansion of macro 'of_match_ptr' 264 | .of_match_table = of_match_ptr(arc_ps2_match), | ^~~~~~~~~~~~ -- In file included from arch/x86/include/asm/percpu.h:27, from arch/x86/include/asm/nospec-branch.h:14, from arch/x86/include/asm/paravirt_types.h:40, from arch/x86/include/asm/ptrace.h:97, from arch/x86/include/asm/math_emu.h:5, from arch/x86/include/asm/processor.h:13, from arch/x86/include/asm/timex.h:5, from include/linux/timex.h:67, from include/linux/time32.h:13, from include/linux/time.h:60, from include/linux/stat.h:19, from include/linux/module.h:13, from drivers/misc/lis3lv02d/lis3lv02d_i2c.c:14: >> drivers/misc/lis3lv02d/lis3lv02d_i2c.c:265:48: error: 'lis3lv02d_i2c_dt_ids' undeclared here (not in a function); did you mean 'lis3lv02d_i2c_driver'? 265 | .of_match_table = of_match_ptr(lis3lv02d_i2c_dt_ids), | ^~~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:57:44: note: in definition of macro 'PTR_IF' 57 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL) | ^~~ drivers/misc/lis3lv02d/lis3lv02d_i2c.c:265:35: note: in expansion of macro 'of_match_ptr' 265 | .of_match_table = of_match_ptr(lis3lv02d_i2c_dt_ids), | ^~~~~~~~~~~~ .. vim +923 drivers/hwmon/pmbus/ltc2978.c 77aa3585805920d Alan Tull 2014-10-15 919 c3ff9a674c2313d Guenter Roeck 2011-09-02 920 static struct i2c_driver ltc2978_driver = { c3ff9a674c2313d Guenter Roeck 2011-09-02 921 .driver = { c3ff9a674c2313d Guenter Roeck 2011-09-02 922 .name = "ltc2978", 77aa3585805920d Alan Tull 2014-10-15 @923 .of_match_table = of_match_ptr(ltc2978_of_match), c3ff9a674c2313d Guenter Roeck 2011-09-02 924 }, dd43193976b9a7b Stephen Kitt 2020-08-08 925 .probe_new = ltc2978_probe, c3ff9a674c2313d Guenter Roeck 2011-09-02 926 .id_table = ltc2978_id, c3ff9a674c2313d Guenter Roeck 2011-09-02 927 }; c3ff9a674c2313d Guenter Roeck 2011-09-02 928 -- 0-DAY CI Kernel Test Service https://01.org/lkp