提交 24f21618 编写于 作者: G Gustavo A. R. Silva

watchdog: scx200_wdt: Mark expected switch fall-through

Mark switch cases where we are expecting to fall through.

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

drivers/watchdog/scx200_wdt.c: In function ‘scx200_wdt_ioctl’:
drivers/watchdog/scx200_wdt.c:188:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
   scx200_wdt_ping();
   ^~~~~~~~~~~~~~~~~
drivers/watchdog/scx200_wdt.c:189:2: note: here
  case WDIOC_GETTIMEOUT:
  ^~~~
Reviewed-by: NKees Cook <keescook@chromium.org>
Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
上级 d259f94f
...@@ -186,6 +186,7 @@ static long scx200_wdt_ioctl(struct file *file, unsigned int cmd, ...@@ -186,6 +186,7 @@ static long scx200_wdt_ioctl(struct file *file, unsigned int cmd,
margin = new_margin; margin = new_margin;
scx200_wdt_update_margin(); scx200_wdt_update_margin();
scx200_wdt_ping(); scx200_wdt_ping();
/* Fall through */
case WDIOC_GETTIMEOUT: case WDIOC_GETTIMEOUT:
if (put_user(margin, p)) if (put_user(margin, p))
return -EFAULT; return -EFAULT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册