lkml.org 
[lkml]   [2021]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fbdev: sh7760fb: document fallthrough cases
On Sun, Nov 14, 2021 at 10:32:57PM -0800, Randy Dunlap wrote:
> 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.
>
> Fixes: 4a25e41831ee ("video: sh7760fb: SH7760/SH7763 LCDC framebuffer driver")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>
> Cc: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
> Cc: Manuel Lauss <mano@roarinelk.homelinux.net>
> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> Cc: Rich Felker <dalias@libc.org>
> Cc: linux-sh@vger.kernel.org
> Cc: linux-fbdev@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org

Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Thanks, Randy.
--
Gustavo

> ---
> drivers/video/fbdev/sh7760fb.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- linux-next-20211112.orig/drivers/video/fbdev/sh7760fb.c
> +++ linux-next-20211112/drivers/video/fbdev/sh7760fb.c
> @@ -136,11 +136,13 @@ static int sh7760fb_get_color_info(struc
> break;
> 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;

\
 
 \ /
  Last update: 2021-11-15 07:47    [W:0.107 / U:0.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site