watchdog: Fix fall-through warnings for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 20 Nov 2020 18:32:51 +0000 (12:32 -0600)
committerGustavo A. R. Silva <gustavoars@kernel.org>
Mon, 17 May 2021 23:56:23 +0000 (18:56 -0500)
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
by explicitly adding a fallthrough pseudo-keyword instead of letting the
code fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
drivers/watchdog/machzwd.c

index 743377c5b173536903c2446bcca0c92442f48509..73f2221f6222f72deabf40afba6bdf22367fefcf 100644 (file)
@@ -174,6 +174,7 @@ static inline void zf_set_timer(unsigned short new, unsigned char n)
                fallthrough;
        case WD2:
                zf_writeb(COUNTER_2, new > 0xff ? 0xff : new);
+               fallthrough;
        default:
                return;
        }