Re: [PATCH] drm/amd: Clean up errors in amdgpu_cgs.c

From: Alex Deucher
Date: Mon Aug 07 2023 - 13:22:23 EST


Already fixed.

On Wed, Aug 2, 2023 at 2:55 AM Ran Sun <sunran001@xxxxxxxxxx> wrote:
>
> Fix the following errors reported by checkpatch:
>
> ERROR: switch and case should be at the same indent
>
> Signed-off-by: Ran Sun <sunran001@xxxxxxxxxx>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 64 ++++++++++++-------------
> 1 file changed, 32 insertions(+), 32 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
> index 456e385333b6..fafe7057a8c9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
> @@ -163,38 +163,38 @@ static uint16_t amdgpu_get_firmware_version(struct cgs_device *cgs_device,
> uint16_t fw_version = 0;
>
> switch (type) {
> - case CGS_UCODE_ID_SDMA0:
> - fw_version = adev->sdma.instance[0].fw_version;
> - break;
> - case CGS_UCODE_ID_SDMA1:
> - fw_version = adev->sdma.instance[1].fw_version;
> - break;
> - case CGS_UCODE_ID_CP_CE:
> - fw_version = adev->gfx.ce_fw_version;
> - break;
> - case CGS_UCODE_ID_CP_PFP:
> - fw_version = adev->gfx.pfp_fw_version;
> - break;
> - case CGS_UCODE_ID_CP_ME:
> - fw_version = adev->gfx.me_fw_version;
> - break;
> - case CGS_UCODE_ID_CP_MEC:
> - fw_version = adev->gfx.mec_fw_version;
> - break;
> - case CGS_UCODE_ID_CP_MEC_JT1:
> - fw_version = adev->gfx.mec_fw_version;
> - break;
> - case CGS_UCODE_ID_CP_MEC_JT2:
> - fw_version = adev->gfx.mec_fw_version;
> - break;
> - case CGS_UCODE_ID_RLC_G:
> - fw_version = adev->gfx.rlc_fw_version;
> - break;
> - case CGS_UCODE_ID_STORAGE:
> - break;
> - default:
> - DRM_ERROR("firmware type %d do not have version\n", type);
> - break;
> + case CGS_UCODE_ID_SDMA0:
> + fw_version = adev->sdma.instance[0].fw_version;
> + break;
> + case CGS_UCODE_ID_SDMA1:
> + fw_version = adev->sdma.instance[1].fw_version;
> + break;
> + case CGS_UCODE_ID_CP_CE:
> + fw_version = adev->gfx.ce_fw_version;
> + break;
> + case CGS_UCODE_ID_CP_PFP:
> + fw_version = adev->gfx.pfp_fw_version;
> + break;
> + case CGS_UCODE_ID_CP_ME:
> + fw_version = adev->gfx.me_fw_version;
> + break;
> + case CGS_UCODE_ID_CP_MEC:
> + fw_version = adev->gfx.mec_fw_version;
> + break;
> + case CGS_UCODE_ID_CP_MEC_JT1:
> + fw_version = adev->gfx.mec_fw_version;
> + break;
> + case CGS_UCODE_ID_CP_MEC_JT2:
> + fw_version = adev->gfx.mec_fw_version;
> + break;
> + case CGS_UCODE_ID_RLC_G:
> + fw_version = adev->gfx.rlc_fw_version;
> + break;
> + case CGS_UCODE_ID_STORAGE:
> + break;
> + default:
> + DRM_ERROR("firmware type %d do not have version\n", type);
> + break;
> }
> return fw_version;
> }
> --
> 2.17.1
>