* [PATCH] video: fbdev: Mark expected switch fall-through
@ 2019-07-26 11:28 Anders Roxell
2019-07-29 10:42 ` Gustavo A. R. Silva
0 siblings, 1 reply; 2+ messages in thread
From: Anders Roxell @ 2019-07-26 11:28 UTC (permalink / raw)
To: b.zolnierkie; +Cc: dri-devel, linux-fbdev, linux-kernel, Anders Roxell
When fall-through warnings was enabled by default the following warnings
was starting to show 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 so that the compiler doesn't warn about fall-through.
Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
drivers/video/fbdev/sh_mobile_lcdcfb.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c
index ac0bcac9a865..c249763dbf0b 100644
--- a/drivers/video/fbdev/sh_mobile_lcdcfb.c
+++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c
@@ -1594,6 +1594,7 @@ sh_mobile_lcdc_overlay_fb_init(struct sh_mobile_lcdc_overlay *ovl)
case V4L2_PIX_FMT_NV12:
case V4L2_PIX_FMT_NV21:
info->fix.ypanstep = 2;
+ /* Fall through */
case V4L2_PIX_FMT_NV16:
case V4L2_PIX_FMT_NV61:
info->fix.xpanstep = 2;
@@ -2084,6 +2085,7 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch,
case V4L2_PIX_FMT_NV12:
case V4L2_PIX_FMT_NV21:
info->fix.ypanstep = 2;
+ /* Fall through */
case V4L2_PIX_FMT_NV16:
case V4L2_PIX_FMT_NV61:
info->fix.xpanstep = 2;
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] video: fbdev: Mark expected switch fall-through
2019-07-26 11:28 [PATCH] video: fbdev: Mark expected switch fall-through Anders Roxell
@ 2019-07-29 10:42 ` Gustavo A. R. Silva
0 siblings, 0 replies; 2+ messages in thread
From: Gustavo A. R. Silva @ 2019-07-29 10:42 UTC (permalink / raw)
To: Anders Roxell, b.zolnierkie; +Cc: dri-devel, linux-fbdev, linux-kernel
Hi Anders,
On 7/26/19 6:28 AM, Anders Roxell wrote:
> When fall-through warnings was enabled by default the following warnings
> was starting to show 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 so that the compiler doesn't warn about fall-through.
>
> Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning")
This is a misuse of the 'Fixes' tag. You are not fixing that commit. You are
addressing a warning due to the enablement of -Wimplicit-fallthrough in
that commit.
I think that saying that you are addressing a warning due to the enablement
of -Wimplicit-fallthrough is the right way to justify this change.
Thanks
--
Gustavo
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
> drivers/video/fbdev/sh_mobile_lcdcfb.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c
> index ac0bcac9a865..c249763dbf0b 100644
> --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c
> +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c
> @@ -1594,6 +1594,7 @@ sh_mobile_lcdc_overlay_fb_init(struct sh_mobile_lcdc_overlay *ovl)
> case V4L2_PIX_FMT_NV12:
> case V4L2_PIX_FMT_NV21:
> info->fix.ypanstep = 2;
> + /* Fall through */
> case V4L2_PIX_FMT_NV16:
> case V4L2_PIX_FMT_NV61:
> info->fix.xpanstep = 2;
> @@ -2084,6 +2085,7 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch,
> case V4L2_PIX_FMT_NV12:
> case V4L2_PIX_FMT_NV21:
> info->fix.ypanstep = 2;
> + /* Fall through */
> case V4L2_PIX_FMT_NV16:
> case V4L2_PIX_FMT_NV61:
> info->fix.xpanstep = 2;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-29 10:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-26 11:28 [PATCH] video: fbdev: Mark expected switch fall-through Anders Roxell
2019-07-29 10:42 ` Gustavo A. R. Silva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).