dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/amd: Clean up errors in amdgpu_cgs.c
@ 2023-08-02  6:55 Ran Sun
  2023-08-07 17:21 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: Ran Sun @ 2023-08-02  6:55 UTC (permalink / raw)
  To: alexander.deucher; +Cc: Ran Sun, dri-devel, amd-gfx, linux-kernel

Fix the following errors reported by checkpatch:

ERROR: switch and case should be at the same indent

Signed-off-by: Ran Sun <sunran001@208suo.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/amd: Clean up errors in amdgpu_cgs.c
  2023-08-02  6:55 [PATCH] drm/amd: Clean up errors in amdgpu_cgs.c Ran Sun
@ 2023-08-07 17:21 ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2023-08-07 17:21 UTC (permalink / raw)
  To: Ran Sun; +Cc: alexander.deucher, amd-gfx, dri-devel, linux-kernel

Already fixed.

On Wed, Aug 2, 2023 at 2:55 AM Ran Sun <sunran001@208suo.com> wrote:
>
> Fix the following errors reported by checkpatch:
>
> ERROR: switch and case should be at the same indent
>
> Signed-off-by: Ran Sun <sunran001@208suo.com>
> ---
>  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
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-07 17:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-02  6:55 [PATCH] drm/amd: Clean up errors in amdgpu_cgs.c Ran Sun
2023-08-07 17:21 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).