Linux LED subsystem development
 help / color / mirror / Atom feed
* [lee-leds:for-leds-next 18/34] drivers/leds/leds-pca955x.c:544:37: error: 'client' undeclared; did you mean 'count'?
@ 2026-11-05 15:07 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-11-05 15:07 UTC (permalink / raw)
  To: Lee Jones; +Cc: oe-kbuild-all, linux-leds

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: sparc64-randconfig-2200-20261105 (https://download.01.org/0day-ci/archive/20261105/202611051619.MBISEO1w-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 8.5.0
smatch: v0.5.0-9187-g5189e3fb
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261105/202611051619.MBISEO1w-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/202611051619.MBISEO1w-lkp@intel.com/

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

   In file included from include/linux/of.h:20,
                    from include/linux/irqdomain.h:14,
                    from include/linux/gpio/driver.h:9,
                    from drivers/leds/leds-pca955x.c:44:
   drivers/leds/leds-pca955x.c: In function 'pca955x_parse_fwnode':
>> drivers/leds/leds-pca955x.c:544:37: error: 'client' undeclared (first use in this function); did you mean 'count'?
     device_for_each_child_node_scoped(&client->dev, child) {
                                        ^~~~~~
   include/linux/property.h:202:30: note: in definition of macro 'device_for_each_child_node_scoped'
      device_get_next_child_node(dev, NULL);   \
                                 ^~~
   drivers/leds/leds-pca955x.c:544:37: note: each undeclared identifier is reported only once for each function it appears in
     device_for_each_child_node_scoped(&client->dev, child) {
                                        ^~~~~~
   include/linux/property.h:202:30: note: in definition of macro 'device_for_each_child_node_scoped'
      device_get_next_child_node(dev, NULL);   \
                                 ^~~
>> drivers/leds/leds-pca955x.c:562:11: warning: returning 'void *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
       return ERR_PTR(res);
              ^~~~~~~~~~~~


vim +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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-05 15:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-05 15:07 [lee-leds:for-leds-next 18/34] drivers/leds/leds-pca955x.c:544:37: error: 'client' undeclared; did you mean 'count'? kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox