[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201902140603.W0QLfC1y%fengguang.wu@intel.com>
Date: Thu, 14 Feb 2019 06:08:10 +0800
From: kbuild test robot <lkp@...el.com>
To: Bartosz Golaszewski <brgl@...ev.pl>
Cc: kbuild-all@...org, Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Linus Walleij <linus.walleij@...aro.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Jacek Anaszewski <jacek.anaszewski@...il.com>,
Pavel Machek <pavel@....cz>, Lee Jones <lee.jones@...aro.org>,
Sebastian Reichel <sre@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
devicetree@...r.kernel.org, linux-input@...r.kernel.org,
linux-leds@...r.kernel.org, linux-pm@...r.kernel.org,
Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: Re: [PATCH v3 09/11] leds: max77650: add LEDs support
Hi Bartosz,
I love your patch! Yet something to improve:
[auto build test ERROR on ljones-mfd/for-mfd-next]
[also build test ERROR on v5.0-rc4 next-20190212]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Bartosz-Golaszewski/mfd-add-support-for-max77650-PMIC/20190203-031133
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
config: x86_64-randconfig-s5-02140238 (attached as .config)
compiler: gcc-8 (Debian 8.2.0-20) 8.2.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
ld: drivers/leds/leds-max77650.o: in function `max77650_led_probe':
>> drivers/leds/leds-max77650.c:119: undefined reference to `devm_of_led_classdev_register'
vim +119 drivers/leds/leds-max77650.c
62
63 static int max77650_led_probe(struct platform_device *pdev)
64 {
65 struct device_node *of_node, *child;
66 struct max77650_led *leds, *led;
67 struct device *parent;
68 struct device *dev;
69 struct regmap *map;
70 const char *label;
71 int rv, num_leds;
72 u32 reg;
73
74 dev = &pdev->dev;
75 parent = dev->parent;
76 of_node = dev->of_node;
77
78 if (!of_node)
79 return -ENODEV;
80
81 leds = devm_kcalloc(dev, sizeof(*leds),
82 MAX77650_LED_NUM_LEDS, GFP_KERNEL);
83 if (!leds)
84 return -ENOMEM;
85
86 map = dev_get_regmap(dev->parent, NULL);
87 if (!map)
88 return -ENODEV;
89
90 num_leds = of_get_child_count(of_node);
91 if (!num_leds || num_leds > MAX77650_LED_NUM_LEDS)
92 return -ENODEV;
93
94 for_each_child_of_node(of_node, child) {
95 rv = of_property_read_u32(child, "reg", ®);
96 if (rv || reg >= MAX77650_LED_NUM_LEDS)
97 return -EINVAL;
98
99 led = &leds[reg];
100 led->map = map;
101 led->regA = MAX77650_LED_A_BASE + reg;
102 led->regB = MAX77650_LED_B_BASE + reg;
103 led->cdev.brightness_set_blocking = max77650_led_brightness_set;
104 led->cdev.max_brightness = MAX77650_LED_MAX_BRIGHTNESS;
105
106 label = of_get_property(child, "label", NULL);
107 if (!label) {
108 led->cdev.name = "max77650::";
109 } else {
110 led->cdev.name = devm_kasprintf(dev, GFP_KERNEL,
111 "max77650:%s", label);
112 if (!led->cdev.name)
113 return -ENOMEM;
114 }
115
116 of_property_read_string(child, "linux,default-trigger",
117 &led->cdev.default_trigger);
118
> 119 rv = devm_of_led_classdev_register(dev, child, &led->cdev);
120 if (rv)
121 return rv;
122
123 rv = regmap_write(map, led->regA, MAX77650_LED_A_DEFAULT);
124 if (rv)
125 return rv;
126
127 rv = regmap_write(map, led->regB, MAX77650_LED_B_DEFAULT);
128 if (rv)
129 return rv;
130 }
131
132 return regmap_write(map,
133 MAX77650_REG_CNFG_LED_TOP,
134 MAX77650_LED_TOP_DEFAULT);
135 }
136
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (27603 bytes)
Powered by blists - more mailing lists