diff mbox series

[3/3] drm/amdgpu/gfx11: Add missing break

Message ID 20220504165009.82557-4-mike@fireburn.co.uk (mailing list archive)
State New, archived
Headers show
Series amdgpu: A few fixes for clang warnings | expand

Commit Message

Mike Lothian May 4, 2022, 4:50 p.m. UTC
This stops clang complaining:

drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:5895:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
        default:
        ^
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:5895:2: note: insert 'break;' to avoid fall-through
        default:
        ^
        break;

Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Alex Deucher May 4, 2022, 7:59 p.m. UTC | #1
Applied patch 3.  Thanks!

Alex

On Wed, May 4, 2022 at 12:50 PM Mike Lothian <mike@fireburn.co.uk> wrote:
>
> This stops clang complaining:
>
> drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:5895:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
>         default:
>         ^
> drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:5895:2: note: insert 'break;' to avoid fall-through
>         default:
>         ^
>         break;
>
> Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> index b6fc39edc862..e26f97f77db6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> @@ -5892,6 +5892,7 @@ static int gfx_v11_0_set_priv_inst_fault_state(struct amdgpu_device *adev,
>                 WREG32_FIELD15_PREREG(GC, 0, CP_INT_CNTL_RING0,
>                                PRIV_INSTR_INT_ENABLE,
>                                state == AMDGPU_IRQ_STATE_ENABLE ? 1 : 0);
> +               break;
>         default:
>                 break;
>         }
> --
> 2.35.1
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
index b6fc39edc862..e26f97f77db6 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
@@ -5892,6 +5892,7 @@  static int gfx_v11_0_set_priv_inst_fault_state(struct amdgpu_device *adev,
 		WREG32_FIELD15_PREREG(GC, 0, CP_INT_CNTL_RING0,
 			       PRIV_INSTR_INT_ENABLE,
 			       state == AMDGPU_IRQ_STATE_ENABLE ? 1 : 0);
+		break;
 	default:
 		break;
 	}