diff mbox series

drm/msm: Annotate intentional switch statement fall throughs

Message ID 1564073588-27386-1-git-send-email-jcrouse@codeaurora.org (mailing list archive)
State Not Applicable, archived
Delegated to: Andy Gross
Headers show
Series drm/msm: Annotate intentional switch statement fall throughs | expand

Commit Message

Jordan Crouse July 25, 2019, 4:53 p.m. UTC
Explicitly mark intentional fall throughs in switch statements to keep
-Wimplicit-fallthrough from complaining.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
---

 drivers/gpu/drm/msm/adreno/a5xx_gpu.c   | 2 ++
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c   | 1 +
 drivers/gpu/drm/msm/adreno/adreno_gpu.c | 1 +
 3 files changed, 4 insertions(+)

Comments

Rob Clark July 25, 2019, 5:50 p.m. UTC | #1
On Thu, Jul 25, 2019 at 9:53 AM Jordan Crouse <jcrouse@codeaurora.org> wrote:
>
> Explicitly mark intentional fall throughs in switch statements to keep
> -Wimplicit-fallthrough from complaining.
>
> Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>

Reviewed-by: Rob Clark <robdclark@gmail.com>

> ---
>
>  drivers/gpu/drm/msm/adreno/a5xx_gpu.c   | 2 ++
>  drivers/gpu/drm/msm/adreno/a6xx_gpu.c   | 1 +
>  drivers/gpu/drm/msm/adreno/adreno_gpu.c | 1 +
>  3 files changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
> index 1671db4..e9c55d1 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-thru */
>                 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-thru */
>                 case MSM_SUBMIT_CMD_BUF:
>                         OUT_PKT7(ring, CP_INDIRECT_BUFFER_PFE, 3);
>                         OUT_RING(ring, lower_32_bits(submit->cmd[i].iova));
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> index be39cf0..dc8ec2c 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-thru */
>                 case MSM_SUBMIT_CMD_BUF:
>                         OUT_PKT7(ring, CP_INDIRECT_BUFFER_PFE, 3);
>                         OUT_RING(ring, lower_32_bits(submit->cmd[i].iova));
> diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> index 9acbbc0..048c8be 100644
> --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> @@ -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-thru */
>                 case MSM_SUBMIT_CMD_BUF:
>                         OUT_PKT3(ring, adreno_is_a430(adreno_gpu) ?
>                                 CP_INDIRECT_BUFFER_PFE : CP_INDIRECT_BUFFER_PFD, 2);
> --
> 2.7.4
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
index 1671db4..e9c55d1 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-thru */
 		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-thru */
 		case MSM_SUBMIT_CMD_BUF:
 			OUT_PKT7(ring, CP_INDIRECT_BUFFER_PFE, 3);
 			OUT_RING(ring, lower_32_bits(submit->cmd[i].iova));
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index be39cf0..dc8ec2c 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-thru */
 		case MSM_SUBMIT_CMD_BUF:
 			OUT_PKT7(ring, CP_INDIRECT_BUFFER_PFE, 3);
 			OUT_RING(ring, lower_32_bits(submit->cmd[i].iova));
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
index 9acbbc0..048c8be 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
@@ -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-thru */
 		case MSM_SUBMIT_CMD_BUF:
 			OUT_PKT3(ring, adreno_is_a430(adreno_gpu) ?
 				CP_INDIRECT_BUFFER_PFE : CP_INDIRECT_BUFFER_PFD, 2);