Skip to contentSkip to conversation

drivers/leds/leds-pca955x.c:544:37: error: use of undeclared identifier 'client'

PATCH kernel test robot 1 participant 1 message Nov 5 LED

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git for-leds-next
head:   a379f4e0adf2de7b11aa3ef87eeb7d9c838069b3
commit: abeb74220fefe28ab68789659f554f49e3b4a51e [18/34] leds: pca955x: Take a reference on the child firmware node
config: hexagon-randconfig-2200-20261105 (https://download.01.org/0day-ci/archive/20261105/[email protected]/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
smatch: v0.5.0-9187-g5189e3fb
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261105/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> drivers/leds/leds-pca955x.c:544:37: error: use of undeclared identifier 'client'
     544 |         device_for_each_child_node_scoped(&client->dev, child) {
         |                                            ^
>> drivers/leds/leds-pca955x.c:544:37: error: use of undeclared identifier 'client'
   drivers/leds/leds-pca955x.c:554:25: error: use of undeclared identifier 'client'
     554 |                         devm_release_action(&client->dev, pca955x_fwnode_put,
         |                                              ^
   drivers/leds/leds-pca955x.c:559:35: error: use of undeclared identifier 'client'
     559 |                 res = devm_add_action_or_reset(&client->dev,
         |                                                 ^
>> drivers/leds/leds-pca955x.c:562:11: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion]
     562 |                         return ERR_PTR(res);
         |                                ^~~~~~~~~~~~

5 errors generated.

vim +/client +544 drivers/leds/leds-pca955x.c

532
533 static int pca955x_parse_fwnode(struct pca955x *pca955x)
534 {
535 struct device *dev = &pca955x->client->dev;
536 u8 bits = pca955x->chipdef->bits;
537 struct pca955x_led *led;
538 int count;
539
540 count = device_get_child_node_count(dev);
541 if (count > bits)
542 return -ENODEV;
543

 > 544		device_for_each_child_node_scoped(&client->dev, child) {
   545			u32 reg;
   546			int res;
   547	
   548			res = fwnode_property_read_u32(child, "reg", &reg);
   549			if ((res != 0) || (reg >= bits))
   550				continue;
   551	
   552			led = &pca955x->leds[reg];
   553			if (led->fwnode)
   554				devm_release_action(&client->dev, pca955x_fwnode_put,
   555						    led->fwnode);
   556			led->type = PCA955X_TYPE_LED;
   557			led->fwnode = fwnode_handle_get(child);
   558	
   559			res = devm_add_action_or_reset(&client->dev,
   560						       pca955x_fwnode_put, led->fwnode);
   561			if (res)
 > 562				return ERR_PTR(res);

563
564 led->default_state = led_init_default_state_get(child);
565
566 fwnode_property_read_u32(child, "type", &led->type);
567 }
568
569 return 0;
570 }
571

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki