* drivers/watchdog/w83627hf_wdt.c:477:76: warning: 'snprintf' output may be truncated before the last format character
@ 2026-07-28 1:18 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-07-28 1:18 UTC (permalink / raw)
To: Paul Louvel; +Cc: oe-kbuild-all, 0day robot
tree: https://github.com/intel-lab-lkp/linux/commits/Paul-Louvel/watchdog-w83627hf_wdt-Replace-magic-numbers-with-descriptive-macros/20260727-030530
head: 755bcbc553aec8647f0f337daf2a12011b6e76b2
commit: 31600ea3f7702c3248b36b22a275225428a0092c watchdog: w83627hf_wdt: Convert to platform driver model
date: 30 hours ago
config: x86_64-randconfig-2005-20250721 (https://download.01.org/0day-ci/archive/20260728/202607280322.11cbY6i7-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260728/202607280322.11cbY6i7-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607280322.11cbY6i7-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/watchdog/w83627hf_wdt.c: In function 'wdt_probe':
>> drivers/watchdog/w83627hf_wdt.c:477:76: warning: 'snprintf' output may be truncated before the last format character [-Wformat-truncation=]
477 | snprintf(wdt_info.identity, sizeof(wdt_info.identity), "%s Watchdog",
| ^
drivers/watchdog/w83627hf_wdt.c:477:9: note: 'snprintf' output between 10 and 33 bytes into a destination of size 32
477 | snprintf(wdt_info.identity, sizeof(wdt_info.identity), "%s Watchdog",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
478 | id->name);
| ~~~~~~~~~
vim +/snprintf +477 drivers/watchdog/w83627hf_wdt.c
467
468 static int wdt_probe(struct platform_device *pdev)
469 {
470 const struct platform_device_id *id = platform_get_device_id(pdev);
471 enum chips chip = id->driver_data;
472 struct device *dev = &pdev->dev;
473 int ret;
474
475 dev_info(dev, "WDT driver initialising\n");
476
> 477 snprintf(wdt_info.identity, sizeof(wdt_info.identity), "%s Watchdog",
478 id->name);
479
480 watchdog_init_timeout(&wdt_dev, timeout, NULL);
481 watchdog_set_nowayout(&wdt_dev, nowayout);
482 watchdog_stop_on_reboot(&wdt_dev);
483
484 ret = w83627hf_init(&wdt_dev, chip);
485 if (ret)
486 return dev_err_probe(dev, ret, "failed to initialize watchdog\n");
487
488 ret = devm_watchdog_register_device(&pdev->dev, &wdt_dev);
489 if (ret)
490 return ret;
491
492 dev_info(dev, "initialized. timeout=%d sec (nowayout=%d)\n",
493 wdt_dev.timeout, nowayout);
494
495 return ret;
496 }
497
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-28 1:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-28 1:18 drivers/watchdog/w83627hf_wdt.c:477:76: warning: 'snprintf' output may be truncated before the last format character kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.