From 0843bdc14ca4c6c8c2906a194fc19c8f7de7361c Mon Sep 17 00:00:00 2001 From: "Gustavo A. R. Silva" Date: Wed, 10 Apr 2019 13:49:05 -0500 Subject: watchdog: machzwd: Mark expected switch fall-through MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/watchdog/machzwd.c: In function ‘zf_set_timer’: ./arch/x86/include/asm/io.h:355:14: warning: this statement may fall through [-Wimplicit-fallthrough=] #define outw outw drivers/watchdog/machzwd.c:80:53: note: in expansion of macro ‘outw’ #define zf_writew(port, data) { outb(port, INDEX); outw(data, DATA_W); } ^~~~ drivers/watchdog/machzwd.c:179:3: note: in expansion of macro ‘zf_writew’ zf_writew(COUNTER_1, new); ^~~~~~~~~ drivers/watchdog/machzwd.c:180:2: note: here case WD2: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck --- drivers/watchdog/machzwd.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/watchdog/machzwd.c') diff --git a/drivers/watchdog/machzwd.c b/drivers/watchdog/machzwd.c index c3926d0cc016..c2c322dd1d90 100644 --- a/drivers/watchdog/machzwd.c +++ b/drivers/watchdog/machzwd.c @@ -177,6 +177,7 @@ static inline void zf_set_timer(unsigned short new, unsigned char n) switch (n) { case WD1: zf_writew(COUNTER_1, new); + /* fall through */ case WD2: zf_writeb(COUNTER_2, new > 0xff ? 0xff : new); default: -- cgit v1.2.3