[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190726112751.19461-1-anders.roxell@linaro.org>
Date: Fri, 26 Jul 2019 13:27:51 +0200
From: Anders Roxell <anders.roxell@...aro.org>
To: robdclark@...il.com, sean@...rly.run, airlied@...ux.ie,
daniel@...ll.ch
Cc: linux-arm-msm@...r.kernel.org, dri-devel@...ts.freedesktop.org,
freedreno@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
Anders Roxell <anders.roxell@...aro.org>
Subject: [PATCH 2/3] drm: msm: a5xx: Mark expected switch fall-through
When fall-through warnings was enabled by default the following warning
was starting to show up:
../drivers/gpu/drm/msm/adreno/a5xx_gpu.c: In function ‘a5xx_submit’:
../drivers/gpu/drm/msm/adreno/a5xx_gpu.c:150:7: warning: this statement may fall
through [-Wimplicit-fallthrough=]
if (priv->lastctx == ctx)
^
../drivers/gpu/drm/msm/adreno/a5xx_gpu.c:152: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@...aro.org>
---
drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
index 1671db47aa57..71397ed3c99f 100644
--- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
@@ -59,6 +59,7 @@ static void a5xx_submit_in_rb(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:
/* copy commands into RB: */
obj = submit->bos[submit->cmd[i].idx].obj;
@@ -149,6 +150,7 @@ static void a5xx_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
Powered by blists - more mailing lists