Re: [PATCH v6 2/2] leds: Add control of the voltage/current regulator to the LED core

From: kbuild test robot
Date: Fri Oct 04 2019 - 22:41:19 EST


Hi Jean-Jacques,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on j.anaszewski-leds/for-next]
[cannot apply to v5.4-rc1 next-20191004]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/Jean-Jacques-Hiblot/leds-Add-control-of-the-voltage-current-regulator-to-the-LED-core/20191005-062631
base: https://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git for-next
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sparc

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

drivers/leds/led-core.c: In function 'try_turn_on_regulator_if_needed':
>> drivers/leds/led-core.c:65:15: warning: overflow in implicit constant conversion [-Woverflow]
atomic_and(~REG_R_ON, &led_cdev->regulator_state);
^
drivers/leds/led-core.c: In function 'led_set_brightness_nopm':
drivers/leds/led-core.c:353:27: warning: overflow in implicit constant conversion [-Woverflow]
old = atomic_fetch_and(~REG_U_ON,
^

vim +65 drivers/leds/led-core.c

54
55 static void try_turn_on_regulator_if_needed(struct led_classdev *led_cdev)
56 {
57 int old = atomic_cmpxchg(&led_cdev->regulator_state, REG_R_OFF_U_ON,
58 REG_R_ON_U_ON);
59 if (old == REG_R_OFF_U_ON) {
60 int rc = regulator_enable(led_cdev->regulator);
61
62 if (rc) {
63 dev_err(led_cdev->dev,
64 "Failed to enable the regulator (%d)\n", rc);
> 65 atomic_and(~REG_R_ON, &led_cdev->regulator_state);
66 }
67 }
68 }
69

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip