drm/amdgpu: Fix fall-through warnings for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 20 Nov 2020 18:24:41 +0000 (12:24 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 24 Nov 2020 17:05:36 +0000 (12:05 -0500)
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly adding multiple break statements instead of just
letting the code fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
drivers/gpu/drm/amd/amdgpu/vi.c

index c291d1ba446b9a961eba68f97ec5fa2c2a141dae..3214fbaa7f2038341a270796347b5bb2fa43ac64 100644 (file)
@@ -8661,6 +8661,7 @@ static int gfx_v10_0_set_priv_inst_fault_state(struct amdgpu_device *adev,
                WREG32_FIELD15(GC, 0, CP_INT_CNTL_RING0,
                               PRIV_INSTR_INT_ENABLE,
                               state == AMDGPU_IRQ_STATE_ENABLE ? 1 : 0);
+               break;
        default:
                break;
        }
index 5d53baadd6f559eddd220eafd5f5827a1ec58fe6..2d6c2fa3304e1e29b28c7ef6af582fa7be048a5a 100644 (file)
@@ -5687,6 +5687,7 @@ static int gfx_v9_0_set_priv_inst_fault_state(struct amdgpu_device *adev,
                WREG32_FIELD15(GC, 0, CP_INT_CNTL_RING0,
                               PRIV_INSTR_INT_ENABLE,
                               state == AMDGPU_IRQ_STATE_ENABLE ? 1 : 0);
+               break;
        default:
                break;
        }
index 0c3421d587e874891fa78be810dcff891bc26e13..cb5b4623566db32e849a63fc0cef58032df053f5 100644 (file)
@@ -502,6 +502,7 @@ static int gmc_v9_0_vm_fault_interrupt_state(struct amdgpu_device *adev,
                                WREG32(reg, tmp);
                        }
                }
+               break;
        default:
                break;
        }
index 9bcd0eebc6d7e6899cdbf744a707fa18535a3922..d56b474b3a219f26767a55c6866a0dbd6cc76599 100644 (file)
@@ -1645,6 +1645,7 @@ static int vi_common_set_clockgating_state(void *handle,
        case CHIP_POLARIS12:
        case CHIP_VEGAM:
                vi_common_set_clockgating_state_by_smu(adev, state);
+               break;
        default:
                break;
        }