* [lee-leds:for-leds-next-next 19/19] drivers/leds/led-class-multicolor.c:51:24: error: call to '__compiletime_assert_209' declared with 'error' attribute: min(intensity_value[i], led_cdev->max_brightness) signedness error
@ 2026-02-06 2:14 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-02-06 2:14 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "__compiletime_assert_NNN"
::::::
BCC: lkp@intel.com
CC: llvm@lists.linux.dev
CC: oe-kbuild-all@lists.linux.dev
CC: linux-leds@vger.kernel.org
TO: Michael Tretter <m.tretter@pengutronix.de>
CC: Lee Jones <lee@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git for-leds-next-next
head: 129f82752bcecd554936209aac4dbdd888e92224
commit: 129f82752bcecd554936209aac4dbdd888e92224 [19/19] leds: multicolor: Limit intensity to max_brightness of LED
:::::: branch date: 10 hours ago
:::::: commit date: 10 hours ago
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20260206/202602061003.VsMdbQy5-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260206/202602061003.VsMdbQy5-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/r/202602061003.VsMdbQy5-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/leds/led-class-multicolor.c:51:24: error: call to '__compiletime_assert_209' declared with 'error' attribute: min(intensity_value[i], led_cdev->max_brightness) signedness error
51 | intensity_value[i] = min(intensity_value[i],
| ^
include/linux/minmax.h:105:19: note: expanded from macro 'min'
105 | #define min(x, y) __careful_cmp(min, x, y)
| ^
include/linux/minmax.h:98:2: note: expanded from macro '__careful_cmp'
98 | __careful_cmp_once(op, x, y, __UNIQUE_ID(x_), __UNIQUE_ID(y_))
| ^
include/linux/minmax.h:93:2: note: expanded from macro '__careful_cmp_once'
93 | BUILD_BUG_ON_MSG(!__types_ok(ux, uy), \
| ^
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:618:2: note: expanded from macro '_compiletime_assert'
618 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:611:4: note: expanded from macro '__compiletime_assert'
611 | prefix ## suffix(); \
| ^
<scratch space>:107:1: note: expanded from here
107 | __compiletime_assert_209
| ^
1 error generated.
vim +51 drivers/leds/led-class-multicolor.c
55d5d3b46b08a4 Dan Murphy 2020-07-16 29
55d5d3b46b08a4 Dan Murphy 2020-07-16 30 static ssize_t multi_intensity_store(struct device *dev,
55d5d3b46b08a4 Dan Murphy 2020-07-16 31 struct device_attribute *intensity_attr,
55d5d3b46b08a4 Dan Murphy 2020-07-16 32 const char *buf, size_t size)
55d5d3b46b08a4 Dan Murphy 2020-07-16 33 {
55d5d3b46b08a4 Dan Murphy 2020-07-16 34 struct led_classdev *led_cdev = dev_get_drvdata(dev);
55d5d3b46b08a4 Dan Murphy 2020-07-16 35 struct led_classdev_mc *mcled_cdev = lcdev_to_mccdev(led_cdev);
55d5d3b46b08a4 Dan Murphy 2020-07-16 36 int nrchars, offset = 0;
55d5d3b46b08a4 Dan Murphy 2020-07-16 37 int intensity_value[LED_COLOR_ID_MAX];
55d5d3b46b08a4 Dan Murphy 2020-07-16 38 int i;
55d5d3b46b08a4 Dan Murphy 2020-07-16 39 ssize_t ret;
55d5d3b46b08a4 Dan Murphy 2020-07-16 40
55d5d3b46b08a4 Dan Murphy 2020-07-16 41 mutex_lock(&led_cdev->led_access);
55d5d3b46b08a4 Dan Murphy 2020-07-16 42
55d5d3b46b08a4 Dan Murphy 2020-07-16 43 for (i = 0; i < mcled_cdev->num_colors; i++) {
55d5d3b46b08a4 Dan Murphy 2020-07-16 44 ret = sscanf(buf + offset, "%i%n",
55d5d3b46b08a4 Dan Murphy 2020-07-16 45 &intensity_value[i], &nrchars);
55d5d3b46b08a4 Dan Murphy 2020-07-16 46 if (ret != 1) {
55d5d3b46b08a4 Dan Murphy 2020-07-16 47 ret = -EINVAL;
55d5d3b46b08a4 Dan Murphy 2020-07-16 48 goto err_out;
55d5d3b46b08a4 Dan Murphy 2020-07-16 49 }
55d5d3b46b08a4 Dan Murphy 2020-07-16 50 offset += nrchars;
129f82752bcecd Michael Tretter 2026-01-23 @51 intensity_value[i] = min(intensity_value[i],
129f82752bcecd Michael Tretter 2026-01-23 52 led_cdev->max_brightness);
55d5d3b46b08a4 Dan Murphy 2020-07-16 53 }
55d5d3b46b08a4 Dan Murphy 2020-07-16 54
55d5d3b46b08a4 Dan Murphy 2020-07-16 55 offset++;
55d5d3b46b08a4 Dan Murphy 2020-07-16 56 if (offset < size) {
55d5d3b46b08a4 Dan Murphy 2020-07-16 57 ret = -EINVAL;
55d5d3b46b08a4 Dan Murphy 2020-07-16 58 goto err_out;
55d5d3b46b08a4 Dan Murphy 2020-07-16 59 }
55d5d3b46b08a4 Dan Murphy 2020-07-16 60
55d5d3b46b08a4 Dan Murphy 2020-07-16 61 for (i = 0; i < mcled_cdev->num_colors; i++)
55d5d3b46b08a4 Dan Murphy 2020-07-16 62 mcled_cdev->subled_info[i].intensity = intensity_value[i];
55d5d3b46b08a4 Dan Murphy 2020-07-16 63
e35ca991a777ef Sven Schwermer 2025-04-04 64 if (!test_bit(LED_BLINK_SW, &led_cdev->work_flags))
55d5d3b46b08a4 Dan Murphy 2020-07-16 65 led_set_brightness(led_cdev, led_cdev->brightness);
55d5d3b46b08a4 Dan Murphy 2020-07-16 66 ret = size;
55d5d3b46b08a4 Dan Murphy 2020-07-16 67 err_out:
55d5d3b46b08a4 Dan Murphy 2020-07-16 68 mutex_unlock(&led_cdev->led_access);
55d5d3b46b08a4 Dan Murphy 2020-07-16 69 return ret;
55d5d3b46b08a4 Dan Murphy 2020-07-16 70 }
55d5d3b46b08a4 Dan Murphy 2020-07-16 71
--
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-02-06 2:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-06 2:14 [lee-leds:for-leds-next-next 19/19] drivers/leds/led-class-multicolor.c:51:24: error: call to '__compiletime_assert_209' declared with 'error' attribute: min(intensity_value[i], led_cdev->max_brightness) signedness error kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.