From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: [lee-leds:for-leds-next-next 2/2] drivers/leds/led-class-multicolor.c:51:24: error: call to '__compiletime_assert_210' declared with 'error' attribute: min(intensity_value[i], led_cdev->max_brightness) signedness error
Date: Fri, 06 Mar 2026 18:20:24 +0800 [thread overview]
Message-ID: <202603061843.snQjuQDA-lkp@intel.com> (raw)
::::::
:::::: 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: 787130d7bc49ec01604277a3480f42ba1557385e
commit: 787130d7bc49ec01604277a3480f42ba1557385e [2/2] leds: multicolor: Limit intensity to max_brightness of LED
:::::: branch date: 21 hours ago
:::::: commit date: 21 hours ago
config: x86_64-buildonly-randconfig-003-20260306 (https://download.01.org/0day-ci/archive/20260306/202603061843.snQjuQDA-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260306/202603061843.snQjuQDA-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/202603061843.snQjuQDA-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/leds/led-class-multicolor.c:51:24: error: call to '__compiletime_assert_210' 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:694:2: note: expanded from macro '_compiletime_assert'
694 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:687:4: note: expanded from macro '__compiletime_assert'
687 | prefix ## suffix(); \
| ^
<scratch space>:185:1: note: expanded from here
185 | __compiletime_assert_210
| ^
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;
787130d7bc49ec Michael Tretter 2026-01-23 @51 intensity_value[i] = min(intensity_value[i],
787130d7bc49ec 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
reply other threads:[~2026-03-06 10:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202603061843.snQjuQDA-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.