diff mbox series

video: offb: annotate implicit fall throughs

Message ID 20190114204044.20528-1-malat@debian.org (mailing list archive)
State New, archived
Headers show
Series video: offb: annotate implicit fall throughs | expand

Commit Message

Mathieu Malaterre Jan. 14, 2019, 8:40 p.m. UTC
There is a plan to build the kernel with -Wimplicit-fallthrough and
these places in the code produced warnings (W=1). Fix them up.

This commit remove the following warnings:

  drivers/video/fbdev/offb.c:211:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
  drivers/video/fbdev/offb.c:142:3: warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 drivers/video/fbdev/offb.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Gustavo A. R. Silva Jan. 14, 2019, 9:50 p.m. UTC | #1
On 1/14/19 2:40 PM, Mathieu Malaterre wrote:
> There is a plan to build the kernel with -Wimplicit-fallthrough and
> these places in the code produced warnings (W=1). Fix them up.
> 
> This commit remove the following warnings:
> 
>    drivers/video/fbdev/offb.c:211:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    drivers/video/fbdev/offb.c:142:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
> 
> Signed-off-by: Mathieu Malaterre <malat@debian.org>

Acked-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Thanks
--
Gustavo

> ---
>   drivers/video/fbdev/offb.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
> index 31f769d67195..e0f0c5351306 100644
> --- a/drivers/video/fbdev/offb.c
> +++ b/drivers/video/fbdev/offb.c
> @@ -141,6 +141,7 @@ static int offb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
>   		/* Clear PALETTE_ACCESS_CNTL in DAC_CNTL */
>   		out_le32(par->cmap_adr + 0x58,
>   			 in_le32(par->cmap_adr + 0x58) & ~0x20);
> +		/* fall through */
>   	case cmap_r128:
>   		/* Set palette index & data */
>   		out_8(par->cmap_adr + 0xb0, regno);
> @@ -210,6 +211,7 @@ static int offb_blank(int blank, struct fb_info *info)
>   				/* Clear PALETTE_ACCESS_CNTL in DAC_CNTL */
>   				out_le32(par->cmap_adr + 0x58,
>   					 in_le32(par->cmap_adr + 0x58) & ~0x20);
> +				/* fall through */
>   			case cmap_r128:
>   				/* Set palette index & data */
>   				out_8(par->cmap_adr + 0xb0, i);
>
Bartlomiej Zolnierkiewicz Feb. 8, 2019, 5:06 p.m. UTC | #2
On 01/14/2019 10:50 PM, Gustavo A. R. Silva wrote:
> 
> 
> On 1/14/19 2:40 PM, Mathieu Malaterre wrote:
>> There is a plan to build the kernel with -Wimplicit-fallthrough and
>> these places in the code produced warnings (W=1). Fix them up.
>>
>> This commit remove the following warnings:
>>
>>    drivers/video/fbdev/offb.c:211:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
>>    drivers/video/fbdev/offb.c:142:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
>>
>> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> 
> Acked-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Patch queued for v5.1, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
diff mbox series

Patch

diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
index 31f769d67195..e0f0c5351306 100644
--- a/drivers/video/fbdev/offb.c
+++ b/drivers/video/fbdev/offb.c
@@ -141,6 +141,7 @@  static int offb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
 		/* Clear PALETTE_ACCESS_CNTL in DAC_CNTL */
 		out_le32(par->cmap_adr + 0x58,
 			 in_le32(par->cmap_adr + 0x58) & ~0x20);
+		/* fall through */
 	case cmap_r128:
 		/* Set palette index & data */
 		out_8(par->cmap_adr + 0xb0, regno);
@@ -210,6 +211,7 @@  static int offb_blank(int blank, struct fb_info *info)
 				/* Clear PALETTE_ACCESS_CNTL in DAC_CNTL */
 				out_le32(par->cmap_adr + 0x58,
 					 in_le32(par->cmap_adr + 0x58) & ~0x20);
+				/* fall through */
 			case cmap_r128:
 				/* Set palette index & data */
 				out_8(par->cmap_adr + 0xb0, i);