Skip to contentSkip to conversation

drm/amdgpu: remove unneeded semicolon

PATCH Applied Yang Li 3 participants 4 messages Jan 13, 2022

Subsystems (2)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH v2 1/2 drm/amdgpu: remove unneeded semicolon

Eliminate the following coccicheck warning:
./drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2725:16-17: Unneeded semicolon

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -1
index d4d9b9ea8bbd..ff9bd5a844fe 100644
@@ -2722,7 +2722,7 @@ struct amdgpu_ras* amdgpu_ras_get_context(struct amdgpu_device *adev)
 int amdgpu_ras_set_context(struct amdgpu_device *adev, struct amdgpu_ras* ras_con)
 {
 	if (!adev)
-	return -EINVAL;;
+		return -EINVAL;
 
 	adev->psp.ras_context.ras = ras_con;
 	return 0;
Signature · 1 line
2.20.1.7.g153144c
author
#1 lore raw

PATCH v2 2/2 drm/amdgpu: clean up some inconsistent indenting

Eliminate the follow smatch warnings:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3504 amdgpu_device_init()
warn: inconsistent indenting drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1716 amdgpu_ras_error_status_query() warn: if statement not indented drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1058 amdgpu_ras_error_inject()
warn: inconsistent indenting

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c    | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index 33388041c354..64d6c0af4c76 100644
@@ -3499,7 +3499,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
 	mutex_init(&adev->notifier_lock);
 	mutex_init(&adev->pm.stable_pstate_ctx_lock);
 
-	 amdgpu_device_init_apu_flags(adev);
+	amdgpu_device_init_apu_flags(adev);
 
 	r = amdgpu_device_check_arguments(adev);
 	if (r)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +5 -3
index ff9bd5a844fe..6d84749698c8 100644
@@ -1055,8 +1055,10 @@ int amdgpu_ras_error_inject(struct amdgpu_device *adev,
 		.address = info->address,
 		.value = info->value,
 	};
-    int ret = -EINVAL;
-    struct amdgpu_ras_block_object* block_obj = amdgpu_ras_get_ras_block(adev, info->head.block, info->head.sub_block_index);
+	int ret = -EINVAL;
+	struct amdgpu_ras_block_object *block_obj = amdgpu_ras_get_ras_block(adev,
+							info->head.block,
+							info->head.sub_block_index);
 
 	if (!obj)
 		return -EINVAL;
@@ -1714,7 +1716,7 @@ static void amdgpu_ras_error_status_query(struct amdgpu_device *adev,
 	}
 
 	if (block_obj->hw_ops->query_ras_error_status)
-	block_obj->hw_ops->query_ras_error_status(adev);
+		block_obj->hw_ops->query_ras_error_status(adev);
 
 }
 
Signature · 1 line
2.20.1.7.g153144c
Reviewed-by on v2 1/2
#2 lore raw
In reply to Yang Li

Series is:

Regards,
Guchun

-----Original Message-----
From: Yang Li <[email protected]>
Sent: Thursday, January 13, 2022 3:12 PM
To: [email protected]; Chen, Guchun <[email protected]>
Cc: [email protected]; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pan, Xinhui <[email protected]>; [email protected]; [email protected]; [email protected]; Yang Li <[email protected]>; Abaci Robot <[email protected]>
Subject: [PATCH -next 1/2 v2] drm/amdgpu: remove unneeded semicolon

Eliminate the following coccicheck warning:
./drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2725:16-17: Unneeded semicolon

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -2
index d4d9b9ea8bbd..ff9bd5a844fe 100644
@@ -2722,7 +2722,7 @@ struct amdgpu_ras* amdgpu_ras_get_context(struct amdgpu_device *adev)  int amdgpu_ras_set_context(struct amdgpu_device *adev, struct amdgpu_ras* ras_con)  {
 	if (!adev)
-	return -EINVAL;;
+		return -EINVAL;
 
 	adev->psp.ras_context.ras = ras_con;
 	return 0;
--

2.20.1.7.g153144c

Applied
#3 lore raw

Applied. Thanks!

Alex

Quoted 37 lines · Guchun

Series is:

Regards,
Guchun

-----Original Message-----
From: Yang Li <[email protected]>
Sent: Thursday, January 13, 2022 3:12 PM
To: [email protected]; Chen, Guchun <[email protected]>
Cc: [email protected]; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pan, Xinhui <[email protected]>; [email protected]; [email protected]; [email protected]; Yang Li <[email protected]>; Abaci Robot <[email protected]>
Subject: [PATCH -next 1/2 v2] drm/amdgpu: remove unneeded semicolon

Eliminate the following coccicheck warning:
./drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2725:16-17: Unneeded semicolon

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -2
index d4d9b9ea8bbd..ff9bd5a844fe 100644
@@ -2722,7 +2722,7 @@ struct amdgpu_ras* amdgpu_ras_get_context(struct amdgpu_device *adev)  int amdgpu_ras_set_context(struct amdgpu_device *adev, struct amdgpu_ras* ras_con)  {
        if (!adev)
-       return -EINVAL;;
+               return -EINVAL;
 
        adev->psp.ras_context.ras = ras_con;
        return 0;
--

2.20.1.7.g153144c