* [PATCH] watchdog: clarify that stop() is optional
@ 2020-04-03 3:15 Bumsik Kim
2020-04-03 4:07 ` Guenter Roeck
0 siblings, 1 reply; 3+ messages in thread
From: Bumsik Kim @ 2020-04-03 3:15 UTC (permalink / raw)
To: wim, linux, corbet; +Cc: linux-kernel, linux-watchdog, Bumsik Kim
The commit d0684c8a9354 ("watchdog: Make stop function optional")
made stop function not mandatory, but the comments
and the doc weren't reflected. Fix it to clarify.
Signed-off-by: Bumsik Kim <k.bumsik@gmail.com>
---
Documentation/watchdog/convert_drivers_to_kernel_api.rst | 2 +-
Documentation/watchdog/watchdog-kernel-api.rst | 2 +-
include/linux/watchdog.h | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/watchdog/convert_drivers_to_kernel_api.rst b/Documentation/watchdog/convert_drivers_to_kernel_api.rst
index dd934cc08e40..51b999b5551a 100644
--- a/Documentation/watchdog/convert_drivers_to_kernel_api.rst
+++ b/Documentation/watchdog/convert_drivers_to_kernel_api.rst
@@ -115,7 +115,7 @@ Add the watchdog operations
---------------------------
All possible callbacks are defined in 'struct watchdog_ops'. You can find it
-explained in 'watchdog-kernel-api.txt' in this directory. start(), stop() and
+explained in 'watchdog-kernel-api.txt' in this directory. start() and
owner must be set, the rest are optional. You will easily find corresponding
functions in the old driver. Note that you will now get a pointer to the
watchdog_device as a parameter to these functions, so you probably have to
diff --git a/Documentation/watchdog/watchdog-kernel-api.rst b/Documentation/watchdog/watchdog-kernel-api.rst
index 864edbe932c1..068a55ee0d4a 100644
--- a/Documentation/watchdog/watchdog-kernel-api.rst
+++ b/Documentation/watchdog/watchdog-kernel-api.rst
@@ -123,8 +123,8 @@ The list of watchdog operations is defined as::
struct module *owner;
/* mandatory operations */
int (*start)(struct watchdog_device *);
- int (*stop)(struct watchdog_device *);
/* optional operations */
+ int (*stop)(struct watchdog_device *);
int (*ping)(struct watchdog_device *);
unsigned int (*status)(struct watchdog_device *);
int (*set_timeout)(struct watchdog_device *, unsigned int);
diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h
index 417d9f37077a..1464ce6ffa31 100644
--- a/include/linux/watchdog.h
+++ b/include/linux/watchdog.h
@@ -37,15 +37,15 @@ struct watchdog_governor;
*
* The watchdog_ops structure contains a list of low-level operations
* that control a watchdog device. It also contains the module that owns
- * these operations. The start and stop function are mandatory, all other
+ * these operations. The start function is mandatory, all other
* functions are optional.
*/
struct watchdog_ops {
struct module *owner;
/* mandatory operations */
int (*start)(struct watchdog_device *);
- int (*stop)(struct watchdog_device *);
/* optional operations */
+ int (*stop)(struct watchdog_device *);
int (*ping)(struct watchdog_device *);
unsigned int (*status)(struct watchdog_device *);
int (*set_timeout)(struct watchdog_device *, unsigned int);
--
2.26.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] watchdog: clarify that stop() is optional
2020-04-03 3:15 [PATCH] watchdog: clarify that stop() is optional Bumsik Kim
@ 2020-04-03 4:07 ` Guenter Roeck
2020-04-20 23:12 ` Jonathan Corbet
0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2020-04-03 4:07 UTC (permalink / raw)
To: Bumsik Kim, wim, corbet; +Cc: linux-kernel, linux-watchdog, Bumsik Kim
On 4/2/20 8:15 PM, Bumsik Kim wrote:
> The commit d0684c8a9354 ("watchdog: Make stop function optional")
> made stop function not mandatory, but the comments
> and the doc weren't reflected. Fix it to clarify.
>
> Signed-off-by: Bumsik Kim <k.bumsik@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> Documentation/watchdog/convert_drivers_to_kernel_api.rst | 2 +-
> Documentation/watchdog/watchdog-kernel-api.rst | 2 +-
> include/linux/watchdog.h | 4 ++--
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/watchdog/convert_drivers_to_kernel_api.rst b/Documentation/watchdog/convert_drivers_to_kernel_api.rst
> index dd934cc08e40..51b999b5551a 100644
> --- a/Documentation/watchdog/convert_drivers_to_kernel_api.rst
> +++ b/Documentation/watchdog/convert_drivers_to_kernel_api.rst
> @@ -115,7 +115,7 @@ Add the watchdog operations
> ---------------------------
>
> All possible callbacks are defined in 'struct watchdog_ops'. You can find it
> -explained in 'watchdog-kernel-api.txt' in this directory. start(), stop() and
> +explained in 'watchdog-kernel-api.txt' in this directory. start() and
> owner must be set, the rest are optional. You will easily find corresponding
> functions in the old driver. Note that you will now get a pointer to the
> watchdog_device as a parameter to these functions, so you probably have to
> diff --git a/Documentation/watchdog/watchdog-kernel-api.rst b/Documentation/watchdog/watchdog-kernel-api.rst
> index 864edbe932c1..068a55ee0d4a 100644
> --- a/Documentation/watchdog/watchdog-kernel-api.rst
> +++ b/Documentation/watchdog/watchdog-kernel-api.rst
> @@ -123,8 +123,8 @@ The list of watchdog operations is defined as::
> struct module *owner;
> /* mandatory operations */
> int (*start)(struct watchdog_device *);
> - int (*stop)(struct watchdog_device *);
> /* optional operations */
> + int (*stop)(struct watchdog_device *);
> int (*ping)(struct watchdog_device *);
> unsigned int (*status)(struct watchdog_device *);
> int (*set_timeout)(struct watchdog_device *, unsigned int);
> diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h
> index 417d9f37077a..1464ce6ffa31 100644
> --- a/include/linux/watchdog.h
> +++ b/include/linux/watchdog.h
> @@ -37,15 +37,15 @@ struct watchdog_governor;
> *
> * The watchdog_ops structure contains a list of low-level operations
> * that control a watchdog device. It also contains the module that owns
> - * these operations. The start and stop function are mandatory, all other
> + * these operations. The start function is mandatory, all other
> * functions are optional.
> */
> struct watchdog_ops {
> struct module *owner;
> /* mandatory operations */
> int (*start)(struct watchdog_device *);
> - int (*stop)(struct watchdog_device *);
> /* optional operations */
> + int (*stop)(struct watchdog_device *);
> int (*ping)(struct watchdog_device *);
> unsigned int (*status)(struct watchdog_device *);
> int (*set_timeout)(struct watchdog_device *, unsigned int);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] watchdog: clarify that stop() is optional
2020-04-03 4:07 ` Guenter Roeck
@ 2020-04-20 23:12 ` Jonathan Corbet
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2020-04-20 23:12 UTC (permalink / raw)
To: Guenter Roeck; +Cc: Bumsik Kim, wim, linux-kernel, linux-watchdog, Bumsik Kim
On Thu, 2 Apr 2020 21:07:27 -0700
Guenter Roeck <linux@roeck-us.net> wrote:
> On 4/2/20 8:15 PM, Bumsik Kim wrote:
> > The commit d0684c8a9354 ("watchdog: Make stop function optional")
> > made stop function not mandatory, but the comments
> > and the doc weren't reflected. Fix it to clarify.
> >
> > Signed-off-by: Bumsik Kim <k.bumsik@gmail.com>
>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Applied, thanks.
jon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-20 23:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-03 3:15 [PATCH] watchdog: clarify that stop() is optional Bumsik Kim
2020-04-03 4:07 ` Guenter Roeck
2020-04-20 23:12 ` Jonathan Corbet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).