Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video: fbdev: sh_mobile_lcdcfb: Mark expected switch fall-through

Now that -Wimplicit-fallthrough is passed to GCC by default, the
following warnings shows up:

../drivers/video/fbdev/sh_mobile_lcdcfb.c: In function ‘sh_mobile_lcdc_channel_fb_init’:
../drivers/video/fbdev/sh_mobile_lcdcfb.c:2086:22: warning: this statement may fall
through [-Wimplicit-fallthrough=]
info->fix.ypanstep = 2;
~~~~~~~~~~~~~~~~~~~^~~
../drivers/video/fbdev/sh_mobile_lcdcfb.c:2087:2: note: here
case V4L2_PIX_FMT_NV16:
^~~~
../drivers/video/fbdev/sh_mobile_lcdcfb.c: In function ‘sh_mobile_lcdc_overlay_fb_init’:
../drivers/video/fbdev/sh_mobile_lcdcfb.c:1596:22: warning: this statement may fall
through [-Wimplicit-fallthrough=]
info->fix.ypanstep = 2;
~~~~~~~~~~~~~~~~~~~^~~
../drivers/video/fbdev/sh_mobile_lcdcfb.c:1597:2: note: here
case V4L2_PIX_FMT_NV16:
^~~~

Rework to address a warnings due to the enablement of
-Wimplicit-fallthrough.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Cc: Gustavo A. R. Silva <gustavo@embeddedor.com>
[b.zolnierkie: fix patch summary]
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190730152530.3055-1-anders.roxell@linaro.org

authored by

Anders Roxell and committed by
Bartlomiej Zolnierkiewicz
cc0c3e39 af70a486

+2
+2
drivers/video/fbdev/sh_mobile_lcdcfb.c
··· 1594 1594 case V4L2_PIX_FMT_NV12: 1595 1595 case V4L2_PIX_FMT_NV21: 1596 1596 info->fix.ypanstep = 2; 1597 + /* Fall through */ 1597 1598 case V4L2_PIX_FMT_NV16: 1598 1599 case V4L2_PIX_FMT_NV61: 1599 1600 info->fix.xpanstep = 2; ··· 2085 2084 case V4L2_PIX_FMT_NV12: 2086 2085 case V4L2_PIX_FMT_NV21: 2087 2086 info->fix.ypanstep = 2; 2087 + /* Fall through */ 2088 2088 case V4L2_PIX_FMT_NV16: 2089 2089 case V4L2_PIX_FMT_NV61: 2090 2090 info->fix.xpanstep = 2;