Re: [PATCH v12 4/5] watchdog: Add RAVE SP watchdog driver

From: kbuild test robot
Date: Sun Nov 12 2017 - 12:04:03 EST


Hi Andrey,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.14-rc8]
[cannot apply to next-20171110]
[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/Andrey-Smirnov/ZII-RAVE-platform-driver/20171112-215306
config: blackfin-allyesconfig (attached as .config)
compiler: bfin-uclinux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=blackfin

All errors (new ones prefixed by >>):

drivers/watchdog/rave-sp-wdt.c: In function 'rave_sp_wdt_probe':
>> drivers/watchdog/rave-sp-wdt.c:314:8: error: implicit declaration of function 'devm_register_reboot_notifier' [-Werror=implicit-function-declaration]
ret = devm_register_reboot_notifier(dev, &sp_wd->reboot_notifier);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

vim +/devm_register_reboot_notifier +314 drivers/watchdog/rave-sp-wdt.c

265
266 static int rave_sp_wdt_probe(struct platform_device *pdev)
267 {
268 struct device *dev = &pdev->dev;
269 const struct of_device_id *id;
270 struct watchdog_device *wdd;
271 struct rave_sp_wdt *sp_wd;
272 struct nvmem_cell *cell;
273 __le16 timeout = 0;
274 int ret;
275
276 id = of_match_device(rave_sp_wdt_variants, dev->parent);
277 if (!id) {
278 dev_err(dev, "Unknown parent device variant. Bailing out\n");
279 return -ENODEV;
280 }
281
282 sp_wd = devm_kzalloc(dev, sizeof(*sp_wd), GFP_KERNEL);
283 if (!sp_wd)
284 return -ENOMEM;
285
286 sp_wd->variant = id->data;
287 sp_wd->sp = dev_get_drvdata(dev->parent);
288
289 wdd = &sp_wd->wdd;
290 wdd->parent = dev;
291 wdd->info = &rave_sp_wdt_info;
292 wdd->ops = &rave_sp_wdt_ops;
293 wdd->min_timeout = sp_wd->variant->min_timeout;
294 wdd->max_timeout = sp_wd->variant->max_timeout;
295 wdd->status = WATCHDOG_NOWAYOUT_INIT_STATUS;
296 wdd->timeout = 60;
297
298 cell = nvmem_cell_get(dev, "wdt-timeout");
299 if (!IS_ERR(cell)) {
300 size_t len;
301 void *value = nvmem_cell_read(cell, &len);
302
303 if (!IS_ERR(value)) {
304 memcpy(&timeout, value, min(len, sizeof(timeout)));
305 kfree(value);
306 }
307 nvmem_cell_put(cell);
308 }
309 watchdog_init_timeout(wdd, le16_to_cpu(timeout), dev);
310 watchdog_set_restart_priority(wdd, 255);
311 watchdog_stop_on_unregister(wdd);
312
313 sp_wd->reboot_notifier.notifier_call = rave_sp_wdt_reboot_notifier;
> 314 ret = devm_register_reboot_notifier(dev, &sp_wd->reboot_notifier);
315 if (ret) {
316 dev_err(dev, "Failed to register reboot notifier\n");
317 return ret;
318 }
319
320 /*
321 * We don't know if watchdog is running now. To be sure, let's
322 * start it and depend on watchdog core to ping it
323 */
324 wdd->max_hw_heartbeat_ms = wdd->max_timeout * 1000;
325 ret = rave_sp_wdt_start(wdd);
326 if (ret) {
327 dev_err(dev, "Watchdog didn't start\n");
328 return ret;
329 }
330
331 ret = devm_watchdog_register_device(dev, wdd);
332 if (ret) {
333 dev_err(dev, "Failed to register watchdog device\n");
334 rave_sp_wdt_stop(wdd);
335 return ret;
336 }
337
338 return 0;
339 }
340

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip