leds: Add driver for MAX8907 LED cell
kernel test robot
build bot::::::
:::::: Manual check reason: "linux-review patch is more than 7 days old, verify it wasn't already superseded" ::::::
BCC: [email protected]
CC: [email protected]
CC: [email protected]
In-Reply-To: <[email protected]>
References: <[email protected]>
TO: Svyatoslav Ryhel <[email protected]>
TO: Liam Girdwood <[email protected]>
TO: Mark Brown <[email protected]>
TO: Rob Herring <[email protected]>
TO: Krzysztof Kozlowski <[email protected]>
TO: Conor Dooley <[email protected]>
TO: Lee Jones <[email protected]>
TO: Pavel Machek <[email protected]>
TO: "Griffin Kroah-Hartman" <[email protected]>
TO: Svyatoslav Ryhel <[email protected]>
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
Hi Svyatoslav,
kernel test robot noticed the following build errors:
[auto build test ERROR on linux-review/Svyatoslav-Ryhel/regulator-dt-bindings-maxim-max8907-Convert-to-DT-schema/20261027-134631]
url: https://github.com/intel-lab-lkp/linux/commits/Svyatoslav-Ryhel/regulator-dt-bindings-maxim-max8907-Document-LED-support/20261115-110518 base: https://github.com/intel-lab-lkp/linux Svyatoslav-Ryhel/regulator-dt-bindings-maxim-max8907-Convert-to-DT-schema/20261027-134631 patch link: https://lore.kernel.org/r/20261115090520.102216-3-clamor95%40gmail.com patch subject: [PATCH v6 2/3] leds: Add driver for MAX8907 LED cell
:::::: branch date: 7 days ago
:::::: commit date: 7 days ago
config: sparc64-allmodconfig (https://download.01.org/0day-ci/archive/20261122/[email protected]/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/20261122/[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/r/[email protected]/
All errors (new ones prefixed by >>):
>> drivers/leds/leds-max8907.c:68:10: error: call to undeclared function 'devm_kzalloc_obj'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
68 | ddata = devm_kzalloc_obj(dev, struct max8907_led_data);
| ^
drivers/leds/leds-max8907.c:68:10: note: did you mean 'devm_kzalloc'?
include/linux/device/devres.h:48:21: note: 'devm_kzalloc' declared here
48 | static inline void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp)
| ^
>> drivers/leds/leds-max8907.c:68:32: error: expected expression
68 | ddata = devm_kzalloc_obj(dev, struct max8907_led_data);
| ^2 errors generated.
vim +/devm_kzalloc_obj +68 drivers/leds/leds-max8907.c
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 55
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 56 static int max8907_led_probe(struct platform_device *pdev)
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 57 {
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 58 struct device *dev = &pdev->dev;
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 59 struct device_node *led_np __free(device_node) =
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 60 of_get_available_child_by_name(dev_of_node(dev->parent), "led");
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 61 struct max8907 *max8907 = dev_get_drvdata(dev->parent);
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 62 struct led_init_data init_data = { };
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 63 struct max8907_led_data *ddata;
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 64
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 65 if (!led_np)
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 66 return -ENODEV;
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 67
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 @68 ddata = devm_kzalloc_obj(dev, struct max8907_led_data);
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 69 if (!ddata)
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 70 return -ENOMEM;
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 71
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 72 ddata->regmap = max8907->regmap_gen;
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 73
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 74 init_data.fwnode = of_fwnode_handle(led_np);
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 75 init_data.devicename = "max8907";
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 76 init_data.default_label = ":wled";
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 77
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 78 ddata->cdev.brightness = LED_OFF;
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 79 ddata->cdev.flags = LED_CORE_SUSPENDRESUME;
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 80 ddata->cdev.max_brightness = LED_FULL;
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 81
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 82 ddata->cdev.brightness_get = max8907_led_get_brightness;
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 83 ddata->cdev.brightness_set_blocking = max8907_led_set_brightness;
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 84
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 85 return devm_led_classdev_register_ext(dev, &ddata->cdev, &init_data);
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 86 }
7b85b7d8f42900 Svyatoslav Ryhel 2026-11-15 87 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki