All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/radeon/r300: Mark expected switch fall-throughs
@ 2018-10-12 16:12 Gustavo A. R. Silva
  2018-10-12 17:29   ` Alex Deucher
  0 siblings, 1 reply; 5+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-12 16:12 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David (ChunMing) Zhou, David Airlie
  Cc: amd-gfx, dri-devel, linux-kernel, Gustavo A. R. Silva

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Notice that in this particular case, I replaced "Pass through." with
"Fall through.", which is what GCC is expecting to find.

Addresses-Coverity-ID: 114734 ("Missing break in switch")
Addresses-Coverity-ID: 114735 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/gpu/drm/radeon/r300.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index 21161aa..652126f 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -814,7 +814,7 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
 					  ((idx_value >> 21) & 0xF));
 				return -EINVAL;
 			}
-			/* Pass through. */
+			/* Fall through. */
 		case 6:
 			track->cb[i].cpp = 4;
 			break;
@@ -965,7 +965,7 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
 				return -EINVAL;
 			}
 			/* The same rules apply as for DXT3/5. */
-			/* Pass through. */
+			/* Fall through. */
 		case R300_TX_FORMAT_DXT3:
 		case R300_TX_FORMAT_DXT5:
 			track->textures[i].cpp = 1;
-- 
2.7.4


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

* Re: [PATCH] drm/radeon/r300: Mark expected switch fall-throughs
  2018-10-12 16:12 [PATCH] drm/radeon/r300: Mark expected switch fall-throughs Gustavo A. R. Silva
@ 2018-10-12 17:29   ` Alex Deucher
  0 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2018-10-12 17:29 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Deucher, Alexander, Christian Koenig, Chunming Zhou, Dave Airlie,
	Maling list - DRI developers, amd-gfx list, LKML

This and the r420 patch applied.  Thanks!

Alex
On Fri, Oct 12, 2018 at 1:11 PM Gustavo A. R. Silva
<gustavo@embeddedor.com> wrote:
>
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that in this particular case, I replaced "Pass through." with
> "Fall through.", which is what GCC is expecting to find.
>
> Addresses-Coverity-ID: 114734 ("Missing break in switch")
> Addresses-Coverity-ID: 114735 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
>  drivers/gpu/drm/radeon/r300.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
> index 21161aa..652126f 100644
> --- a/drivers/gpu/drm/radeon/r300.c
> +++ b/drivers/gpu/drm/radeon/r300.c
> @@ -814,7 +814,7 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
>                                           ((idx_value >> 21) & 0xF));
>                                 return -EINVAL;
>                         }
> -                       /* Pass through. */
> +                       /* Fall through. */
>                 case 6:
>                         track->cb[i].cpp = 4;
>                         break;
> @@ -965,7 +965,7 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
>                                 return -EINVAL;
>                         }
>                         /* The same rules apply as for DXT3/5. */
> -                       /* Pass through. */
> +                       /* Fall through. */
>                 case R300_TX_FORMAT_DXT3:
>                 case R300_TX_FORMAT_DXT5:
>                         track->textures[i].cpp = 1;
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH] drm/radeon/r300: Mark expected switch fall-throughs
@ 2018-10-12 17:29   ` Alex Deucher
  0 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2018-10-12 17:29 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Deucher, Alexander, Christian Koenig, Chunming Zhou, Dave Airlie,
	Maling list - DRI developers, amd-gfx list, LKML

This and the r420 patch applied.  Thanks!

Alex
On Fri, Oct 12, 2018 at 1:11 PM Gustavo A. R. Silva
<gustavo@embeddedor.com> wrote:
>
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that in this particular case, I replaced "Pass through." with
> "Fall through.", which is what GCC is expecting to find.
>
> Addresses-Coverity-ID: 114734 ("Missing break in switch")
> Addresses-Coverity-ID: 114735 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
>  drivers/gpu/drm/radeon/r300.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
> index 21161aa..652126f 100644
> --- a/drivers/gpu/drm/radeon/r300.c
> +++ b/drivers/gpu/drm/radeon/r300.c
> @@ -814,7 +814,7 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
>                                           ((idx_value >> 21) & 0xF));
>                                 return -EINVAL;
>                         }
> -                       /* Pass through. */
> +                       /* Fall through. */
>                 case 6:
>                         track->cb[i].cpp = 4;
>                         break;
> @@ -965,7 +965,7 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
>                                 return -EINVAL;
>                         }
>                         /* The same rules apply as for DXT3/5. */
> -                       /* Pass through. */
> +                       /* Fall through. */
>                 case R300_TX_FORMAT_DXT3:
>                 case R300_TX_FORMAT_DXT5:
>                         track->textures[i].cpp = 1;
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH] drm/radeon/r300: Mark expected switch fall-throughs
  2018-10-12 17:29   ` Alex Deucher
@ 2018-10-12 19:01     ` Gustavo A. R. Silva
  -1 siblings, 0 replies; 5+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-12 19:01 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Deucher, Alexander, Christian Koenig, Chunming Zhou, Dave Airlie,
	Maling list - DRI developers, amd-gfx list, LKML



On 10/12/18 7:29 PM, Alex Deucher wrote:
> This and the r420 patch applied.  Thanks!
> 

Thanks, Alex. :)
--
Gustavo

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

* Re: [PATCH] drm/radeon/r300: Mark expected switch fall-throughs
@ 2018-10-12 19:01     ` Gustavo A. R. Silva
  0 siblings, 0 replies; 5+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-12 19:01 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Deucher, Alexander, Christian Koenig, Chunming Zhou, Dave Airlie,
	Maling list - DRI developers, amd-gfx list, LKML



On 10/12/18 7:29 PM, Alex Deucher wrote:
> This and the r420 patch applied.  Thanks!
> 

Thanks, Alex. :)
--
Gustavo

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

end of thread, other threads:[~2018-10-12 19:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-12 16:12 [PATCH] drm/radeon/r300: Mark expected switch fall-throughs Gustavo A. R. Silva
2018-10-12 17:29 ` Alex Deucher
2018-10-12 17:29   ` Alex Deucher
2018-10-12 19:01   ` Gustavo A. R. Silva
2018-10-12 19:01     ` Gustavo A. R. Silva

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.