Skip to contentSkip to conversation

watchdog: Add kernel-doc for wdt_set_timeout()

PATCH In review Yang Li 2 participants 2 messages Feb 6, 2024 Watchdog device drivers

lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 watchdog: Add kernel-doc for wdt_set_timeout()

The wdt_set_timeout function lacked a complete kernel-doc description. This patch adds missing parameter and return value descriptions in accordance with kernel-doc standards.

---
 drivers/watchdog/it87_wdt.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/watchdog/it87_wdt.c +4 -0
index 9297a5891912..3e8c15138edd 100644
@@ -213,12 +213,16 @@ static int wdt_stop(struct watchdog_device *wdd)
 
 /**
  *	wdt_set_timeout - set a new timeout value with watchdog ioctl
+ *	@wdd: pointer to the watchdog_device structure
  *	@t: timeout value in seconds
  *
  *	The hardware device has a 8 or 16 bit watchdog timer (depends on
  *	chip version) that can be configured to count seconds or minutes.
  *
  *	Used within WDIOC_SETTIMEOUT watchdog device ioctl.
+ *
+ *	Return: 0 if the timeout was set successfully, or a negative error code on
+ *	failure.
  */
 
 static int wdt_set_timeout(struct watchdog_device *wdd, unsigned int t)
Signature · 1 line
2.20.1.7.g153144c
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Yang Li

The wdt_set_timeout function lacked a complete kernel-doc description. This patch adds missing parameter and return value descriptions in accordance with kernel-doc standards.

Quoted 25 lines
---
  drivers/watchdog/it87_wdt.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/watchdog/it87_wdt.c +4 -0
index 9297a5891912..3e8c15138edd 100644
@@ -213,12 +213,16 @@ static int wdt_stop(struct watchdog_device *wdd)
 
  /**
   *	wdt_set_timeout - set a new timeout value with watchdog ioctl
+ *	@wdd: pointer to the watchdog_device structure
   *	@t: timeout value in seconds
   *
   *	The hardware device has a 8 or 16 bit watchdog timer (depends on
   *	chip version) that can be configured to count seconds or minutes.
   *
   *	Used within WDIOC_SETTIMEOUT watchdog device ioctl.
+ *
+ *	Return: 0 if the timeout was set successfully, or a negative error code on
+ *	failure.
   */
 
  static int wdt_set_timeout(struct watchdog_device *wdd, unsigned int t)