Re: [PATCH][next] watchdog: scx200_wdt: Use fallthrough pseudo-keyword

From: Guenter Roeck
Date: Fri Jul 17 2020 - 15:33:37 EST


On 7/17/20 9:40 AM, Gustavo A. R. Silva wrote:
> Replace the existing /* fall through */ comments and its variants with
> the new pseudo-keyword macro fallthrough[1].
>
> [1] https://www.kernel.org/doc/html/v5.7-rc7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@xxxxxxxxxx>

Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>

> ---
> drivers/watchdog/scx200_wdt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/scx200_wdt.c b/drivers/watchdog/scx200_wdt.c
> index c94098acb78f..7b5e18323f3f 100644
> --- a/drivers/watchdog/scx200_wdt.c
> +++ b/drivers/watchdog/scx200_wdt.c
> @@ -186,7 +186,7 @@ static long scx200_wdt_ioctl(struct file *file, unsigned int cmd,
> margin = new_margin;
> scx200_wdt_update_margin();
> scx200_wdt_ping();
> - /* Fall through */
> + fallthrough;
> case WDIOC_GETTIMEOUT:
> if (put_user(margin, p))
> return -EFAULT;
>