tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git for-next head: d2a33be652ca0ea145ba5f8ed27ae84a82e7a3d1 commit: 4eba5b82096e8cdf86e55089f614d70e147b8741 [15/42] leds: class: Improve LED and LED flash class registration API config: x86_64-randconfig-s2-07250714 (attached as .config) compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4 reproduce: git checkout 4eba5b82096e8cdf86e55089f614d70e147b8741 # save the attached .config to linux build tree make ARCH=x86_64 If you fix the issue, kindly add following tag Reported-by: kbuild test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): drivers/leds/leds-max77650.c: In function 'max77650_led_probe': >> drivers/leds/leds-max77650.c:121:3: error: implicit declaration of function 'devm_of_led_classdev_register' [-Werror=implicit-function-declaration] rv = devm_of_led_classdev_register(dev, child, &led->cdev); ^ cc1: some warnings being treated as errors vim +/devm_of_led_classdev_register +121 drivers/leds/leds-max77650.c 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 62 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 63 static int max77650_led_probe(struct platform_device *pdev) 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 64 { 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 65 struct device_node *of_node, *child; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 66 struct max77650_led *leds, *led; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 67 struct device *dev; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 68 struct regmap *map; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 69 const char *label; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 70 int rv, num_leds; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 71 u32 reg; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 72 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 73 dev = &pdev->dev; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 74 of_node = dev->of_node; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 75 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 76 if (!of_node) 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 77 return -ENODEV; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 78 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 79 leds = devm_kcalloc(dev, sizeof(*leds), 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 80 MAX77650_LED_NUM_LEDS, GFP_KERNEL); 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 81 if (!leds) 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 82 return -ENOMEM; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 83 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 84 map = dev_get_regmap(dev->parent, NULL); 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 85 if (!map) 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 86 return -ENODEV; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 87 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 88 num_leds = of_get_child_count(of_node); 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 89 if (!num_leds || num_leds > MAX77650_LED_NUM_LEDS) 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 90 return -ENODEV; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 91 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 92 for_each_child_of_node(of_node, child) { 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 93 rv = of_property_read_u32(child, "reg", ®); 730f693d79da813 Nishka Dasgupta 2019-07-11 94 if (rv || reg >= MAX77650_LED_NUM_LEDS) { 730f693d79da813 Nishka Dasgupta 2019-07-11 95 rv = -EINVAL; 730f693d79da813 Nishka Dasgupta 2019-07-11 96 goto err_node_put; 730f693d79da813 Nishka Dasgupta 2019-07-11 97 } 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 98 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 99 led = &leds[reg]; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 100 led->map = map; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 101 led->regA = MAX77650_LED_A_BASE + reg; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 102 led->regB = MAX77650_LED_B_BASE + reg; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 103 led->cdev.brightness_set_blocking = max77650_led_brightness_set; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 104 led->cdev.max_brightness = MAX77650_LED_MAX_BRIGHTNESS; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 105 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 106 label = of_get_property(child, "label", NULL); 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 107 if (!label) { 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 108 led->cdev.name = "max77650::"; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 109 } else { 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 110 led->cdev.name = devm_kasprintf(dev, GFP_KERNEL, 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 111 "max77650:%s", label); 730f693d79da813 Nishka Dasgupta 2019-07-11 112 if (!led->cdev.name) { 730f693d79da813 Nishka Dasgupta 2019-07-11 113 rv = -ENOMEM; 730f693d79da813 Nishka Dasgupta 2019-07-11 114 goto err_node_put; 730f693d79da813 Nishka Dasgupta 2019-07-11 115 } 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 116 } 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 117 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 118 of_property_read_string(child, "linux,default-trigger", 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 119 &led->cdev.default_trigger); 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 120 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 @121 rv = devm_of_led_classdev_register(dev, child, &led->cdev); 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 122 if (rv) 730f693d79da813 Nishka Dasgupta 2019-07-11 123 goto err_node_put; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 124 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 125 rv = regmap_write(map, led->regA, MAX77650_LED_A_DEFAULT); 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 126 if (rv) 730f693d79da813 Nishka Dasgupta 2019-07-11 127 goto err_node_put; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 128 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 129 rv = regmap_write(map, led->regB, MAX77650_LED_B_DEFAULT); 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 130 if (rv) 730f693d79da813 Nishka Dasgupta 2019-07-11 131 goto err_node_put; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 132 } 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 133 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 134 return regmap_write(map, 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 135 MAX77650_REG_CNFG_LED_TOP, 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 136 MAX77650_LED_TOP_DEFAULT); 730f693d79da813 Nishka Dasgupta 2019-07-11 137 err_node_put: 730f693d79da813 Nishka Dasgupta 2019-07-11 138 of_node_put(child); 730f693d79da813 Nishka Dasgupta 2019-07-11 139 return rv; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 140 } 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 141 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 142 static struct platform_driver max77650_led_driver = { 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 143 .driver = { 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 144 .name = "max77650-led", 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 145 }, 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 146 .probe = max77650_led_probe, 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 147 }; 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 148 module_platform_driver(max77650_led_driver); 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 149 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 150 MODULE_DESCRIPTION("MAXIM 77650/77651 LED driver"); 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 151 MODULE_AUTHOR("Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>"); 5be102eb161a0c1 Bartosz Golaszewski 2019-04-23 152 MODULE_LICENSE("GPL v2"); 51251542c9688c3 Bartosz Golaszewski 2019-07-03 153 MODULE_ALIAS("platform:max77650-led"); :::::: The code at line 121 was first introduced by commit :::::: 5be102eb161a0c17b64cf104ccef48ffc9d3e361 leds: max77650: Add LEDs support :::::: TO: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx> :::::: CC: Lee Jones <lee.jones@xxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip