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 v2 4/4] leds: Add Virtual Color LED Group driver
Date: Thu, 23 Oct 2025 17:48:05 +0300 [thread overview]
Message-ID: <202510231653.3V9E5oxE-lkp@intel.com> (raw)
In-Reply-To: <20251013120955.227572-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-leds-Add-YAML-bindings-for-Virtual-Color-LED-Group-driver/20251013-201353
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git for-leds-next
patch link: https://lore.kernel.org/r/20251013120955.227572-5-professorjonny98%40gmail.com
patch subject: [PATCH v2 4/4] leds: Add Virtual Color LED Group driver
config: loongarch-randconfig-r072-20251019 (https://download.01.org/0day-ci/archive/20251023/202510231653.3V9E5oxE-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 15.1.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/202510231653.3V9E5oxE-lkp@intel.com/
smatch warnings:
drivers/leds/rgb/leds-group-virtualcolor.c:239 leds_virtualcolor_init_vled() warn: 'phandle_count' unsigned <= 0
vim +/phandle_count +239 drivers/leds/rgb/leds-group-virtualcolor.c
793ec9b4ba92eea Jonathan Brophy 2025-10-14 218 static int leds_virtualcolor_init_vled(struct device *dev, struct device_node *child,
793ec9b4ba92eea Jonathan Brophy 2025-10-14 219 struct virtual_led *vled, struct leds_virtualcolor *vc_data)
793ec9b4ba92eea Jonathan Brophy 2025-10-14 220 {
793ec9b4ba92eea Jonathan Brophy 2025-10-14 221 struct led_init_data init_data = {};
793ec9b4ba92eea Jonathan Brophy 2025-10-14 222 u32 blink_interval;
793ec9b4ba92eea Jonathan Brophy 2025-10-14 223 u32 phandle_count;
793ec9b4ba92eea Jonathan Brophy 2025-10-14 224 u32 max_brightness;
793ec9b4ba92eea Jonathan Brophy 2025-10-14 225 int ret;
793ec9b4ba92eea Jonathan Brophy 2025-10-14 226 int i;
793ec9b4ba92eea Jonathan Brophy 2025-10-14 227
793ec9b4ba92eea Jonathan Brophy 2025-10-14 228 ret = of_property_read_u32(child, "priority", &vled->priority);
793ec9b4ba92eea Jonathan Brophy 2025-10-14 229 if (ret)
793ec9b4ba92eea Jonathan Brophy 2025-10-14 230 vled->priority = 0;
793ec9b4ba92eea Jonathan Brophy 2025-10-14 231
793ec9b4ba92eea Jonathan Brophy 2025-10-14 232 ret = of_property_read_u32(child, "blink", &blink_interval);
793ec9b4ba92eea Jonathan Brophy 2025-10-14 233 if (!ret) {
793ec9b4ba92eea Jonathan Brophy 2025-10-14 234 vled->blink_delay_on = blink_interval;
793ec9b4ba92eea Jonathan Brophy 2025-10-14 235 vled->blink_delay_off = blink_interval;
793ec9b4ba92eea Jonathan Brophy 2025-10-14 236 }
793ec9b4ba92eea Jonathan Brophy 2025-10-14 237
793ec9b4ba92eea Jonathan Brophy 2025-10-14 238 phandle_count = of_property_count_elems_of_size(child, "leds", sizeof(u32));
793ec9b4ba92eea Jonathan Brophy 2025-10-14 @239 if (phandle_count <= 0) {
^^^^^^^^^^^^^^^^^^
u32 can't be < 0.
793ec9b4ba92eea Jonathan Brophy 2025-10-14 240 dev_err(dev, "No monochromatic LEDs specified for virtual LED %s\n",
793ec9b4ba92eea Jonathan Brophy 2025-10-14 241 vled->cdev.name);
793ec9b4ba92eea Jonathan Brophy 2025-10-14 242 return -EINVAL;
793ec9b4ba92eea Jonathan Brophy 2025-10-14 243 }
793ec9b4ba92eea Jonathan Brophy 2025-10-14 244
793ec9b4ba92eea Jonathan Brophy 2025-10-14 245 vled->num_monochromatics = phandle_count;
793ec9b4ba92eea Jonathan Brophy 2025-10-14 246 vled->monochromatics = devm_kcalloc(dev, vled->num_monochromatics,
793ec9b4ba92eea Jonathan Brophy 2025-10-14 247 sizeof(*vled->monochromatics), GFP_KERNEL);
793ec9b4ba92eea Jonathan Brophy 2025-10-14 248 if (!vled->monochromatics)
793ec9b4ba92eea Jonathan Brophy 2025-10-14 249 return -ENOMEM;
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2025-10-23 14:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-13 12:09 [PATCH v2 0/4] leds: Add a virtual LED driver for groups of Jonathan Brophy
2025-10-13 12:09 ` [PATCH v2 1/4] dt-bindings: leds: Add YAML bindings for Virtual Color LED Group driver Jonathan Brophy
2025-10-13 23:41 ` Krzysztof Kozlowski
2025-10-14 3:08 ` Jonathan Brophy
2025-10-14 8:19 ` Krzysztof Kozlowski
2025-10-14 16:35 ` Rob Herring (Arm)
2025-10-13 12:09 ` [PATCH v2 2/4] ABI: sysfs-class-leds-virtualcolor: Document sysfs Jonathan Brophy
2025-10-13 12:09 ` [PATCH v2 3/4] dt-bindings: led: add virtual LED bindings Jonathan Brophy
2025-10-13 12:09 ` [PATCH v2 4/4] leds: Add Virtual Color LED Group driver Jonathan Brophy
2025-10-13 15:39 ` Thomas Weißschuh
2025-10-23 14:48 ` Dan Carpenter [this message]
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=202510231653.3V9E5oxE-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).