watchdog: riowd: Mark expected switch fall-through
PATCH 1/1 watchdog: riowd: Mark expected switch fall-through
Mark switch cases where we are expecting to fall through.
This patch fixes the following warnings (Building: sparc64):
drivers/watchdog/riowd.c: In function ‘riowd_ioctl’:drivers/watchdog/riowd.c:136:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
riowd_writereg(p, riowd_timeout, WDTO_INDEX); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~drivers/watchdog/riowd.c:139:2: note: here
case WDIOC_GETTIMEOUT:
^~~~
--- drivers/watchdog/riowd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/riowd.c +1 -1
@@ -134,7 +134,7 @@ static long riowd_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)return -EINVAL ; riowd_timeout = (new_margin +59 ) /60 ;riowd_writereg (p, riowd_timeout,WDTO_INDEX ); -/* Fall */ +/* Fall through */ case WDIOC_GETTIMEOUT :return put_user (riowd_timeout *60 , (int __user *)argp);
Signature · 1 line
2.22.0
Quoted 6 lines · Gustavo A. R. Silva
Mark switch cases where we are expecting to fall through.
This patch fixes the following warnings (Building: sparc64):
drivers/watchdog/riowd.c: In function ‘riowd_ioctl’:drivers/watchdog/riowd.c:136:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
Quoted 7 lines
riowd_writereg(p, riowd_timeout, WDTO_INDEX); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/watchdog/riowd.c:139:2: note: here
caseWDIOC_GETTIMEOUT:
^~~~Signed-off-by Gustavo A. R. Silva <[email protected]>
-Kees
Quoted 20 lines
--- drivers/watchdog/riowd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/watchdog/riowd.c +1
-1@@ -134,7 +134,7 @@ static long riowd_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)return -EINVAL ; riowd_timeout = (new_margin +59 ) /60 ;riowd_writereg (p, riowd_timeout,WDTO_INDEX ); -/* Fall */ +/* Fall through */ case WDIOC_GETTIMEOUT :return put_user (riowd_timeout *60 , (int __user *)argp);Signature · 1 line
2.22.0
Signature · 1 line
Kees Cook
Quoted 6 lines · Gustavo A. R. Silva
Mark switch cases where we are expecting to fall through.
This patch fixes the following warnings (Building: sparc64):
drivers/watchdog/riowd.c: In function ‘riowd_ioctl’:drivers/watchdog/riowd.c:136:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
Quoted 8 lines
riowd_writereg(p, riowd_timeout, WDTO_INDEX); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/watchdog/riowd.c:139:2: note: here
caseWDIOC_GETTIMEOUT:
^~~~Signed-off-by Gustavo A. R. Silva <[email protected]>Reviewed-by Kees Cook <[email protected]>
Quoted 17 lines
--- drivers/watchdog/riowd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/watchdog/riowd.c +1
-1@@ -134,7 +134,7 @@ static long riowd_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)return -EINVAL ; riowd_timeout = (new_margin +59 ) /60 ;riowd_writereg (p, riowd_timeout,WDTO_INDEX ); -/* Fall */ +/* Fall through */ case WDIOC_GETTIMEOUT :return put_user (riowd_timeout *60 , (int __user *)argp);