linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] drm: msm: a6xx: Mark expected switch fall-through
@ 2019-07-26 11:27 Anders Roxell
  2019-08-01 14:24 ` Sean Paul
  0 siblings, 1 reply; 2+ messages in thread
From: Anders Roxell @ 2019-07-26 11:27 UTC (permalink / raw)
  To: robdclark, sean, airlied, daniel
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Anders Roxell

When fall-through warnings was enabled by default the following warning
was starting to show up:

../drivers/gpu/drm/msm/adreno/a6xx_gpu.c: In function ‘a6xx_submit’:
../drivers/gpu/drm/msm/adreno/a6xx_gpu.c:116:7: warning: this statement may fall
 through [-Wimplicit-fallthrough=]
    if (priv->lastctx == ctx)
       ^
../drivers/gpu/drm/msm/adreno/a6xx_gpu.c:118:3: note: here
   case MSM_SUBMIT_CMD_BUF:
   ^~~~

Rework so that the compiler doesn't warn about fall-through.

Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index be39cf01e51e..644a6ee53f05 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -115,6 +115,7 @@ static void a6xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit,
 		case MSM_SUBMIT_CMD_CTX_RESTORE_BUF:
 			if (priv->lastctx == ctx)
 				break;
+			/* Fall through */
 		case MSM_SUBMIT_CMD_BUF:
 			OUT_PKT7(ring, CP_INDIRECT_BUFFER_PFE, 3);
 			OUT_RING(ring, lower_32_bits(submit->cmd[i].iova));
-- 
2.20.1


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

* Re: [PATCH 1/3] drm: msm: a6xx: Mark expected switch fall-through
  2019-07-26 11:27 [PATCH 1/3] drm: msm: a6xx: Mark expected switch fall-through Anders Roxell
@ 2019-08-01 14:24 ` Sean Paul
  0 siblings, 0 replies; 2+ messages in thread
From: Sean Paul @ 2019-08-01 14:24 UTC (permalink / raw)
  To: Anders Roxell
  Cc: robdclark, sean, airlied, daniel, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On Fri, Jul 26, 2019 at 01:27:46PM +0200, Anders Roxell wrote:
> When fall-through warnings was enabled by default the following warning
> was starting to show up:
> 
> ../drivers/gpu/drm/msm/adreno/a6xx_gpu.c: In function ‘a6xx_submit’:
> ../drivers/gpu/drm/msm/adreno/a6xx_gpu.c:116:7: warning: this statement may fall
>  through [-Wimplicit-fallthrough=]
>     if (priv->lastctx == ctx)
>        ^
> ../drivers/gpu/drm/msm/adreno/a6xx_gpu.c:118:3: note: here
>    case MSM_SUBMIT_CMD_BUF:
>    ^~~~
> 
> Rework so that the compiler doesn't warn about fall-through.
> 
> Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning")
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>

Hi Anders,
Thank you for your patches. Jordan had previously sent the same fixes in
"drm/msm: Annotate intentional switch statement fall throughs" one day earlier
than yours, so I'll pick up that patch.

Thanks again!

Sean

> ---
>  drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> index be39cf01e51e..644a6ee53f05 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> @@ -115,6 +115,7 @@ static void a6xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit,
>  		case MSM_SUBMIT_CMD_CTX_RESTORE_BUF:
>  			if (priv->lastctx == ctx)
>  				break;
> +			/* Fall through */
>  		case MSM_SUBMIT_CMD_BUF:
>  			OUT_PKT7(ring, CP_INDIRECT_BUFFER_PFE, 3);
>  			OUT_RING(ring, lower_32_bits(submit->cmd[i].iova));
> -- 
> 2.20.1
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS

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

end of thread, other threads:[~2019-08-01 14:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-26 11:27 [PATCH 1/3] drm: msm: a6xx: Mark expected switch fall-through Anders Roxell
2019-08-01 14:24 ` Sean Paul

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