From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev,
Jonathan Brophy <professorjonny98@gmail.com>,
lee Jones <lee@kernel.org>, Pavel Machek <pavel@kernel.org>,
Jonathan Brophy <professor_jonny@hotmail.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Radoslav Tsvetkov <rtsvetkov@gradotech.eu>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-leds@vger.kernel.org
Subject: Re: [PATCH v3 4/4] leds: Add virtualcolor LED group driver
Date: Mon, 20 Oct 2025 10:13:22 +0300 [thread overview]
Message-ID: <202510201457.uOrhkKly-lkp@intel.com> (raw)
In-Reply-To: <20251019092331.49531-5-professorjonny98@gmail.com>
Hi Jonathan,
kernel test robot noticed the following build warnings:
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jonathan-Brophy/dt-bindings-Add-virtualcolor-class-dt-bindings-documentation/20251019-172647
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git for-leds-next
patch link: https://lore.kernel.org/r/20251019092331.49531-5-professorjonny98%40gmail.com
patch subject: [PATCH v3 4/4] leds: Add virtualcolor LED group driver
config: parisc-randconfig-r072-20251020 (https://download.01.org/0day-ci/archive/20251020/202510201457.uOrhkKly-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 8.5.0
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>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202510201457.uOrhkKly-lkp@intel.com/
smatch warnings:
drivers/leds/rgb/leds-group-virtualcolor.c:303 parse_monochromatic_leds() warn: 'mono_count' unsigned <= 0
drivers/leds/rgb/leds-group-virtualcolor.c:303 parse_monochromatic_leds() warn: error code type promoted to positive: 'mono_count'
vim +/mono_count +303 drivers/leds/rgb/leds-group-virtualcolor.c
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 296 static int parse_monochromatic_leds(struct device *dev, struct device_node *child,
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 297 struct virtual_led *vled)
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 298 {
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 299 u32 mono_count;
This needs to be an int.
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 300 int ret, i;
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 301
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 302 mono_count = of_property_count_elems_of_size(child, "leds", sizeof(u32));
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 @303 if (mono_count <= 0) {
^^^^^^^^^^^^^^^
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 304 vled->num_monochromatics = 0;
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 305 return 0;
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 306 }
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 307
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 308 vled->num_monochromatics = mono_count;
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 309 vled->monochromatics = devm_kcalloc(dev, vled->num_monochromatics,
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 310 sizeof(*vled->monochromatics), GFP_KERNEL);
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 311 if (!vled->monochromatics)
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 312 return -ENOMEM;
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 313
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 314 for (i = 0; i < vled->num_monochromatics; i++) {
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 315 struct led_classdev *led_cdev;
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 316
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 317 led_cdev = devm_of_led_get(dev, i);
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 318 if (IS_ERR(led_cdev)) {
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 319 ret = PTR_ERR(led_cdev);
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 320 return dev_err_probe(dev, ret,
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 321 "Failed to get monochromatic LED %d\n", i);
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 322 }
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 323
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 324 vled->monochromatics[i] = led_cdev;
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 325 }
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 326
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 327 return 0;
bc8d39d8adf81b2 Jonathan Brophy 2025-10-19 328 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-10-20 7:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-19 9:23 [PATCH v3 0/4] leds: Add a virtual LED driver for groups of Jonathan Brophy
2025-10-19 9:23 ` [PATCH v3 1/4] dt: bindings: Add virtualcolor class dt bindings documentation Jonathan Brophy
2025-10-19 10:39 ` Krzysztof Kozlowski
2025-10-19 9:23 ` [PATCH v3 2/4] dt-bindings: leds: Add virtualcolor group " Jonathan Brophy
2025-10-19 10:43 ` Krzysztof Kozlowski
2025-10-20 11:35 ` Rob Herring (Arm)
2025-10-20 18:00 ` jonathan brophy
2025-10-19 9:23 ` [PATCH v3 3/4] ABI: Add sysfs documentation for leds-group-virtualcolor Jonathan Brophy
2025-10-19 9:23 ` [PATCH v3 4/4] leds: Add virtualcolor LED group driver Jonathan Brophy
2025-10-20 3:29 ` kernel test robot
2025-10-22 16:19 ` Nathan Chancellor
2025-10-20 7:13 ` Dan Carpenter [this message]
2025-10-20 17:40 ` Jonathan Brophy
2025-10-19 14:24 ` [PATCH v3 0/4] leds: Add a virtual LED driver for groups of Jacek Anaszewski
2025-10-20 8:40 ` Alexander Dahl
2025-10-20 18:56 ` jonathan brophy
[not found] ` <DS0PR84MB37465DFAA8E8994B503A69829FF4A@DS0PR84MB3746.NAMPRD84.PROD.OUTLOOK.COM>
2025-10-20 18:57 ` Jacek Anaszewski
2025-10-20 21:45 ` professorjonny98
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=202510201457.uOrhkKly-lkp@intel.com \
--to=dan.carpenter@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk@kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=pavel@kernel.org \
--cc=professor_jonny@hotmail.com \
--cc=professorjonny98@gmail.com \
--cc=robh@kernel.org \
--cc=rtsvetkov@gradotech.eu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).