Replace the original code with a switch statement to enhance readability and unify code style.
No functional change. Signed-off-by: Xichao Zhao <zhao.xic...@vivo.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index eb3c28669789..0edd92c513c4 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -3771,11 +3771,16 @@ static bool amdgpu_ras_asic_supported(struct amdgpu_device *adev) } } - return adev->asic_type == CHIP_VEGA10 || - adev->asic_type == CHIP_VEGA20 || - adev->asic_type == CHIP_ARCTURUS || - adev->asic_type == CHIP_ALDEBARAN || - adev->asic_type == CHIP_SIENNA_CICHLID; + switch (adev->asic_type) { + case CHIP_VEGA10: + case CHIP_VEGA20: + case CHIP_ARCTURUS: + case CHIP_ALDEBARAN: + case CHIP_SIENNA_CICHLID: + return true; + default: + return false; + } } /* -- 2.34.1