Re: [PATCH v2 2/6] i2c: core: Unify the firmware node type check

kernel test robot
2025-04-07T12:45:37Z

Hi Andy,

kernel test robot noticed the following build errors:

[auto build test ERROR on wsa/i2c/for-next]
[also build test ERROR on linus/master v6.15-rc1 next-20250407]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/i2c-core-Drop-duplicate-check-before-calling-OF-APIs/20250407-180528
base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
patch link: https://lore.kernel.org/r/20250407095852.215809-3-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v2 2/6] i2c: core: Unify the firmware node type check
config: arc-randconfig-002-20250407 (https://download.01.org/0day-ci/archive/20250407/202504072041.Bv9mOk4o-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250407/202504072041.Bv9mOk4o-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504072041.Bv9mOk4o-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

drivers/i2c/i2c-core-slave.c: In function 'i2c_detect_slave_mode':
>> drivers/i2c/i2c-core-slave.c:117:17: error: implicit declaration of function 'for_each_child_node_scoped'; did you mean 'for_each_child_of_node_scoped'? [-Wimplicit-function-declaration]
117 | for_each_child_node_scoped(fwnode, child) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| for_each_child_of_node_scoped
>> drivers/i2c/i2c-core-slave.c:117:52: error: 'child' undeclared (first use in this function)
117 | for_each_child_node_scoped(fwnode, child) {
| ^~~~~
drivers/i2c/i2c-core-slave.c:117:52: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/i2c/i2c-core-slave.c:117:58: error: expected ';' before '{' token
117 | for_each_child_node_scoped(fwnode, child) {
| ^~
| ;
>> drivers/i2c/i2c-core-slave.c:115:21: warning: unused variable 'reg' [-Wunused-variable]
115 | u32 reg;
| ^~~

vim +117 drivers/i2c/i2c-core-slave.c

97
98 /**
99 * i2c_detect_slave_mode - detect operation mode
100 * @dev: The device owning the bus
101 *
102 * This checks the device nodes for an I2C slave by checking the address
103 * used in the reg property. If the address match the I2C_OWN_SLAVE_ADDRESS
104 * flag this means the device is configured to act as a I2C slave and it will
105 * be listening at that address.
106 *
107 * Returns true if an I2C own slave address is detected, otherwise returns
108 * false.
109 */
110 bool i2c_detect_slave_mode(struct device *dev)
111 {
112 struct fwnode_handle *fwnode = dev_fwnode(dev);
113
114 if (is_of_node(fwnode)) {
> 115 u32 reg;
116
> 117 for_each_child_node_scoped(fwnode, child) {

--
0-DAY CI Kernel Test Service