fbdev: sh7760fb: document fallthrough cases
Subsystems (2)
PATCH 1/1 fbdev: sh7760fb: document fallthrough cases
Fix fallthrough warnings in sh776fb.c:
../drivers/video/fbdev/sh7760fb.c: In function 'sh7760fb_get_color_info':../drivers/video/fbdev/sh7760fb.c:138:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
138 | lgray = 1;../drivers/video/fbdev/sh7760fb.c:143:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
143 | lgray = 1;
Just document the current state of code execution/flow.
--- drivers/video/fbdev/sh7760fb.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/video/fbdev/sh7760fb.c +2 -0
@@ -136,11 +136,13 @@ static int sh7760fb_get_color_info(strucbreak ;case LDDFR_4BPP_MONO : lgray =1 ; + fallthrough;case LDDFR_4BPP : lbpp =4 ;break ;case LDDFR_6BPP_MONO : lgray =1 ; + fallthrough;case LDDFR_8BPP : lbpp =8 ;break ;
Quoted 10 lines · Randy Dunlap
Fix fallthrough warnings in
sh776fb.c:
../drivers/video/fbdev/sh7760fb.c: In function 'sh7760fb_get_color_info':../drivers/video/fbdev/sh7760fb.c:138:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
138 | lgray = 1;../drivers/video/fbdev/sh7760fb.c:143:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
143 | lgray = 1;Just document the current state of code execution/flow.
Quoted 10 lines
Fixes 4a25e41831ee ("video: sh7760fb: SH7760/SH7763 LCDC framebuffer driver")Signed-off-by Randy Dunlap <[email protected]>Cc "Gustavo A. R. Silva" <[email protected]>Cc Nobuhiro Iwamatsu <[email protected]>Cc Manuel Lauss <[email protected]>Cc Yoshinori Sato <[email protected]>Cc Rich Felker <[email protected]>
Thanks, Randy.
--
Gustavo
Quoted 20 lines
--- drivers/video/fbdev/sh7760fb.c | 2 ++ 1 file changed, 2 insertions(+)drivers/video/fbdev/sh7760fb.c +2
-0@@ -136,11 +136,13 @@ static int sh7760fb_get_color_info(strucbreak ;case LDDFR_4BPP_MONO : lgray =1 ; + fallthrough;case LDDFR_4BPP : lbpp =4 ;break ;case LDDFR_6BPP_MONO : lgray =1 ; + fallthrough;case LDDFR_8BPP : lbpp =8 ;break ;
Quoted 8 lines · Randy Dunlap
Fix fallthrough warnings in
sh776fb.c:
../drivers/video/fbdev/sh7760fb.c: In function 'sh7760fb_get_color_info':../drivers/video/fbdev/sh7760fb.c:138:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
138 | lgray = 1;../drivers/video/fbdev/sh7760fb.c:143:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
143 | lgray = 1;
Quoted 4 lines
Just document the current state of code execution/flow.
Fixes 4a25e41831ee ("video: sh7760fb: SH7760/SH7763 LCDC framebuffer driver")Signed-off-by Randy Dunlap <[email protected]>
Section 30.4.4 ("Data Format") of the SH7760 Group Hardware Manual confirms fall-through is appropriate here (especially for the odd 6 bpp mode).
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 11 lines · Geert Uytterhoeven
Quoted 10 lines · Randy Dunlap
Fix fallthrough warnings in
sh776fb.c:
../drivers/video/fbdev/sh7760fb.c: In function 'sh7760fb_get_color_info':../drivers/video/fbdev/sh7760fb.c:138:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
138 | lgray = 1;../drivers/video/fbdev/sh7760fb.c:143:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
143 | lgray = 1;Just document the current state of code execution/flow.
Quoted 8 lines
Quoted 2 lines
Fixes 4a25e41831ee ("video: sh7760fb: SH7760/SH7763 LCDC framebuffer driver")Signed-off-by Randy Dunlap <[email protected]>Section 30.4.4 ("Data Format") of the SH7760 Group Hardware Manual confirms fall-through is appropriate here (especially for the odd 6 bpp mode).
Reviewed-by Geert Uytterhoeven <[email protected]>
I'm taking this in my -next tree[1].
Thanks
--
Gustavo
[1] https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/log/?h=for-next/kspp-misc-fixes