Skip to contentSkip to conversation

drm: msm: a3xx: Mark expected switch fall-through

PATCH In review Anders Roxell 1 participant 1 message Jul 26, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 3/3 drm: msm: a3xx: 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/adreno_gpu.c: In function ‘adreno_submit’:
../drivers/gpu/drm/msm/adreno/adreno_gpu.c:429:7: warning: this statement may fall
through [-Wimplicit-fallthrough=]

    if (priv->lastctx == ctx)
       ^

../drivers/gpu/drm/msm/adreno/adreno_gpu.c:431: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")
---
 drivers/gpu/drm/msm/adreno/adreno_gpu.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/msm/adreno/adreno_gpu.c +1 -0
index 9acbbc0f3232..8fea014f0dea 100644
@@ -428,6 +428,7 @@ void adreno_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit,
 			/* ignore if there has not been a ctx switch: */
 			if (priv->lastctx == ctx)
 				break;
+			/* Fall through */
 		case MSM_SUBMIT_CMD_BUF:
 			OUT_PKT3(ring, adreno_is_a430(adreno_gpu) ?
 				CP_INDIRECT_BUFFER_PFE : CP_INDIRECT_BUFFER_PFD, 2);
Signature · 1 line
2.20.1