[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202212151249.n5gyn23k-lkp@intel.com>
Date: Thu, 15 Dec 2022 12:40:40 +0800
From: kernel test robot <lkp@...el.com>
To: Christian Marangi <ansuelsmth@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Jonathan Corbet <corbet@....net>, Pavel Machek <pavel@....cz>,
"Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
John Crispin <john@...ozen.org>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
linux-leds@...r.kernel.org, Tim Harvey <tharvey@...eworks.com>,
Alexander Stein <alexander.stein@...tq-group.com>,
Rasmus Villemoes <rasmus.villemoes@...vas.dk>
Cc: oe-kbuild-all@...ts.linux.dev, netdev@...r.kernel.org,
Marek BehĂșn <kabel@...nel.org>
Subject: Re: [PATCH v7 01/11] leds: add support for hardware driven LEDs
Hi Christian,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on pavel-leds/for-next]
[also build test ERROR on robh/for-next net-next/master net/master linus/master v6.1 next-20221215]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Christian-Marangi/Adds-support-for-PHY-LEDs-with-offload-triggers/20221215-080414
base: git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git for-next
patch link: https://lore.kernel.org/r/20221214235438.30271-2-ansuelsmth%40gmail.com
patch subject: [PATCH v7 01/11] leds: add support for hardware driven LEDs
config: arc-randconfig-r005-20221214
compiler: arceb-elf-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/f714ac6012266bf89c4c1b7d5e6ebaf50d4c525c
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Christian-Marangi/Adds-support-for-PHY-LEDs-with-offload-triggers/20221215-080414
git checkout f714ac6012266bf89c4c1b7d5e6ebaf50d4c525c
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/leds/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
drivers/leds/led-triggers.c: In function 'led_trigger_set':
>> drivers/leds/led-triggers.c:205:29: error: 'struct led_classdev' has no member named 'hw_control_status'
205 | led_cdev->hw_control_status(led_cdev))
| ^~
>> drivers/leds/led-triggers.c:206:33: error: 'struct led_classdev' has no member named 'hw_control_stop'
206 | led_cdev->hw_control_stop(led_cdev);
| ^~
vim +205 drivers/leds/led-triggers.c
177
178 /* Caller must ensure led_cdev->trigger_lock held */
179 int led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trig)
180 {
181 char *event = NULL;
182 char *envp[2];
183 const char *name;
184 int ret;
185
186 if (!led_cdev->trigger && !trig)
187 return 0;
188
189 name = trig ? trig->name : "none";
190 event = kasprintf(GFP_KERNEL, "TRIGGER=%s", name);
191
192 /* Remove any existing trigger */
193 if (led_cdev->trigger) {
194 spin_lock(&led_cdev->trigger->leddev_list_lock);
195 list_del_rcu(&led_cdev->trig_list);
196 spin_unlock(&led_cdev->trigger->leddev_list_lock);
197
198 /* ensure it's no longer visible on the led_cdevs list */
199 synchronize_rcu();
200
201 cancel_work_sync(&led_cdev->set_brightness_work);
202 led_stop_software_blink(led_cdev);
203 /* Disable hardware mode on trigger change if supported */
204 if (led_cdev->blink_mode != SOFTWARE_CONTROLLED &&
> 205 led_cdev->hw_control_status(led_cdev))
> 206 led_cdev->hw_control_stop(led_cdev);
207 if (led_cdev->trigger->deactivate)
208 led_cdev->trigger->deactivate(led_cdev);
209 device_remove_groups(led_cdev->dev, led_cdev->trigger->groups);
210 led_cdev->trigger = NULL;
211 led_cdev->trigger_data = NULL;
212 led_cdev->activated = false;
213 led_set_brightness(led_cdev, LED_OFF);
214 }
215 if (trig) {
216 /* Make sure the trigger support the LED blink mode */
217 if (!led_trigger_is_supported(led_cdev, trig))
218 return -EINVAL;
219
220 spin_lock(&trig->leddev_list_lock);
221 list_add_tail_rcu(&led_cdev->trig_list, &trig->led_cdevs);
222 spin_unlock(&trig->leddev_list_lock);
223 led_cdev->trigger = trig;
224
225 if (trig->activate)
226 ret = trig->activate(led_cdev);
227 else
228 ret = 0;
229
230 if (ret)
231 goto err_activate;
232
233 ret = device_add_groups(led_cdev->dev, trig->groups);
234 if (ret) {
235 dev_err(led_cdev->dev, "Failed to add trigger attributes\n");
236 goto err_add_groups;
237 }
238 }
239
240 if (event) {
241 envp[0] = event;
242 envp[1] = NULL;
243 if (kobject_uevent_env(&led_cdev->dev->kobj, KOBJ_CHANGE, envp))
244 dev_err(led_cdev->dev,
245 "%s: Error sending uevent\n", __func__);
246 kfree(event);
247 }
248
249 return 0;
250
251 err_add_groups:
252
253 if (trig->deactivate)
254 trig->deactivate(led_cdev);
255 err_activate:
256
257 spin_lock(&led_cdev->trigger->leddev_list_lock);
258 list_del_rcu(&led_cdev->trig_list);
259 spin_unlock(&led_cdev->trigger->leddev_list_lock);
260 synchronize_rcu();
261 led_cdev->trigger = NULL;
262 led_cdev->trigger_data = NULL;
263 led_set_brightness(led_cdev, LED_OFF);
264 kfree(event);
265
266 return ret;
267 }
268 EXPORT_SYMBOL_GPL(led_trigger_set);
269
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (112890 bytes)
Powered by blists - more mailing lists