public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Cleanup Linux Watchdog documentation
@ 2026-05-04 11:02 Philipp Hahn
  2026-05-04 11:02 ` [PATCH 1/6] watchdog: Fix wrong SPDX license identifier Philipp Hahn
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Philipp Hahn @ 2026-05-04 11:02 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel

From: Philipp Hahn <phahn-oss@avm.de>

Hello,

while reading the documentation on the Linux kernel watchdog
subsystem[1] I noticed some strange looking formatting: `struct`s are
detected automatically by Sphinx and the word **after** it is considered
the name of the structure, but the watchdog documentation puts the name
**before** the word `struct`; this leads to the wrong word being
emphasized.

Also reorganize the index page to better separate the documentation on
generic infrastructure from specific drivers – which are mostly obsolete
and relevant for historic documentation only.

Please apply; thank you for all your work.

Philipp

[1]: https://docs.kernel.org/watchdog/convert_drivers_to_kernel_api.html

Philipp Hahn (6):
  watchdog: Fix wrong SPDX license identifier
  watchdog: Change suffix .txt to .rst in references
  watchdog: Move `struct` before name
  watchdog: Replace intermixed tab/space indent
  watchdog: Separate kind of documentation
  watchdog: Prefix WDT with ICS for clarity

 .../convert_drivers_to_kernel_api.rst         | 28 +++++++++----------
 Documentation/watchdog/index.rst              | 22 +++++++++++----
 Documentation/watchdog/watchdog-api.rst       |  4 +--
 .../watchdog/watchdog-kernel-api.rst          |  2 +-
 Documentation/watchdog/wdt.rst                |  6 ++--
 drivers/watchdog/Kconfig                      |  6 ++--
 6 files changed, 39 insertions(+), 29 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 1/6] watchdog: Fix wrong SPDX license identifier
  2026-05-04 11:02 [PATCH 0/6] Cleanup Linux Watchdog documentation Philipp Hahn
@ 2026-05-04 11:02 ` Philipp Hahn
  2026-05-04 11:02 ` [PATCH 2/6] watchdog: Change suffix .txt to .rst in references Philipp Hahn
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Philipp Hahn @ 2026-05-04 11:02 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel

From: Philipp Hahn <phahn-oss@avm.de>

The identifier `GPL-2.0` has been deprecated in favor of `GPL-2.0-only`.
Change it to silence `checkpatch`.

[1]: https://spdx.org/licenses/#deprecated

Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
---
 Documentation/watchdog/index.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/watchdog/index.rst b/Documentation/watchdog/index.rst
index 1cea24681e6bd..13e3d78254dd6 100644
--- a/Documentation/watchdog/index.rst
+++ b/Documentation/watchdog/index.rst
@@ -1,4 +1,4 @@
-.. SPDX-License-Identifier: GPL-2.0
+.. SPDX-License-Identifier: GPL-2.0-only
 
 ================
 Watchdog Support
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 2/6] watchdog: Change suffix .txt to .rst in references
  2026-05-04 11:02 [PATCH 0/6] Cleanup Linux Watchdog documentation Philipp Hahn
  2026-05-04 11:02 ` [PATCH 1/6] watchdog: Fix wrong SPDX license identifier Philipp Hahn
@ 2026-05-04 11:02 ` Philipp Hahn
  2026-05-04 11:02 ` [PATCH 3/6] watchdog: Move `struct` before name Philipp Hahn
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Philipp Hahn @ 2026-05-04 11:02 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel

From: Philipp Hahn <phahn-oss@avm.de>

Fix link to documentation, which has already been converted to reST.
Also remove apostrophes which are no longer needed.

Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
---
 Documentation/watchdog/convert_drivers_to_kernel_api.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/watchdog/convert_drivers_to_kernel_api.rst b/Documentation/watchdog/convert_drivers_to_kernel_api.rst
index e83609a5d0071..9eddb962f8e4c 100644
--- a/Documentation/watchdog/convert_drivers_to_kernel_api.rst
+++ b/Documentation/watchdog/convert_drivers_to_kernel_api.rst
@@ -114,7 +114,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() and
+explained in watchdog-kernel-api.rst 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
@@ -153,7 +153,7 @@ Add the watchdog device
 
 Now we need to create a 'struct watchdog_device' and populate it with the
 necessary information for the framework. The struct is also explained in detail
-in 'watchdog-kernel-api.txt' in this directory. We pass it the mandatory
+in watchdog-kernel-api.rst in this directory. We pass it the mandatory
 watchdog_info struct and the newly created watchdog_ops. Often, old drivers
 have their own record-keeping for things like bootstatus and timeout using
 static variables. Those have to be converted to use the members in
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 3/6] watchdog: Move `struct` before name
  2026-05-04 11:02 [PATCH 0/6] Cleanup Linux Watchdog documentation Philipp Hahn
  2026-05-04 11:02 ` [PATCH 1/6] watchdog: Fix wrong SPDX license identifier Philipp Hahn
  2026-05-04 11:02 ` [PATCH 2/6] watchdog: Change suffix .txt to .rst in references Philipp Hahn
@ 2026-05-04 11:02 ` Philipp Hahn
  2026-05-04 11:02 ` [PATCH 4/6] watchdog: Replace intermixed tab/space indent Philipp Hahn
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Philipp Hahn @ 2026-05-04 11:02 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel

From: Philipp Hahn <phahn-oss@avm.de>

Write `struct ` before the structure name as Sphinx otherwise uses the
following word after it. See
https://docs.kernel.org/watchdog/watchdog-api.html#environmental-monitoring

Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
---
 .../convert_drivers_to_kernel_api.rst         | 24 +++++++++----------
 Documentation/watchdog/watchdog-api.rst       |  2 +-
 .../watchdog/watchdog-kernel-api.rst          |  2 +-
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/Documentation/watchdog/convert_drivers_to_kernel_api.rst b/Documentation/watchdog/convert_drivers_to_kernel_api.rst
index 9eddb962f8e4c..004fe6ef76e94 100644
--- a/Documentation/watchdog/convert_drivers_to_kernel_api.rst
+++ b/Documentation/watchdog/convert_drivers_to_kernel_api.rst
@@ -11,12 +11,12 @@ This document shall guide you for this task. The necessary steps are described
 as well as things to look out for.
 
 
-Remove the file_operations struct
+Remove the struct file_operations
 ---------------------------------
 
 Old drivers define their own file_operations for actions like open(), write(),
 etc... These are now handled by the framework and just call the driver when
-needed. So, in general, the 'file_operations' struct and assorted functions can
+needed. So, in general, the struct file_operations and assorted functions can
 go. Only very few driver-specific details have to be moved to other functions.
 Here is a overview of the functions and probably needed actions:
 
@@ -36,7 +36,7 @@ Here is a overview of the functions and probably needed actions:
   from the driver:
 
 	WDIOC_GETSUPPORT:
-		Returns the mandatory watchdog_info struct from the driver
+		Returns the mandatory struct watchdog_info from the driver
 
 	WDIOC_GETSTATUS:
 		Needs the status-callback defined, otherwise returns 0
@@ -88,8 +88,8 @@ refactoring. The rest can go.
 Remove the miscdevice
 ---------------------
 
-Since the file_operations are gone now, you can also remove the 'struct
-miscdevice'. The framework will create it on watchdog_dev_register() called by
+Since the file_operations are gone now, you can also remove the struct
+miscdevice. The framework will create it on watchdog_dev_register() called by
 watchdog_register_device()::
 
   -static struct miscdevice s3c2410wdt_miscdev = {
@@ -113,10 +113,10 @@ them. Includes can be removed, too. For example::
 Add the watchdog operations
 ---------------------------
 
-All possible callbacks are defined in 'struct watchdog_ops'. You can find it
+All possible callbacks are defined in struct watchdog_ops. You can find it
 explained in watchdog-kernel-api.rst 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
+functions in the old driver. Note that you will now get a pointer to the struct
 watchdog_device as a parameter to these functions, so you probably have to
 change the function header. Other changes are most likely not needed, because
 here simply happens the direct hardware access. If you have device-specific
@@ -151,12 +151,12 @@ A typical function-header change looks like::
 Add the watchdog device
 -----------------------
 
-Now we need to create a 'struct watchdog_device' and populate it with the
-necessary information for the framework. The struct is also explained in detail
+Now we need to create a struct watchdog_device and populate it with the
+necessary information for the framework. The structure is also explained in detail
 in watchdog-kernel-api.rst in this directory. We pass it the mandatory
-watchdog_info struct and the newly created watchdog_ops. Often, old drivers
+struct watchdog_info and the newly created struct watchdog_ops. Often, old drivers
 have their own record-keeping for things like bootstatus and timeout using
-static variables. Those have to be converted to use the members in
+static variables. Those have to be converted to use the members in struct
 watchdog_device. Note that the timeout values are unsigned int. Some drivers
 use signed int, so this has to be converted, too.
 
@@ -174,7 +174,7 @@ Handle the 'nowayout' feature
 A few drivers use nowayout statically, i.e. there is no module parameter for it
 and only CONFIG_WATCHDOG_NOWAYOUT determines if the feature is going to be
 used. This needs to be converted by initializing the status variable of the
-watchdog_device like this::
+struct watchdog_device like this::
 
         .status = WATCHDOG_NOWAYOUT_INIT_STATUS,
 
diff --git a/Documentation/watchdog/watchdog-api.rst b/Documentation/watchdog/watchdog-api.rst
index 78e228c272cf8..2c138eaa43397 100644
--- a/Documentation/watchdog/watchdog-api.rst
+++ b/Documentation/watchdog/watchdog-api.rst
@@ -158,7 +158,7 @@ available to ask what the device can do::
 	struct watchdog_info ident;
 	ioctl(fd, WDIOC_GETSUPPORT, &ident);
 
-the fields returned in the ident struct are:
+the fields returned in the struct watchdog_info are:
 
 	================	=============================================
         identity		a string identifying the watchdog driver
diff --git a/Documentation/watchdog/watchdog-kernel-api.rst b/Documentation/watchdog/watchdog-kernel-api.rst
index 5649c54cf6fbe..e2c1386c95509 100644
--- a/Documentation/watchdog/watchdog-kernel-api.rst
+++ b/Documentation/watchdog/watchdog-kernel-api.rst
@@ -257,7 +257,7 @@ bit-operations. The status bits that are defined are:
   To set the WDOG_NO_WAY_OUT status bit (before registering your watchdog
   timer device) you can either:
 
-  * set it statically in your watchdog_device struct with
+  * set it statically in your struct watchdog_device with
 
 	.status = WATCHDOG_NOWAYOUT_INIT_STATUS,
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 4/6] watchdog: Replace intermixed tab/space indent
  2026-05-04 11:02 [PATCH 0/6] Cleanup Linux Watchdog documentation Philipp Hahn
                   ` (2 preceding siblings ...)
  2026-05-04 11:02 ` [PATCH 3/6] watchdog: Move `struct` before name Philipp Hahn
@ 2026-05-04 11:02 ` Philipp Hahn
  2026-05-04 11:02 ` [PATCH 5/6] watchdog: Separate kind of documentation Philipp Hahn
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Philipp Hahn @ 2026-05-04 11:02 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel

From: Philipp Hahn <phahn-oss@avm.de>

Consistently indent all lines with tabs instead of having one line using
blanks.

Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
---
 Documentation/watchdog/watchdog-api.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/watchdog/watchdog-api.rst b/Documentation/watchdog/watchdog-api.rst
index 2c138eaa43397..78d0940155b13 100644
--- a/Documentation/watchdog/watchdog-api.rst
+++ b/Documentation/watchdog/watchdog-api.rst
@@ -161,7 +161,7 @@ available to ask what the device can do::
 the fields returned in the struct watchdog_info are:
 
 	================	=============================================
-        identity		a string identifying the watchdog driver
+	identity		a string identifying the watchdog driver
 	firmware_version	the firmware version of the card if available
 	options			a flags describing what the device supports
 	================	=============================================
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 5/6] watchdog: Separate kind of documentation
  2026-05-04 11:02 [PATCH 0/6] Cleanup Linux Watchdog documentation Philipp Hahn
                   ` (3 preceding siblings ...)
  2026-05-04 11:02 ` [PATCH 4/6] watchdog: Replace intermixed tab/space indent Philipp Hahn
@ 2026-05-04 11:02 ` Philipp Hahn
  2026-05-04 11:02 ` [PATCH 6/6] watchdog: Prefix WDT with ICS for clarity Philipp Hahn
  2026-05-04 13:49 ` [PATCH v2 0/5] Cleanup Linux Watchdog documentation Philipp Hahn
  6 siblings, 0 replies; 15+ messages in thread
From: Philipp Hahn @ 2026-05-04 11:02 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel

From: Philipp Hahn <phahn-oss@avm.de>

Currently there are several (sub-)documents for "Generic kernel
infrastructure API" and several "driver specific" documents. Put each
one into its own sub-section.

Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
---
 Documentation/watchdog/index.rst | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/Documentation/watchdog/index.rst b/Documentation/watchdog/index.rst
index 13e3d78254dd6..300ee142051dc 100644
--- a/Documentation/watchdog/index.rst
+++ b/Documentation/watchdog/index.rst
@@ -4,15 +4,25 @@
 Watchdog Support
 ================
 
+Kernel infrastructure
+=====================
+
 .. toctree::
     :maxdepth: 1
 
-    hpwdt
-    mlx-wdt
-    pcwd-watchdog
     watchdog-api
     watchdog-kernel-api
-    watchdog-parameters
     watchdog-pm
-    wdt
     convert_drivers_to_kernel_api
+
+Driver specific
+===============
+
+.. toctree::
+    :maxdepth: 1
+
+    watchdog-parameters
+    wdt
+    hpwdt
+    mlx-wdt
+    pcwd-watchdog
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 6/6] watchdog: Prefix WDT with ICS for clarity
  2026-05-04 11:02 [PATCH 0/6] Cleanup Linux Watchdog documentation Philipp Hahn
                   ` (4 preceding siblings ...)
  2026-05-04 11:02 ` [PATCH 5/6] watchdog: Separate kind of documentation Philipp Hahn
@ 2026-05-04 11:02 ` Philipp Hahn
  2026-05-04 14:00   ` Guenter Roeck
  2026-05-04 13:49 ` [PATCH v2 0/5] Cleanup Linux Watchdog documentation Philipp Hahn
  6 siblings, 1 reply; 15+ messages in thread
From: Philipp Hahn @ 2026-05-04 11:02 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel

From: Philipp Hahn <phahn-oss@avm.de>

`wdt.rst` is only about the Watchdog timer from "Industrial Computer
Source" (ICS). Change the title to better express this.

Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
---
 Documentation/watchdog/wdt.rst | 6 +++---
 drivers/watchdog/Kconfig       | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/watchdog/wdt.rst b/Documentation/watchdog/wdt.rst
index d97b0361535b0..be8cc0b9f31e1 100644
--- a/Documentation/watchdog/wdt.rst
+++ b/Documentation/watchdog/wdt.rst
@@ -1,6 +1,6 @@
-============================================================
-WDT Watchdog Timer Interfaces For The Linux Operating System
-============================================================
+================================================================
+ICS WDT Watchdog Timer Interfaces For The Linux Operating System
+================================================================
 
 Last Reviewed: 10/05/2007
 
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index dc78729ba2a5d..2cbf0391a065a 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -2270,10 +2270,10 @@ config MIXCOMWD
 	  Most people will say N.
 
 config WDT
-	tristate "WDT Watchdog timer"
+	tristate "ICS WDT Watchdog timer"
 	depends on ISA
 	help
-	  If you have a WDT500P or WDT501P watchdog board, say Y here,
+	  If you have an ICS WDT500P or WDT501P watchdog board, say Y here,
 	  otherwise N. It is not possible to probe for this board, which means
 	  that you have to inform the kernel about the IO port and IRQ that
 	  is needed (you can do this via the io and irq parameters)
@@ -2304,7 +2304,7 @@ config PCIPCWATCHDOG
 	  Most people will say N.
 
 config WDTPCI
-	tristate "PCI-WDT500/501 Watchdog timer"
+	tristate "ICS PCI-WDT500/501 Watchdog timer"
 	depends on PCI && HAS_IOPORT
 	help
 	  If you have a PCI-WDT500/501 watchdog board, say Y here, otherwise N.
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 0/5] Cleanup Linux Watchdog documentation
  2026-05-04 11:02 [PATCH 0/6] Cleanup Linux Watchdog documentation Philipp Hahn
                   ` (5 preceding siblings ...)
  2026-05-04 11:02 ` [PATCH 6/6] watchdog: Prefix WDT with ICS for clarity Philipp Hahn
@ 2026-05-04 13:49 ` Philipp Hahn
  2026-05-04 13:49   ` [PATCH v2 1/5] watchdog: Change suffix .txt to .rst in references Philipp Hahn
                     ` (5 more replies)
  6 siblings, 6 replies; 15+ messages in thread
From: Philipp Hahn @ 2026-05-04 13:49 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel

From: Philipp Hahn <phahn-oss@avm.de>

Hello,

while reading the documentation on the Linux kernel watchdog
subsystem[1] I noticed some strange looking formatting: `struct`s are
detected automatically by Sphinx and the word **after** it is considered
the name of the structure, but the watchdog documentation puts the name
**before** the word `struct`; this leads to the wrong word being
emphasized.

Also reorganize the index page to better separate the documentation on
generic infrastructure from specific drivers – which are mostly obsolete
and relevant for historic documentation only.

Please apply; thank you for all your work.

Philipp

[1]: https://docs.kernel.org/watchdog/convert_drivers_to_kernel_api.html
---
Philipp Hahn (5):
  watchdog: Change suffix .txt to .rst in references
  watchdog: Move `struct` before name
  watchdog: Replace intermixed tab/space indent
  watchdog: Separate kind of documentation
  watchdog: Prefix WDT with ICS for clarity

v1 -> 2
  - Drop invalid SPDX change to Documentation/watchdog/index.rst
  - Add SPDX to Documentation/watchdog/wdt.rst

 .../convert_drivers_to_kernel_api.rst         | 28 +++++++++----------
 Documentation/watchdog/index.rst              | 20 +++++++++----
 Documentation/watchdog/watchdog-api.rst       |  4 +--
 .../watchdog/watchdog-kernel-api.rst          |  2 +-
 Documentation/watchdog/wdt.rst                |  8 ++++--
 drivers/watchdog/Kconfig                      |  6 ++--
 6 files changed, 40 insertions(+), 28 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v2 1/5] watchdog: Change suffix .txt to .rst in references
  2026-05-04 13:49 ` [PATCH v2 0/5] Cleanup Linux Watchdog documentation Philipp Hahn
@ 2026-05-04 13:49   ` Philipp Hahn
  2026-05-04 13:50   ` [PATCH v2 2/5] watchdog: Move `struct` before name Philipp Hahn
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 15+ messages in thread
From: Philipp Hahn @ 2026-05-04 13:49 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel

From: Philipp Hahn <phahn-oss@avm.de>

Fix link to documentation, which has already been converted to reST.
Also remove apostrophes which are no longer needed.

Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
---
 Documentation/watchdog/convert_drivers_to_kernel_api.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/watchdog/convert_drivers_to_kernel_api.rst b/Documentation/watchdog/convert_drivers_to_kernel_api.rst
index e83609a5d0071..9eddb962f8e4c 100644
--- a/Documentation/watchdog/convert_drivers_to_kernel_api.rst
+++ b/Documentation/watchdog/convert_drivers_to_kernel_api.rst
@@ -114,7 +114,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() and
+explained in watchdog-kernel-api.rst 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
@@ -153,7 +153,7 @@ Add the watchdog device
 
 Now we need to create a 'struct watchdog_device' and populate it with the
 necessary information for the framework. The struct is also explained in detail
-in 'watchdog-kernel-api.txt' in this directory. We pass it the mandatory
+in watchdog-kernel-api.rst in this directory. We pass it the mandatory
 watchdog_info struct and the newly created watchdog_ops. Often, old drivers
 have their own record-keeping for things like bootstatus and timeout using
 static variables. Those have to be converted to use the members in
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 2/5] watchdog: Move `struct` before name
  2026-05-04 13:49 ` [PATCH v2 0/5] Cleanup Linux Watchdog documentation Philipp Hahn
  2026-05-04 13:49   ` [PATCH v2 1/5] watchdog: Change suffix .txt to .rst in references Philipp Hahn
@ 2026-05-04 13:50   ` Philipp Hahn
  2026-05-04 13:50   ` [PATCH v2 3/5] watchdog: Replace intermixed tab/space indent Philipp Hahn
                     ` (3 subsequent siblings)
  5 siblings, 0 replies; 15+ messages in thread
From: Philipp Hahn @ 2026-05-04 13:50 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel

From: Philipp Hahn <phahn-oss@avm.de>

Write `struct ` before the structure name as Sphinx otherwise uses the
following word after it. See
https://docs.kernel.org/watchdog/watchdog-api.html#environmental-monitoring

Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
---
 .../convert_drivers_to_kernel_api.rst         | 24 +++++++++----------
 Documentation/watchdog/watchdog-api.rst       |  2 +-
 .../watchdog/watchdog-kernel-api.rst          |  2 +-
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/Documentation/watchdog/convert_drivers_to_kernel_api.rst b/Documentation/watchdog/convert_drivers_to_kernel_api.rst
index 9eddb962f8e4c..004fe6ef76e94 100644
--- a/Documentation/watchdog/convert_drivers_to_kernel_api.rst
+++ b/Documentation/watchdog/convert_drivers_to_kernel_api.rst
@@ -11,12 +11,12 @@ This document shall guide you for this task. The necessary steps are described
 as well as things to look out for.
 
 
-Remove the file_operations struct
+Remove the struct file_operations
 ---------------------------------
 
 Old drivers define their own file_operations for actions like open(), write(),
 etc... These are now handled by the framework and just call the driver when
-needed. So, in general, the 'file_operations' struct and assorted functions can
+needed. So, in general, the struct file_operations and assorted functions can
 go. Only very few driver-specific details have to be moved to other functions.
 Here is a overview of the functions and probably needed actions:
 
@@ -36,7 +36,7 @@ Here is a overview of the functions and probably needed actions:
   from the driver:
 
 	WDIOC_GETSUPPORT:
-		Returns the mandatory watchdog_info struct from the driver
+		Returns the mandatory struct watchdog_info from the driver
 
 	WDIOC_GETSTATUS:
 		Needs the status-callback defined, otherwise returns 0
@@ -88,8 +88,8 @@ refactoring. The rest can go.
 Remove the miscdevice
 ---------------------
 
-Since the file_operations are gone now, you can also remove the 'struct
-miscdevice'. The framework will create it on watchdog_dev_register() called by
+Since the file_operations are gone now, you can also remove the struct
+miscdevice. The framework will create it on watchdog_dev_register() called by
 watchdog_register_device()::
 
   -static struct miscdevice s3c2410wdt_miscdev = {
@@ -113,10 +113,10 @@ them. Includes can be removed, too. For example::
 Add the watchdog operations
 ---------------------------
 
-All possible callbacks are defined in 'struct watchdog_ops'. You can find it
+All possible callbacks are defined in struct watchdog_ops. You can find it
 explained in watchdog-kernel-api.rst 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
+functions in the old driver. Note that you will now get a pointer to the struct
 watchdog_device as a parameter to these functions, so you probably have to
 change the function header. Other changes are most likely not needed, because
 here simply happens the direct hardware access. If you have device-specific
@@ -151,12 +151,12 @@ A typical function-header change looks like::
 Add the watchdog device
 -----------------------
 
-Now we need to create a 'struct watchdog_device' and populate it with the
-necessary information for the framework. The struct is also explained in detail
+Now we need to create a struct watchdog_device and populate it with the
+necessary information for the framework. The structure is also explained in detail
 in watchdog-kernel-api.rst in this directory. We pass it the mandatory
-watchdog_info struct and the newly created watchdog_ops. Often, old drivers
+struct watchdog_info and the newly created struct watchdog_ops. Often, old drivers
 have their own record-keeping for things like bootstatus and timeout using
-static variables. Those have to be converted to use the members in
+static variables. Those have to be converted to use the members in struct
 watchdog_device. Note that the timeout values are unsigned int. Some drivers
 use signed int, so this has to be converted, too.
 
@@ -174,7 +174,7 @@ Handle the 'nowayout' feature
 A few drivers use nowayout statically, i.e. there is no module parameter for it
 and only CONFIG_WATCHDOG_NOWAYOUT determines if the feature is going to be
 used. This needs to be converted by initializing the status variable of the
-watchdog_device like this::
+struct watchdog_device like this::
 
         .status = WATCHDOG_NOWAYOUT_INIT_STATUS,
 
diff --git a/Documentation/watchdog/watchdog-api.rst b/Documentation/watchdog/watchdog-api.rst
index 78e228c272cf8..2c138eaa43397 100644
--- a/Documentation/watchdog/watchdog-api.rst
+++ b/Documentation/watchdog/watchdog-api.rst
@@ -158,7 +158,7 @@ available to ask what the device can do::
 	struct watchdog_info ident;
 	ioctl(fd, WDIOC_GETSUPPORT, &ident);
 
-the fields returned in the ident struct are:
+the fields returned in the struct watchdog_info are:
 
 	================	=============================================
         identity		a string identifying the watchdog driver
diff --git a/Documentation/watchdog/watchdog-kernel-api.rst b/Documentation/watchdog/watchdog-kernel-api.rst
index 5649c54cf6fbe..e2c1386c95509 100644
--- a/Documentation/watchdog/watchdog-kernel-api.rst
+++ b/Documentation/watchdog/watchdog-kernel-api.rst
@@ -257,7 +257,7 @@ bit-operations. The status bits that are defined are:
   To set the WDOG_NO_WAY_OUT status bit (before registering your watchdog
   timer device) you can either:
 
-  * set it statically in your watchdog_device struct with
+  * set it statically in your struct watchdog_device with
 
 	.status = WATCHDOG_NOWAYOUT_INIT_STATUS,
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 3/5] watchdog: Replace intermixed tab/space indent
  2026-05-04 13:49 ` [PATCH v2 0/5] Cleanup Linux Watchdog documentation Philipp Hahn
  2026-05-04 13:49   ` [PATCH v2 1/5] watchdog: Change suffix .txt to .rst in references Philipp Hahn
  2026-05-04 13:50   ` [PATCH v2 2/5] watchdog: Move `struct` before name Philipp Hahn
@ 2026-05-04 13:50   ` Philipp Hahn
  2026-05-04 13:50   ` [PATCH v2 4/5] watchdog: Separate kind of documentation Philipp Hahn
                     ` (2 subsequent siblings)
  5 siblings, 0 replies; 15+ messages in thread
From: Philipp Hahn @ 2026-05-04 13:50 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel

From: Philipp Hahn <phahn-oss@avm.de>

Consistently indent all lines with tabs instead of having one line using
blanks.

Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
---
 Documentation/watchdog/watchdog-api.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/watchdog/watchdog-api.rst b/Documentation/watchdog/watchdog-api.rst
index 2c138eaa43397..78d0940155b13 100644
--- a/Documentation/watchdog/watchdog-api.rst
+++ b/Documentation/watchdog/watchdog-api.rst
@@ -161,7 +161,7 @@ available to ask what the device can do::
 the fields returned in the struct watchdog_info are:
 
 	================	=============================================
-        identity		a string identifying the watchdog driver
+	identity		a string identifying the watchdog driver
 	firmware_version	the firmware version of the card if available
 	options			a flags describing what the device supports
 	================	=============================================
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 4/5] watchdog: Separate kind of documentation
  2026-05-04 13:49 ` [PATCH v2 0/5] Cleanup Linux Watchdog documentation Philipp Hahn
                     ` (2 preceding siblings ...)
  2026-05-04 13:50   ` [PATCH v2 3/5] watchdog: Replace intermixed tab/space indent Philipp Hahn
@ 2026-05-04 13:50   ` Philipp Hahn
  2026-05-04 13:50   ` [PATCH v2 5/5] watchdog: Prefix WDT with ICS for clarity Philipp Hahn
  2026-05-04 14:11   ` [PATCH v2 0/5] Cleanup Linux Watchdog documentation Guenter Roeck
  5 siblings, 0 replies; 15+ messages in thread
From: Philipp Hahn @ 2026-05-04 13:50 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel

From: Philipp Hahn <phahn-oss@avm.de>

Currently there are several (sub-)documents for "Generic kernel
infrastructure API" and several "driver specific" documents. Put each
one into its own sub-section.

Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
---
 Documentation/watchdog/index.rst | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/Documentation/watchdog/index.rst b/Documentation/watchdog/index.rst
index 1cea24681e6bd..8886910550344 100644
--- a/Documentation/watchdog/index.rst
+++ b/Documentation/watchdog/index.rst
@@ -4,15 +4,25 @@
 Watchdog Support
 ================
 
+Kernel infrastructure
+=====================
+
 .. toctree::
     :maxdepth: 1
 
-    hpwdt
-    mlx-wdt
-    pcwd-watchdog
     watchdog-api
     watchdog-kernel-api
-    watchdog-parameters
     watchdog-pm
-    wdt
     convert_drivers_to_kernel_api
+
+Driver specific
+===============
+
+.. toctree::
+    :maxdepth: 1
+
+    watchdog-parameters
+    wdt
+    hpwdt
+    mlx-wdt
+    pcwd-watchdog
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 5/5] watchdog: Prefix WDT with ICS for clarity
  2026-05-04 13:49 ` [PATCH v2 0/5] Cleanup Linux Watchdog documentation Philipp Hahn
                     ` (3 preceding siblings ...)
  2026-05-04 13:50   ` [PATCH v2 4/5] watchdog: Separate kind of documentation Philipp Hahn
@ 2026-05-04 13:50   ` Philipp Hahn
  2026-05-04 14:11   ` [PATCH v2 0/5] Cleanup Linux Watchdog documentation Guenter Roeck
  5 siblings, 0 replies; 15+ messages in thread
From: Philipp Hahn @ 2026-05-04 13:50 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel

From: Philipp Hahn <phahn-oss@avm.de>

`wdt.rst` is only about the Watchdog timer from "Industrial Computer
Source" (ICS). Change the title to better express this.

Add missing SPDX license identifier `GPL-2.0-or-later` same as code to
silence `checkpatch`.

Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
---
 Documentation/watchdog/wdt.rst | 8 +++++---
 drivers/watchdog/Kconfig       | 6 +++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/Documentation/watchdog/wdt.rst b/Documentation/watchdog/wdt.rst
index d97b0361535b0..5be200e08d02c 100644
--- a/Documentation/watchdog/wdt.rst
+++ b/Documentation/watchdog/wdt.rst
@@ -1,6 +1,8 @@
-============================================================
-WDT Watchdog Timer Interfaces For The Linux Operating System
-============================================================
+.. SPDX-License-Identifier: GPL-2.0-or-later
+
+================================================================
+ICS WDT Watchdog Timer Interfaces For The Linux Operating System
+================================================================
 
 Last Reviewed: 10/05/2007
 
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index dc78729ba2a5d..2cbf0391a065a 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -2270,10 +2270,10 @@ config MIXCOMWD
 	  Most people will say N.
 
 config WDT
-	tristate "WDT Watchdog timer"
+	tristate "ICS WDT Watchdog timer"
 	depends on ISA
 	help
-	  If you have a WDT500P or WDT501P watchdog board, say Y here,
+	  If you have an ICS WDT500P or WDT501P watchdog board, say Y here,
 	  otherwise N. It is not possible to probe for this board, which means
 	  that you have to inform the kernel about the IO port and IRQ that
 	  is needed (you can do this via the io and irq parameters)
@@ -2304,7 +2304,7 @@ config PCIPCWATCHDOG
 	  Most people will say N.
 
 config WDTPCI
-	tristate "PCI-WDT500/501 Watchdog timer"
+	tristate "ICS PCI-WDT500/501 Watchdog timer"
 	depends on PCI && HAS_IOPORT
 	help
 	  If you have a PCI-WDT500/501 watchdog board, say Y here, otherwise N.
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH 6/6] watchdog: Prefix WDT with ICS for clarity
  2026-05-04 11:02 ` [PATCH 6/6] watchdog: Prefix WDT with ICS for clarity Philipp Hahn
@ 2026-05-04 14:00   ` Guenter Roeck
  0 siblings, 0 replies; 15+ messages in thread
From: Guenter Roeck @ 2026-05-04 14:00 UTC (permalink / raw)
  To: Philipp Hahn, Wim Van Sebroeck
  Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel

On 5/4/26 04:02, Philipp Hahn wrote:
> From: Philipp Hahn <phahn-oss@avm.de>
> 
> `wdt.rst` is only about the Watchdog timer from "Industrial Computer
> Source" (ICS). Change the title to better express this.
> 

Please also explain "ICS" into the documentation file.

We can not rename the Kconfig symbol, but I'd also suggest to rename
the documentation to icswdt.rst or maybe better watchdog-ics.rst.

Additional comment below.

Thanks,
Guenter

> Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
> ---
>   Documentation/watchdog/wdt.rst | 6 +++---
>   drivers/watchdog/Kconfig       | 6 +++---
>   2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/watchdog/wdt.rst b/Documentation/watchdog/wdt.rst
> index d97b0361535b0..be8cc0b9f31e1 100644
> --- a/Documentation/watchdog/wdt.rst
> +++ b/Documentation/watchdog/wdt.rst
> @@ -1,6 +1,6 @@
> -============================================================
> -WDT Watchdog Timer Interfaces For The Linux Operating System
> -============================================================
> +================================================================
> +ICS WDT Watchdog Timer Interfaces For The Linux Operating System
> +================================================================
>   
>   Last Reviewed: 10/05/2007
>   
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index dc78729ba2a5d..2cbf0391a065a 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -2270,10 +2270,10 @@ config MIXCOMWD
>   	  Most people will say N.
>   
>   config WDT
> -	tristate "WDT Watchdog timer"
> +	tristate "ICS WDT Watchdog timer"

WDT is now redundant. Maybe "ICS WDT500P/WDT501P Watchdog timer" to
match the PCI variant.

>   	depends on ISA
>   	help
> -	  If you have a WDT500P or WDT501P watchdog board, say Y here,
> +	  If you have an ICS WDT500P or WDT501P watchdog board, say Y here,
>   	  otherwise N. It is not possible to probe for this board, which means
>   	  that you have to inform the kernel about the IO port and IRQ that
>   	  is needed (you can do this via the io and irq parameters)
> @@ -2304,7 +2304,7 @@ config PCIPCWATCHDOG
>   	  Most people will say N.
>   
>   config WDTPCI
> -	tristate "PCI-WDT500/501 Watchdog timer"
> +	tristate "ICS PCI-WDT500/501 Watchdog timer"
>   	depends on PCI && HAS_IOPORT
>   	help
>   	  If you have a PCI-WDT500/501 watchdog board, say Y here, otherwise N.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 0/5] Cleanup Linux Watchdog documentation
  2026-05-04 13:49 ` [PATCH v2 0/5] Cleanup Linux Watchdog documentation Philipp Hahn
                     ` (4 preceding siblings ...)
  2026-05-04 13:50   ` [PATCH v2 5/5] watchdog: Prefix WDT with ICS for clarity Philipp Hahn
@ 2026-05-04 14:11   ` Guenter Roeck
  5 siblings, 0 replies; 15+ messages in thread
From: Guenter Roeck @ 2026-05-04 14:11 UTC (permalink / raw)
  To: Philipp Hahn, Wim Van Sebroeck
  Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel

On 5/4/26 06:49, Philipp Hahn wrote:
> From: Philipp Hahn <phahn-oss@avm.de>
> 
> Hello,
> 
> while reading the documentation on the Linux kernel watchdog
> subsystem[1] I noticed some strange looking formatting: `struct`s are
> detected automatically by Sphinx and the word **after** it is considered
> the name of the structure, but the watchdog documentation puts the name
> **before** the word `struct`; this leads to the wrong word being
> emphasized.
> 
> Also reorganize the index page to better separate the documentation on
> generic infrastructure from specific drivers – which are mostly obsolete
> and relevant for historic documentation only.
> 
> Please apply; thank you for all your work.
> 
> Philipp
> 
> [1]: https://docs.kernel.org/watchdog/convert_drivers_to_kernel_api.html

 From Documentation/process/submitting-patches.rst:

   However, for a multi-patch series, it is generally
   best to avoid using In-Reply-To: to link to older versions of the
   series.  This way multiple versions of the patch don't become an
   unmanageable forest of references in email clients.

... but you did that anyway. It also almost guarantees that new
versions of a patch series get lost.

Guenter


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-05-04 14:11 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-04 11:02 [PATCH 0/6] Cleanup Linux Watchdog documentation Philipp Hahn
2026-05-04 11:02 ` [PATCH 1/6] watchdog: Fix wrong SPDX license identifier Philipp Hahn
2026-05-04 11:02 ` [PATCH 2/6] watchdog: Change suffix .txt to .rst in references Philipp Hahn
2026-05-04 11:02 ` [PATCH 3/6] watchdog: Move `struct` before name Philipp Hahn
2026-05-04 11:02 ` [PATCH 4/6] watchdog: Replace intermixed tab/space indent Philipp Hahn
2026-05-04 11:02 ` [PATCH 5/6] watchdog: Separate kind of documentation Philipp Hahn
2026-05-04 11:02 ` [PATCH 6/6] watchdog: Prefix WDT with ICS for clarity Philipp Hahn
2026-05-04 14:00   ` Guenter Roeck
2026-05-04 13:49 ` [PATCH v2 0/5] Cleanup Linux Watchdog documentation Philipp Hahn
2026-05-04 13:49   ` [PATCH v2 1/5] watchdog: Change suffix .txt to .rst in references Philipp Hahn
2026-05-04 13:50   ` [PATCH v2 2/5] watchdog: Move `struct` before name Philipp Hahn
2026-05-04 13:50   ` [PATCH v2 3/5] watchdog: Replace intermixed tab/space indent Philipp Hahn
2026-05-04 13:50   ` [PATCH v2 4/5] watchdog: Separate kind of documentation Philipp Hahn
2026-05-04 13:50   ` [PATCH v2 5/5] watchdog: Prefix WDT with ICS for clarity Philipp Hahn
2026-05-04 14:11   ` [PATCH v2 0/5] Cleanup Linux Watchdog documentation Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox