Re: [PATCH v3 2/6] watchdog: w83627hf_wdt: Convert to platform driver model
From: kernel test robot
Date: Wed Oct 07 2026 - 13:06:11 EST
Hi Paul,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 028ef9c96e96197026887c0f092424679298aae8]
url: https://github.com/intel-lab-lkp/linux/commits/Paul-Louvel/watchdog-w83627hf_wdt-Replace-magic-numbers-with-descriptive-macros/20261004-141249
base: 028ef9c96e96197026887c0f092424679298aae8
patch link: https://lore.kernel.org/r/20261004-w83627hf_wdt-improvements-v3-2-8e27b518595e%40bootlin.com
patch subject: [PATCH v3 2/6] watchdog: w83627hf_wdt: Convert to platform driver model
config: parisc-allyesconfig (https://download.01.org/0day-ci/archive/20261008/202610080027.3OsJDwfo-lkp@xxxxxxxxx/config)
compiler: hppa-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261008/202610080027.3OsJDwfo-lkp@xxxxxxxxx/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 <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610080027.3OsJDwfo-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
drivers/watchdog/w83627hf_wdt.c: In function 'wdt_probe':
>> drivers/watchdog/w83627hf_wdt.c:483:30: warning: 'snprintf' output may be truncated before the last format character [-Wformat-truncation=]
483 | "%s Watchdog", id->name);
| ^
drivers/watchdog/w83627hf_wdt.c:482:9: note: 'snprintf' output between 10 and 33 bytes into a destination of size 32
482 | snprintf(data->info.identity, sizeof(data->info.identity),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
483 | "%s Watchdog", id->name);
| ~~~~~~~~~~~~~~~~~~~~~~~~
vim +/snprintf +483 drivers/watchdog/w83627hf_wdt.c
460
461 static int wdt_probe(struct platform_device *pdev)
462 {
463 const struct platform_device_id *id = platform_get_device_id(pdev);
464 struct device *dev = &pdev->dev;
465 struct watchdog_device *wdd;
466 struct w83627hf_data *data;
467 enum chips chip;
468 int ret;
469
470 dev_info(dev, "WDT driver initialising\n");
471
472 if (!id)
473 return dev_err_probe(dev, -EINVAL, "failed to get chip id\n");
474
475 chip = id->driver_data;
476
477 data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
478 if (!data)
479 return -ENOMEM;
480
481 data->info.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE;
482 snprintf(data->info.identity, sizeof(data->info.identity),
> 483 "%s Watchdog", id->name);
484
485 wdd = &data->wdd;
486
487 wdd->parent = dev;
488 wdd->info = &data->info;
489 wdd->ops = &wdt_ops;
490 wdd->timeout = WATCHDOG_TIMEOUT;
491 wdd->min_timeout = 1;
492 wdd->max_timeout = 255;
493
494 watchdog_set_drvdata(wdd, data);
495 watchdog_init_timeout(wdd, timeout, NULL);
496 watchdog_set_nowayout(wdd, nowayout);
497 watchdog_stop_on_reboot(wdd);
498
499 ret = w83627hf_init(wdd, chip);
500 if (ret)
501 return dev_err_probe(dev, ret, "failed to initialize watchdog\n");
502
503 ret = devm_watchdog_register_device(dev, wdd);
504 if (ret)
505 return ret;
506
507 dev_info(dev, "initialized. timeout=%d sec (nowayout=%d)\n",
508 wdd->timeout, nowayout);
509
510 return ret;
511 }
512
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki