Skip to contentSkip to conversation

drm/amdgpu/gfx10: Fix missing break in switch statement

PATCH Applied Gustavo A. R. Silva 2 participants 3 messages Jul 21, 2019 – Jul 22, 2019

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

PATCH 1/1 drm/amdgpu/gfx10: Fix missing break in switch statement

Add missing break statement in order to prevent the code from falling through to case AMDGPU_IRQ_STATE_ENABLE.

This bug was found thanks to the ongoing efforts to enable -Wimplicit-fallthrough.

Fixes a644d85a5cd4 ("drm/amdgpu: add gfx v10 implementation (v10)")
---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 -0
index 1675d5837c3c..35e8e29139b1 100644
@@ -4611,6 +4611,7 @@ gfx_v10_0_set_gfx_eop_interrupt_state(struct amdgpu_device *adev,
 		cp_int_cntl = REG_SET_FIELD(cp_int_cntl, CP_INT_CNTL_RING0,
 					    TIME_STAMP_INT_ENABLE, 0);
 		WREG32(cp_int_cntl_reg, cp_int_cntl);
+		break;
 	case AMDGPU_IRQ_STATE_ENABLE:
 		cp_int_cntl = RREG32(cp_int_cntl_reg);
 		cp_int_cntl = REG_SET_FIELD(cp_int_cntl, CP_INT_CNTL_RING0,
Signature · 6 lines
2.22.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Applied
#1 lore raw
Quoted 10 lines · Gustavo A. R. Silva

Add missing break statement in order to prevent the code from falling through to case AMDGPU_IRQ_STATE_ENABLE.

This bug was found thanks to the ongoing efforts to enable -Wimplicit-fallthrough.

Fixes a644d85a5cd4 ("drm/amdgpu: add gfx v10 implementation (v10)")

Applied. Thanks!

Alex

Quoted 23 lines
---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 -1
index 1675d5837c3c..35e8e29139b1 100644
@@ -4611,6 +4611,7 @@ gfx_v10_0_set_gfx_eop_interrupt_state(struct amdgpu_device *adev,
                cp_int_cntl = REG_SET_FIELD(cp_int_cntl, CP_INT_CNTL_RING0,
                                            TIME_STAMP_INT_ENABLE, 0);
                WREG32(cp_int_cntl_reg, cp_int_cntl);
+               break;
        case AMDGPU_IRQ_STATE_ENABLE:
                cp_int_cntl = RREG32(cp_int_cntl_reg);
                cp_int_cntl = REG_SET_FIELD(cp_int_cntl, CP_INT_CNTL_RING0,
--

2.22.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
Quoted 6 lines · Alex Deucher
Quoted 4 lines · Gustavo A. R. Silva

Add missing break statement in order to prevent the code from falling through to case AMDGPU_IRQ_STATE_ENABLE.

Quoted 9 lines
Quoted 6 lines

This bug was found thanks to the ongoing efforts to enable -Wimplicit-fallthrough.

Fixes a644d85a5cd4 ("drm/amdgpu: add gfx v10 implementation (v10)")

Applied. Thanks!

Awesome! Glad to help. :)

Thanks
--
Gustavo