Skip to contentSkip to conversation

WATCHDOG: uniphier_wdt.c: Fixed error do not initialise statics to 0

PATCH In review Jagdish Tirumala 2 participants 2 messages Sep 12, 2018

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

PATCH 1/1 WATCHDOG: uniphier_wdt.c: Fixed error do not initialise statics to 0

Fixed error do not initialise statics to 0
in file drivers/watchdog/uniphier_wdt.c

---
 drivers/watchdog/uniphier_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/uniphier_wdt.c +1 -1
index e20a7a459d69..2c62ad7250fb 100644
@@ -41,7 +41,7 @@
 #define WDT_PERIOD_MIN			1
 #define WDT_PERIOD_MAX			128
 
-static unsigned int timeout = 0;
+static unsigned int timeout;
 static bool nowayout = WATCHDOG_NOWAYOUT;
 
 struct uniphier_wdt_dev {
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 3 lines · Jagdish Tirumala

Fixed error do not initialise statics to 0
in file drivers/watchdog/uniphier_wdt.c

I don't mind the patch, but I do mind both subject and description as misleading. This is not an error, except for checkpatch.

A subject such as "watchdog: uniphier_wdt: Do not initialize static variables to 0" and a description along the line of

Fix the following checkpatch error:

ERROR: do not initialise statics to 0
#44: FILE: drivers/watchdog/uniphier_wdt.c:44:
+static unsigned int timeout = 0;

would be more appropriate.

Please also note that the watchdog subsystem does not use capital letters to describe the subsystem name, and the driver tag should not include ".c". As a general note, I would suggest to do a quick browse through commits in a subsystem to get an idea about its conventions.

Thanks,
Guenter

Quoted 21 lines
---
 drivers/watchdog/uniphier_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/uniphier_wdt.c +1 -1
index e20a7a459d69..2c62ad7250fb 100644
@@ -41,7 +41,7 @@
 #define WDT_PERIOD_MIN			1
 #define WDT_PERIOD_MAX			128
 
-static unsigned int timeout = 0;
+static unsigned int timeout;
 static bool nowayout = WATCHDOG_NOWAYOUT;
 
 struct uniphier_wdt_dev {
Signature · 1 line
2.17.1