Re: [PATCH] watchdog: sunxi_wdt: stop the watchdog across system suspend

From: kernel test robot

Date: Tue Nov 17 2026 - 10:52:37 EST


Hi Yang,

kernel test robot noticed the following build warnings:

[auto build test WARNING on aebb7274476403040d582c61478df8f4a7bf9cd3]

url: https://github.com/intel-lab-lkp/linux/commits/Yang-Siyuan/watchdog-sunxi_wdt-stop-the-watchdog-across-system-suspend/20261117-172036
base: aebb7274476403040d582c61478df8f4a7bf9cd3
patch link: https://lore.kernel.org/r/20261117092036.12192-1-hsyysy%40163.com
patch subject: [PATCH] watchdog: sunxi_wdt: stop the watchdog across system suspend
config: csky-randconfig-1001-20261117 (https://download.01.org/0day-ci/archive/20261117/202611172344.RbQl66xu-lkp@xxxxxxxxx/config)
compiler: csky-linux-gcc (GCC) 13.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261117/202611172344.RbQl66xu-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/202611172344.RbQl66xu-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/watchdog/sunxi_wdt.c:245:12: warning: 'sunxi_wdt_resume' defined but not used [-Wunused-function]
245 | static int sunxi_wdt_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~
>> drivers/watchdog/sunxi_wdt.c:235:12: warning: 'sunxi_wdt_suspend' defined but not used [-Wunused-function]
235 | static int sunxi_wdt_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~


vim +/sunxi_wdt_resume +245 drivers/watchdog/sunxi_wdt.c

228
229 /*
230 * The hardware watchdog has a maximum timeout of 16 seconds. A system
231 * suspend easily lasts longer than that, and the watchdog core only cancels
232 * its ping worker during suspend; it does not stop the timer. Stop the
233 * watchdog explicitly while suspended and re-arm it on resume.
234 */
> 235 static int sunxi_wdt_suspend(struct device *dev)
236 {
237 struct sunxi_wdt_dev *sunxi_wdt = dev_get_drvdata(dev);
238
239 sunxi_wdt->running_at_suspend = sunxi_wdt_is_running(&sunxi_wdt->wdt_dev);
240 sunxi_wdt_stop(&sunxi_wdt->wdt_dev);
241
242 return 0;
243 }
244
> 245 static int sunxi_wdt_resume(struct device *dev)
246 {
247 struct sunxi_wdt_dev *sunxi_wdt = dev_get_drvdata(dev);
248
249 if (sunxi_wdt->running_at_suspend)
250 sunxi_wdt_start(&sunxi_wdt->wdt_dev);
251
252 return 0;
253 }
254

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki