Commit b522794
leds: multicolor: Change intensity_value to unsigned int
Using min to compare the intensity_value with led_dev->max_brightness
causes a signedness error:
drivers/leds/led-class-multicolor.c: In function 'multi_intensity_store':
././include/linux/compiler_types.h:630:45: error:
call to '__compiletime_assert_195' declared with attribute error:
min(intensity_value[i], led_cdev->max_brightness) signedness error
Change the type of intensity_value to unsigned int to fix the signedness
error.
intensity_value is used to set mcled_cdev->subled_info[i].intensity,
which is unsigned int, too.
Fixes: 129f82752bce ("leds: multicolor: Limit intensity to max_brightness of LED")
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Link: https://patch.msgid.link/20260206-leds-multicolor-fix-signedness-error-v1-1-48a00ed33c07@pengutronix.de
Signed-off-by: Lee Jones <lee@kernel.org>1 parent 6de23f8 commit b522794
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
0 commit comments