[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87137253-82a8-a070-2378-5e965987a34f@infradead.org>
Date: Fri, 11 Feb 2022 10:08:06 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: Daniel Bristot de Oliveira <bristot@...nel.org>,
Wim Van Sebroeck <wim@...ux-watchdog.org>,
Guenter Roeck <linux@...ck-us.net>
Cc: linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] watchdog: Improve watchdog_dev function documentation
Hi Daniel,
On 2/11/22 06:30, Daniel Bristot de Oliveira wrote:
> Adjust function comments to the kernel doc format. It
> also adjusts some variable names and adds return values.
>
> No functional change.
>
> Changes from V1:
> Change "Returns" to "Return:" (Randy Dunlap)
>
> Cc: Wim Van Sebroeck <wim@...ux-watchdog.org>
> Cc: Guenter Roeck <linux@...ck-us.net>
> Cc: Randy Dunlap <rdunlap@...radead.org>
> Cc: linux-watchdog@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Daniel Bristot de Oliveira <bristot@...nel.org>
scripts/kernel-doc throws one warning:
watchdog_dev.c:1194: warning: contents before sections
which is a bug in the script IMO.
I would just ignore this one.
(see more below)
Tested-by: Randy Dunlap <rdunlap@...radead.org>
Acked-by: Randy Dunlap <rdunlap@...radead.org>
Thanks.
> ---
> drivers/watchdog/watchdog_dev.c | 244 ++++++++++++++++----------------
> 1 file changed, 125 insertions(+), 119 deletions(-)
>
> diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c
> index 3a3d8b5c7ad5..54903f3c851e 100644
> --- a/drivers/watchdog/watchdog_dev.c
> +++ b/drivers/watchdog/watchdog_dev.c
scripts/kernel-doc does not nicely handle a function that has
no parameters (hence no @param descriptions) that is followed
by a function description.
Adding one line (I am not suggesting this as a patch) stops the
warning:
* @void: none
This is the function that kernel-doc complains about
(nothing wrong with it):
/**
* watchdog_dev_init - init dev part of watchdog core
*
* Allocate a range of chardev nodes to use for watchdog devices.
*
* Return: 0 if successful, error otherwise.
*/
int __init watchdog_dev_init(void)
{
--
~Randy
Powered by blists - more mailing lists