public inbox for linux-fbdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH][next] fbdev: sh7760fb: Fix -Wimplicit-fallthrough warnings
Date: Thu, 22 Jun 2023 19:38:56 +0200	[thread overview]
Message-ID: <ed5784a9-b707-dcd5-5898-cb76e8d169c1@gmx.de> (raw)
In-Reply-To: <ZJR66f3UY0UFZJ01@work>

On 6/22/23 18:46, Gustavo A. R. Silva wrote:
> Fix the following fallthrough warnings seen after building sh
> architecture with sh7763rdp_defconfig configuration:
>
> 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:139:9: note: here
>    139 |         case LDDFR_4BPP:
>        |         ^~~~
> drivers/video/fbdev/sh7760fb.c:143:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    143 |                 lgray = 1;
>        |                 ~~~~~~^~~
> drivers/video/fbdev/sh7760fb.c:144:9: note: here
>    144 |         case LDDFR_8BPP:
>        |         ^~~~
>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

applied.

Thanks!
Helge

> ---
>   drivers/video/fbdev/sh7760fb.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/video/fbdev/sh7760fb.c b/drivers/video/fbdev/sh7760fb.c
> index 768011bdb430..98c5227098a8 100644
> --- a/drivers/video/fbdev/sh7760fb.c
> +++ b/drivers/video/fbdev/sh7760fb.c
> @@ -136,11 +136,13 @@ static int sh7760fb_get_color_info(struct device *dev,
>   		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;


      reply	other threads:[~2023-06-22 17:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22 16:46 [PATCH][next] fbdev: sh7760fb: Fix -Wimplicit-fallthrough warnings Gustavo A. R. Silva
2023-06-22 17:38 ` Helge Deller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ed5784a9-b707-dcd5-5898-cb76e8d169c1@gmx.de \
    --to=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavoars@kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox