watchdog: machzwd: Mark expected switch fall-through
PATCH 1/1 watchdog: machzwd: Mark expected switch fall-through
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 outwdrivers/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.
--- drivers/watchdog/machzwd.c | 1 + 1 file changed, 1 insertion(+)
drivers/watchdog/machzwd.c +1 -0
@@ -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 :
Signature · 1 line
2.21.0
Quoted 18 lines · Gustavo A. R. Silva
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 outwdrivers/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:
^~~~
Quoted 6 lines
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 <[email protected]>
Quoted 19 lines
--- drivers/watchdog/machzwd.c | 1 + 1 file changed, 1 insertion(+)drivers/watchdog/machzwd.c +1
-0@@ -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 :Signature · 1 line
2.21.0
Quoted 19 lines · Guenter Roeck
Quoted 18 lines · Gustavo A. R. Silva
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 outwdrivers/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:
^~~~
Quoted 9 lines
Quoted 6 lines
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 <[email protected]>Reviewed-by Guenter Roeck <[email protected]>
Thank you, Guenter.
--
Gustavo
Quoted 19 lines
Quoted 19 lines
--- drivers/watchdog/machzwd.c | 1 + 1 file changed, 1 insertion(+)drivers/watchdog/machzwd.c +1
-0@@ -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 :Signature · 1 line
2.21.0
Hi Guenter,
I wonder if you took this in you watchdog-next branch.
Thanks
--
Gustavo
Quoted 55 lines · Gustavo A. R. Silva
Quoted 19 lines · Guenter Roeck
Quoted 18 lines · Gustavo A. R. Silva
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 outwdrivers/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:
^~~~Quoted 9 lines
Quoted 6 lines
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 <[email protected]>Reviewed-by Guenter Roeck <[email protected]>Thank you, Guenter.
--
GustavoQuoted 19 lines
Quoted 19 lines
--- drivers/watchdog/machzwd.c | 1 + 1 file changed, 1 insertion(+)drivers/watchdog/machzwd.c +1
-0@@ -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 :Signature · 1 line
2.21.0
Guenter Roeck
maintainerQuoted 4 lines · Gustavo A. R. Silva
Hi Guenter,
I wonder if you took this in you watchdog-next branch.
It is in branch watchdog-next ofgit://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
waiting for Wim to pick it up.
Guenter
Quoted 60 lines
Thanks
--
GustavoQuoted 55 lines · Gustavo A. R. Silva
Quoted 19 lines · Guenter Roeck
Quoted 18 lines · Gustavo A. R. Silva
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 outwdrivers/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:
^~~~Quoted 9 lines
Quoted 6 lines
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 <[email protected]>Reviewed-by Guenter Roeck <[email protected]>Thank you, Guenter.
--
GustavoQuoted 19 lines
Quoted 19 lines
--- drivers/watchdog/machzwd.c | 1 + 1 file changed, 1 insertion(+)drivers/watchdog/machzwd.c +1
-0@@ -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 :Signature · 1 line
2.21.0
Quoted 11 lines · Guenter Roeck
Quoted 4 lines · Gustavo A. R. Silva
Hi Guenter,
I wonder if you took this in you watchdog-next branch.
It is in branch watchdog-next of
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.gitwaiting for Wim to pick it up.
Awesome.
Thank you!
--
Gustavo