Skip to contentSkip to conversation

watchdog: wdt977: Mark expected switch fall-through

PATCH In review Gustavo A. R. Silva 3 participants 3 messages Jul 29, 2019 – Jul 30, 2019 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: wdt977: Mark expected switch fall-through

Mark switch cases where we are expecting to fall through.

This patch fixes the following warning (Building: arm):

drivers/watchdog/wdt977.c: In function ‘wdt977_ioctl’:
LD [M] drivers/media/platform/vicodec/vicodec.o
drivers/watchdog/wdt977.c:400:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
wdt977_keepalive();
^~~~~~~~~~~~~~~~~~
drivers/watchdog/wdt977.c:403:2: note: here
case WDIOC_GETTIMEOUT:
^~~~

---
 drivers/watchdog/wdt977.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/wdt977.c +1 -1
index 567005d7598e..5c52c73e1839 100644
@@ -398,7 +398,7 @@ static long wdt977_ioctl(struct file *file, unsigned int cmd,
 			return -EINVAL;
 
 		wdt977_keepalive();
-		/* Fall */
+		/* Fall through */
 
 	case WDIOC_GETTIMEOUT:
 		return put_user(timeout, uarg.i);
Signature · 1 line
2.22.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Gustavo A. R. Silva

Mark switch cases where we are expecting to fall through.

This patch fixes the following warning (Building: arm):

drivers/watchdog/wdt977.c: In function ‘wdt977_ioctl’:
LD [M] drivers/media/platform/vicodec/vicodec.o
drivers/watchdog/wdt977.c:400:3: warning: this statement may fall through [-Wimplicit-fallthrough=]

Quoted 7 lines
   wdt977_keepalive();
   ^~~~~~~~~~~~~~~~~~

drivers/watchdog/wdt977.c:403:2: note: here
case WDIOC_GETTIMEOUT:
^~~~

-Kees

Quoted 20 lines
---
 drivers/watchdog/wdt977.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/wdt977.c +1 -1
index 567005d7598e..5c52c73e1839 100644
@@ -398,7 +398,7 @@ static long wdt977_ioctl(struct file *file, unsigned int cmd,
 			return -EINVAL;
 
 		wdt977_keepalive();
-		/* Fall */
+		/* Fall through */
 
 	case WDIOC_GETTIMEOUT:
 		return put_user(timeout, uarg.i);
Signature · 1 line
2.22.0
Signature · 1 line
Kees Cook
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Gustavo A. R. Silva
Quoted 7 lines · Gustavo A. R. Silva

Mark switch cases where we are expecting to fall through.

This patch fixes the following warning (Building: arm):

drivers/watchdog/wdt977.c: In function ‘wdt977_ioctl’:
LD [M] drivers/media/platform/vicodec/vicodec.o
drivers/watchdog/wdt977.c:400:3: warning: this statement may fall through [-Wimplicit-fallthrough=]

Quoted 8 lines
   wdt977_keepalive();
   ^~~~~~~~~~~~~~~~~~

drivers/watchdog/wdt977.c:403:2: note: here
case WDIOC_GETTIMEOUT:
^~~~

Quoted 17 lines
---
 drivers/watchdog/wdt977.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/wdt977.c +1 -1
index 567005d7598e..5c52c73e1839 100644
@@ -398,7 +398,7 @@ static long wdt977_ioctl(struct file *file, unsigned int cmd,
 			return -EINVAL;
 
 		wdt977_keepalive();
-		/* Fall */
+		/* Fall through */
 
 	case WDIOC_GETTIMEOUT:
 		return put_user(timeout, uarg.i);