Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 630ee1a5 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Wim Van Sebroeck
Browse files

watchdog: Mark expected switch fall-throughs



Mark switch cases where we are expecting to fall through.

This patch fixes the following warnings:

drivers/watchdog/ar7_wdt.c: warning: this statement may fall
through [-Wimplicit-fallthrough=]:  => 237:3
drivers/watchdog/pcwd.c: warning: this statement may fall
through [-Wimplicit-fallthrough=]:  => 653:3
drivers/watchdog/sb_wdog.c: warning: this statement may fall
through [-Wimplicit-fallthrough=]:  => 204:3
drivers/watchdog/wdt.c: warning: this statement may fall
through [-Wimplicit-fallthrough=]:  => 391:3

Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20190729151033.GA10143@embeddedor


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent a18670f4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -235,6 +235,7 @@ static long ar7_wdt_ioctl(struct file *file,
		ar7_wdt_update_margin(new_margin);
		ar7_wdt_kick(1);
		spin_unlock(&wdt_lock);
		/* Fall through */

	case WDIOC_GETTIMEOUT:
		if (put_user(margin, (int *)arg))
+1 −1
Original line number Diff line number Diff line
@@ -651,7 +651,7 @@ static long pcwd_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
			return -EINVAL;

		pcwd_keepalive();
		/* Fall */
		/* Fall through */

	case WDIOC_GETTIMEOUT:
		return put_user(heartbeat, argp);
+1 −0
Original line number Diff line number Diff line
@@ -202,6 +202,7 @@ static long sbwdog_ioctl(struct file *file, unsigned int cmd,
		timeout = time;
		sbwdog_set(user_dog, timeout);
		sbwdog_pet(user_dog);
		/* Fall through */

	case WDIOC_GETTIMEOUT:
		/*
+1 −1
Original line number Diff line number Diff line
@@ -389,7 +389,7 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
		if (wdt_set_heartbeat(new_heartbeat))
			return -EINVAL;
		wdt_ping();
		/* Fall */
		/* Fall through */
	case WDIOC_GETTIMEOUT:
		return put_user(heartbeat, p);
	default: