lkml.org 
[lkml]   [2022]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 1/1] leds: bcm6328: Get rid of custom led_init_default_state_get()
Hi Andy,

I love your patch! Yet something to improve:

[auto build test ERROR on pavel-leds/for-next]
[also build test ERROR on linus/master v5.19 next-20220802]
[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/leds-bcm6328-Get-rid-of-custom-led_init_default_state_get/20220803-052959
base: git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git for-next
config: arc-randconfig-r016-20220801 (https://download.01.org/0day-ci/archive/20220803/202208032028.jurRnUDS-lkp@intel.com/config)
compiler: arceb-elf-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/514383e5dd28e25f812c88b0454a02d59e4d205c
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Andy-Shevchenko/leds-bcm6328-Get-rid-of-custom-led_init_default_state_get/20220803-052959
git checkout 514383e5dd28e25f812c88b0454a02d59e4d205c
# 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=arc SHELL=/bin/bash drivers/leds/

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

All errors (new ones prefixed by >>):

drivers/leds/leds-bcm6328.c: In function 'bcm6328_led':
>> drivers/leds/leds-bcm6328.c:353:17: error: implicit declaration of function 'led_init_default_state_get'; did you mean 'led_get_default_pattern'? [-Werror=implicit-function-declaration]
353 | state = led_init_default_state_get(init_data.fwnode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| led_get_default_pattern
cc1: some warnings being treated as errors


vim +353 drivers/leds/leds-bcm6328.c

326
327 static int bcm6328_led(struct device *dev, struct device_node *nc, u32 reg,
328 void __iomem *mem, spinlock_t *lock,
329 unsigned long *blink_leds, unsigned long *blink_delay)
330 {
331 struct led_init_data init_data = {};
332 struct bcm6328_led *led;
333 enum led_default_state state;
334 unsigned long val, shift;
335 void __iomem *mode;
336 int rc;
337
338 led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL);
339 if (!led)
340 return -ENOMEM;
341
342 led->pin = reg;
343 led->mem = mem;
344 led->lock = lock;
345 led->blink_leds = blink_leds;
346 led->blink_delay = blink_delay;
347
348 if (of_property_read_bool(nc, "active-low"))
349 led->active_low = true;
350
351 init_data.fwnode = of_fwnode_handle(nc);
352
> 353 state = led_init_default_state_get(init_data.fwnode);
354 switch (state) {
355 case LEDS_DEFSTATE_ON:
356 led->cdev.brightness = LED_FULL;
357 break;
358 case LEDS_DEFSTATE_KEEP:
359 shift = bcm6328_pin2shift(led->pin);
360 if (shift / 16)
361 mode = mem + BCM6328_REG_MODE_HI;
362 else
363 mode = mem + BCM6328_REG_MODE_LO;
364
365 val = bcm6328_led_read(mode) >> BCM6328_LED_SHIFT(shift % 16);
366 val &= BCM6328_LED_MODE_MASK;
367 if ((led->active_low && val == BCM6328_LED_MODE_OFF) ||
368 (!led->active_low && val == BCM6328_LED_MODE_ON))
369 led->cdev.brightness = LED_FULL;
370 else
371 led->cdev.brightness = LED_OFF;
372 break;
373 default:
374 led->cdev.brightness = LED_OFF;
375 }
376
377 bcm6328_led_set(&led->cdev, led->cdev.brightness);
378
379 led->cdev.brightness_set = bcm6328_led_set;
380 led->cdev.blink_set = bcm6328_blink_set;
381
382 rc = devm_led_classdev_register_ext(dev, &led->cdev, &init_data);
383 if (rc < 0)
384 return rc;
385
386 dev_dbg(dev, "registered LED %s\n", led->cdev.name);
387
388 return 0;
389 }
390

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

\
 
 \ /
  Last update: 2022-08-03 14:22    [W:0.174 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site