[PATCH] watchdog: Fix typo in WATCHDOG_SOFTOCKUP_ENABLED macros
From: Daizhiyuan
Date: Wed Jul 08 2026 - 04:22:15 EST
The macro WATCHDOG_SOFTOCKUP_ENABLED and its companion bit macro
WATCHDOG_SOFTOCKUP_ENABLED_BIT are missing an 'L' in their names,
resulting in 'SOFTOCKUP' instead of 'SOFTLOCKUP'.
Rename them to WATCHDOG_SOFTLOCKUP_ENABLED and
WATCHDOG_SOFTLOCKUP_ENABLED_BIT respectively across the header file
and kernel/watchdog.c to fix the typo and maintain naming consistency.
Signed-off-by: Daizhiyuan <daizhiyuan@xxxxxxxxxxxxxx>
---
include/linux/nmi.h | 4 ++--
kernel/watchdog.c | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/linux/nmi.h b/include/linux/nmi.h
index bc1162895f35..89c5465e2524 100644
--- a/include/linux/nmi.h
+++ b/include/linux/nmi.h
@@ -77,9 +77,9 @@ static inline void reset_hung_task_detector(void) { }
* detectors are 'suspended' while 'watchdog_thresh' is equal zero.
*/
#define WATCHDOG_HARDLOCKUP_ENABLED_BIT 0
-#define WATCHDOG_SOFTOCKUP_ENABLED_BIT 1
+#define WATCHDOG_SOFTLOCKUP_ENABLED_BIT 1
#define WATCHDOG_HARDLOCKUP_ENABLED (1 << WATCHDOG_HARDLOCKUP_ENABLED_BIT)
-#define WATCHDOG_SOFTOCKUP_ENABLED (1 << WATCHDOG_SOFTOCKUP_ENABLED_BIT)
+#define WATCHDOG_SOFTLOCKUP_ENABLED (1 << WATCHDOG_SOFTLOCKUP_ENABLED_BIT)
#if defined(CONFIG_HARDLOCKUP_DETECTOR)
extern void hardlockup_detector_disable(void);
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 87dd5e0f6968..28f63dad75ab 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -359,7 +359,7 @@ static void lockup_detector_update_enable(void)
if (watchdog_hardlockup_available && watchdog_hardlockup_user_enabled)
watchdog_enabled |= WATCHDOG_HARDLOCKUP_ENABLED;
if (watchdog_softlockup_user_enabled)
- watchdog_enabled |= WATCHDOG_SOFTOCKUP_ENABLED;
+ watchdog_enabled |= WATCHDOG_SOFTLOCKUP_ENABLED;
}
#ifdef CONFIG_SOFTLOCKUP_DETECTOR
@@ -742,7 +742,7 @@ static int is_softlockup(unsigned long touch_ts,
unsigned long period_ts,
unsigned long now)
{
- if ((watchdog_enabled & WATCHDOG_SOFTOCKUP_ENABLED) && watchdog_thresh) {
+ if ((watchdog_enabled & WATCHDOG_SOFTLOCKUP_ENABLED) && watchdog_thresh) {
/*
* If period_ts has not been updated during a sample_period, then
* in the subsequent few sample_periods, period_ts might also not
@@ -1098,11 +1098,11 @@ static void proc_watchdog_update(bool thresh_changed)
* caller | table->data points to | 'which'
* -------------------|----------------------------------|-------------------------------
* proc_watchdog | watchdog_user_enabled | WATCHDOG_HARDLOCKUP_ENABLED |
- * | | WATCHDOG_SOFTOCKUP_ENABLED
+ * | | WATCHDOG_SOFTLOCKUP_ENABLED
* -------------------|----------------------------------|-------------------------------
* proc_nmi_watchdog | watchdog_hardlockup_user_enabled | WATCHDOG_HARDLOCKUP_ENABLED
* -------------------|----------------------------------|-------------------------------
- * proc_soft_watchdog | watchdog_softlockup_user_enabled | WATCHDOG_SOFTOCKUP_ENABLED
+ * proc_soft_watchdog | watchdog_softlockup_user_enabled | WATCHDOG_SOFTLOCKUP_ENABLED
*/
static int proc_watchdog_common(int which, const struct ctl_table *table, int write,
void *buffer, size_t *lenp, loff_t *ppos)
@@ -1136,7 +1136,7 @@ static int proc_watchdog(const struct ctl_table *table, int write,
void *buffer, size_t *lenp, loff_t *ppos)
{
return proc_watchdog_common(WATCHDOG_HARDLOCKUP_ENABLED |
- WATCHDOG_SOFTOCKUP_ENABLED,
+ WATCHDOG_SOFTLOCKUP_ENABLED,
table, write, buffer, lenp, ppos);
}
@@ -1159,7 +1159,7 @@ static int proc_nmi_watchdog(const struct ctl_table *table, int write,
static int proc_soft_watchdog(const struct ctl_table *table, int write,
void *buffer, size_t *lenp, loff_t *ppos)
{
- return proc_watchdog_common(WATCHDOG_SOFTOCKUP_ENABLED,
+ return proc_watchdog_common(WATCHDOG_SOFTLOCKUP_ENABLED,
table, write, buffer, lenp, ppos);
}
#endif
--
2.43.0