Skip to contentSkip to conversation

watchdog: use boolean value when setting nowayout

PATCH In review Tian Tao 2 participants 2 messages Dec 29, 2020 Watchdog device drivers

lore
Share & tools
lore

Tian Tao

author
#0 lore raw

PATCH 1/1 watchdog: use boolean value when setting nowayout

Fixes coccicheck warnings:
drivers/watchdog/alim7101_wdt.c:390:2-10: WARNING: Assignment of 0/1 to bool variable

---
 drivers/watchdog/alim7101_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/alim7101_wdt.c +1 -1
index 4ff7f5a..951449e 100644
@@ -387,7 +387,7 @@ static int __init alim7101_wdt_init(void)
 			pr_info("Detected old alim7101 revision 'a1d'.  If this is a cobalt board, set the 'use_gpio' module parameter.\n");
 			goto err_out;
 		}
-		nowayout = 1;
+		nowayout = true;
 	} else if ((tmp & 0x1e) != 0x12 && (tmp & 0x1e) != 0x00) {
 		pr_info("ALi 1543 South-Bridge does not have the correct revision number (???1001?) - WDT not set\n");
 		goto err_out;
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 15 lines · Tian Tao

Fixes coccicheck warnings:
drivers/watchdog/alim7101_wdt.c:390:2-10: WARNING: Assignment of 0/1 to bool variable

---
 drivers/watchdog/alim7101_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/alim7101_wdt.c +0 -0
index 4ff7f5a..951449e 100644

drivers/watchdog/alim7101_wdt.c static int __init alim7101_wdt_init(void) · line 393

Quoted 8 lines
drivers/watchdog/alim7101_wdt.c +1 -1
@@ -387,7 +387,7 @@ static int __init alim7101_wdt_init(void)
 			pr_info("Detected old alim7101 revision 'a1d'.  If this is a cobalt board, set the 'use_gpio' module parameter.\n");
 			goto err_out;
 		}
-		nowayout = 1;
+		nowayout = true;
 	} else if ((tmp & 0x1e) != 0x12 && (tmp & 0x1e) != 0x00) {
 		pr_info("ALi 1543 South-Bridge does not have the correct revision number (???1001?) - WDT not set\n");
 		goto err_out;

This driver would benefit from conversion to use the watchdog subsystem, but it doesn't benefit from cosmetic changes. For the record, I am not going to accept cosmetic changes to watchdog drivers unless they use the watchdog subsystem.

As a general comment, please list the driver name in the subject of your patches.

Thanks,
Guenter