linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] video: offb: annotate implicit fall throughs
@ 2019-01-14 20:40 Mathieu Malaterre
  2019-01-14 21:50 ` Gustavo A. R. Silva
  0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Malaterre @ 2019-01-14 20:40 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Mathieu Malaterre, dri-devel, linux-fbdev, linux-kernel

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(+)

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);
-- 
2.19.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] video: offb: annotate implicit fall throughs
  2019-01-14 20:40 [PATCH] video: offb: annotate implicit fall throughs Mathieu Malaterre
@ 2019-01-14 21:50 ` Gustavo A. R. Silva
  2019-02-08 17:06   ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2019-01-14 21:50 UTC (permalink / raw)
  To: Mathieu Malaterre, Bartlomiej Zolnierkiewicz
  Cc: dri-devel, linux-fbdev, linux-kernel



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);
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] video: offb: annotate implicit fall throughs
  2019-01-14 21:50 ` Gustavo A. R. Silva
@ 2019-02-08 17:06   ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2019-02-08 17:06 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Mathieu Malaterre
  Cc: dri-devel, linux-fbdev, linux-kernel


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-08 17:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-14 20:40 [PATCH] video: offb: annotate implicit fall throughs Mathieu Malaterre
2019-01-14 21:50 ` Gustavo A. R. Silva
2019-02-08 17:06   ` Bartlomiej Zolnierkiewicz

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).