Re: [PATCH] drm/amdgpu: Remove unreachable code in amdgpu_xgmi_set_pstate()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 20.12.23 um 14:56 schrieb Srinivasan Shanmugam:
Fixes the below:

drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c:706 amdgpu_xgmi_set_pstate() warn: ignoring unreachable code.

Cc: Jonathan Kim <Jonathan.Kim@xxxxxxx>
Cc: Felix Kuehling <Felix.Kuehling@xxxxxxx>
Cc: Christian König <christian.koenig@xxxxxxx>
Cc: Alex Deucher <alexander.deucher@xxxxxxx>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@xxxxxxx>
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 3 ---
  1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
index a6c88f2fe6e5..4b756f280c38 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
@@ -703,9 +703,6 @@ int amdgpu_xgmi_set_pstate(struct amdgpu_device *adev, int pstate)
  	/* fw bug so temporarily disable pstate switching */
  	return 0;
- if (!hive || adev->asic_type != CHIP_VEGA20)
-		return 0;
-

Well this isn't really fixing this. The problem is the "return 0;" above.

When this isn't working because of a fw bug then we should probably completely remove the code to avoid warning like this.

Regards,
Christian.

  	mutex_lock(&hive->hive_lock);
if (is_hi_req)




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux