Skip to content

Commit 6eaa79f

Browse files
GustavoARSilvabzolnier
authored andcommitted
video: fbdev: s3c-fb: Mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/video/fbdev/s3c-fb.c: In function ‘s3c_fb_blank’: drivers/video/fbdev/s3c-fb.c:811:16: warning: this statement may fall through [-Wimplicit-fallthrough=] sfb->enabled &= ~(1 << index); ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ drivers/video/fbdev/s3c-fb.c:814:2: note: here case FB_BLANK_NORMAL: ^~~~ LD [M] drivers/staging/greybus/gb-light.o CC [M] drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp10b.o drivers/video/fbdev/s3c-fb.c: In function ‘s3c_fb_check_var’: drivers/video/fbdev/s3c-fb.c:286:22: warning: this statement may fall through [-Wimplicit-fallthrough=] var->transp.length = 1; ~~~~~~~~~~~~~~~~~~~^~~ drivers/video/fbdev/s3c-fb.c:288:2: note: here case 18: ^~~~ drivers/video/fbdev/s3c-fb.c:314:22: warning: this statement may fall through [-Wimplicit-fallthrough=] var->transp.offset = 24; ~~~~~~~~~~~~~~~~~~~^~~~ drivers/video/fbdev/s3c-fb.c:316:2: note: here case 24: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 Notice that, in this particular case, the code comments are modified in accordance with what GCC is expecting to find. This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Cc: Jingoo Han <jingoohan1@gmail.com> Cc: Kees Cook <keescook@chromium.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
1 parent 796e2f4 commit 6eaa79f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/video/fbdev/s3c-fb.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ static int s3c_fb_check_var(struct fb_var_screeninfo *var,
287287
/* 666 with one bit alpha/transparency */
288288
var->transp.offset = 18;
289289
var->transp.length = 1;
290-
/* drop through */
290+
/* fall through */
291291
case 18:
292292
var->bits_per_pixel = 32;
293293

@@ -315,7 +315,7 @@ static int s3c_fb_check_var(struct fb_var_screeninfo *var,
315315
case 25:
316316
var->transp.length = var->bits_per_pixel - 24;
317317
var->transp.offset = 24;
318-
/* drop through */
318+
/* fall through */
319319
case 24:
320320
/* our 24bpp is unpacked, so 32bpp */
321321
var->bits_per_pixel = 32;
@@ -812,7 +812,7 @@ static int s3c_fb_blank(int blank_mode, struct fb_info *info)
812812
case FB_BLANK_POWERDOWN:
813813
wincon &= ~WINCONx_ENWIN;
814814
sfb->enabled &= ~(1 << index);
815-
/* fall through to FB_BLANK_NORMAL */
815+
/* fall through - to FB_BLANK_NORMAL */
816816

817817
case FB_BLANK_NORMAL:
818818
/* disable the DMA and display 0x0 (black) */

0 commit comments

Comments
 (0)