Skip to contentSkip to conversation

drivers/hid/hid-lg-g15.c:241:undefined reference to `led_mc_calc_color_components'

PATCH kernel test robot 1 participant 1 message Feb 10, 2025 HID

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-6.15/logitech
head:   a3a064146c507ee5207dcf7223cd7a3d7864e085
commit: a3a064146c507ee5207dcf7223cd7a3d7864e085 [1/1] HID: hid-lg-g15: Use standard multicolor LED API
config: powerpc-ppc6xx_defconfig (https://download.01.org/0day-ci/archive/20250211/[email protected]/config)
compiler: powerpc-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250211/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

powerpc-linux-ld: drivers/hid/hid-lg-g15.o: in function `lg_g510_kbd_led_write':

>> drivers/hid/hid-lg-g15.c:241:(.text+0x768): undefined reference to `led_mc_calc_color_components'
   powerpc-linux-ld: drivers/hid/hid-lg-g15.o: in function `lg_g15_register_led':
>> drivers/hid/hid-lg-g15.c:686:(.text+0xa9c): undefined reference to `devm_led_classdev_multicolor_register_ext'

vim +241 drivers/hid/hid-lg-g15.c

232
233 /* Must be called with g15->mutex locked */
234 static int lg_g510_kbd_led_write(struct lg_g15_data *g15,
235 struct lg_g15_led *g15_led,
236 enum led_brightness brightness)
237 {
238 struct mc_subled *subleds = g15_led->mcdev.subled_info;
239 int ret;
240

 > 241		led_mc_calc_color_components(&g15_led->mcdev, brightness);

242
243 g15->transfer_buf[0] = 5 + g15_led->led;
244 g15->transfer_buf[1] = subleds[0].brightness;
245 g15->transfer_buf[2] = subleds[1].brightness;
246 g15->transfer_buf[3] = subleds[2].brightness;
247
248 ret = hid_hw_raw_request(g15->hdev,
249 LG_G510_FEATURE_BACKLIGHT_RGB + g15_led->led,
250 g15->transfer_buf, 4,
251 HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
252 if (ret == 4) {
253 /* Success */
254 g15_led->brightness = brightness;
255 ret = 0;
256 } else {
257 hid_err(g15->hdev, "Error setting LED brightness: %d\n", ret);
258 ret = (ret < 0) ? ret : -EIO;
259 }
260
261 return ret;
262 }
263

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki