Skip to contentSkip to conversation

watchdog: s32g_wdt: remove incorrect options in watchdog_info struct

PATCH Applied Ethan Nelson-Moore 3 participants 3 messages May 5

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: s32g_wdt: remove incorrect options in watchdog_info struct

The s32g_wdt driver uses two incorrect constants in the options field of its watchdog_info struct. This bit mask should contain WDIOF_* constants, but the driver uses two WDIOC_* ioctl constants (in addition to correct WDIOF_* constants). This causes many incorrect bits to be set in the bit mask. The functionality indicated by these ioctl constants is supported by all drivers using the watchdog framework, so this patch simply removes them.

Fixes bd3f54ec559b ("watchdog: Add the Watchdog Timer for the NXP S32 platform")
---
 drivers/watchdog/s32g_wdt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/watchdog/s32g_wdt.c +1 -2
index ad55063060af..6422a694fc65 100644
@@ -56,8 +56,7 @@ MODULE_PARM_DESC(early_enable,
 
 static const struct watchdog_info s32g_wdt_info = {
 	.identity = "s32g watchdog",
-	.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE |
-	WDIOC_GETTIMEOUT | WDIOC_GETTIMELEFT,
+	.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
 };
 
 static struct s32g_wdt_device *wdd_to_s32g_wdt(struct watchdog_device *wdd)
Signature · 1 line
2.43.0
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Ethan Nelson-Moore

The s32g_wdt driver uses two incorrect constants in the options field of its watchdog_info struct. This bit mask should contain WDIOF_* constants, but the driver uses two WDIOC_* ioctl constants (in addition to correct WDIOF_* constants). This causes many incorrect bits to be set in the bit mask. The functionality indicated by these ioctl constants is supported by all drivers using the watchdog framework, so this patch simply removes them.

Quoted 4 lines
Fixes bd3f54ec559b ("watchdog: Add the Watchdog Timer for the NXP S32 platform")

---

maintainer Applied
#2 lore raw
In reply to Ethan Nelson-Moore
Quoted 8 lines · Ethan Nelson-Moore

The s32g_wdt driver uses two incorrect constants in the options field of its watchdog_info struct. This bit mask should contain WDIOF_* constants, but the driver uses two WDIOC_* ioctl constants (in addition to correct WDIOF_* constants). This causes many incorrect bits to be set in the bit mask. The functionality indicated by these ioctl constants is supported by all drivers using the watchdog framework, so this patch simply removes them.

Quoted 4 lines
Fixes bd3f54ec559b ("watchdog: Add the Watchdog Timer for the NXP S32 platform")

Applied to my watchdog branch.

Thanks,
Guenter