drivers/watchdog/it87_wdt.c:321: warning: Function parameter or member 'wdd' not described in 'wdt_set_timeout'

From: kernel test robot
Date: Sat Nov 11 2023 - 16:00:23 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3ca112b71f35dd5d99fc4571a56b5fc6f0c15814
commit: 1d7b80394c48a56c705733cb6c044199ffbf1dfd watchdog: it87: Convert to use watchdog core infrastructure
date: 6 years ago
config: x86_64-randconfig-a001-20230604 (https://download.01.org/0day-ci/archive/20231112/202311120459.240skMhF-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231112/202311120459.240skMhF-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/202311120459.240skMhF-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

In file included from drivers/watchdog/it87_wdt.c:31:
include/linux/module.h:131:13: warning: 'init_module' specifies less restrictive attribute than its target 'it87_wdt_init': 'cold' [-Wmissing-attributes]
131 | int init_module(void) __attribute__((alias(#initfn)));
| ^~~~~~~~~~~
drivers/watchdog/it87_wdt.c:557:1: note: in expansion of macro 'module_init'
557 | module_init(it87_wdt_init);
| ^~~~~~~~~~~
drivers/watchdog/it87_wdt.c:367:19: note: 'init_module' target declared here
367 | static int __init it87_wdt_init(void)
| ^~~~~~~~~~~~~
include/linux/module.h:137:14: warning: 'cleanup_module' specifies less restrictive attribute than its target 'it87_wdt_exit': 'cold' [-Wmissing-attributes]
137 | void cleanup_module(void) __attribute__((alias(#exitfn)));
| ^~~~~~~~~~~~~~
drivers/watchdog/it87_wdt.c:558:1: note: in expansion of macro 'module_exit'
558 | module_exit(it87_wdt_exit);
| ^~~~~~~~~~~
drivers/watchdog/it87_wdt.c:529:20: note: 'cleanup_module' target declared here
529 | static void __exit it87_wdt_exit(void)
| ^~~~~~~~~~~~~
>> drivers/watchdog/it87_wdt.c:321: warning: Function parameter or member 'wdd' not described in 'wdt_set_timeout'


vim +321 drivers/watchdog/it87_wdt.c

e1fee94f346387 Oliver Schuster 2008-03-05 309
e1fee94f346387 Oliver Schuster 2008-03-05 310 /**
e1fee94f346387 Oliver Schuster 2008-03-05 311 * wdt_set_timeout - set a new timeout value with watchdog ioctl
e1fee94f346387 Oliver Schuster 2008-03-05 312 * @t: timeout value in seconds
e1fee94f346387 Oliver Schuster 2008-03-05 313 *
dfb0b8eae1f78c Ondrej Zajicek 2010-09-14 314 * The hardware device has a 8 or 16 bit watchdog timer (depends on
dfb0b8eae1f78c Ondrej Zajicek 2010-09-14 315 * chip version) that can be configured to count seconds or minutes.
e1fee94f346387 Oliver Schuster 2008-03-05 316 *
e1fee94f346387 Oliver Schuster 2008-03-05 317 * Used within WDIOC_SETTIMEOUT watchdog device ioctl.
e1fee94f346387 Oliver Schuster 2008-03-05 318 */
e1fee94f346387 Oliver Schuster 2008-03-05 319
1d7b80394c48a5 Guenter Roeck 2017-06-10 320 static int wdt_set_timeout(struct watchdog_device *wdd, unsigned int t)
e1fee94f346387 Oliver Schuster 2008-03-05 @321 {
1d7b80394c48a5 Guenter Roeck 2017-06-10 322 int ret = 0;
e1fee94f346387 Oliver Schuster 2008-03-05 323
dfb0b8eae1f78c Ondrej Zajicek 2010-09-14 324 if (t > max_units)
1d7b80394c48a5 Guenter Roeck 2017-06-10 325 t = wdt_round_time(t);
e1fee94f346387 Oliver Schuster 2008-03-05 326
1d7b80394c48a5 Guenter Roeck 2017-06-10 327 wdd->timeout = t;
e1fee94f346387 Oliver Schuster 2008-03-05 328
1d7b80394c48a5 Guenter Roeck 2017-06-10 329 if (watchdog_hw_running(wdd))
1d7b80394c48a5 Guenter Roeck 2017-06-10 330 ret = wdt_update_timeout();
e1fee94f346387 Oliver Schuster 2008-03-05 331
a134b825608df6 Nat Gurumoorthy 2011-05-09 332 return ret;
a134b825608df6 Nat Gurumoorthy 2011-05-09 333 }
e1fee94f346387 Oliver Schuster 2008-03-05 334

:::::: The code at line 321 was first introduced by commit
:::::: e1fee94f346387739e683b31815ab54dc0a30bd6 [WATCHDOG] add watchdog driver IT8716 IT8726 IT8712J/K

:::::: TO: Oliver Schuster <olivers137@xxxxxxx>
:::::: CC: Wim Van Sebroeck <wim@xxxxxxxxx>

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