drm/amdgpu/vcn: Return void from the stop_dbg_mode
Subsystems (2)
PATCH 1/1 drm/amdgpu/vcn: Return void from the stop_dbg_mode
There is no point in returning an int here. It only returns 0 which the caller never uses. Therefore return void and remove the unnecessary assignment.
Addresses-Coverity: 1504988 ("Unused value")
---
Past discussions:
- V1 Link: https://lore.kernel.org/lkml/[email protected]/
Changes since V1:
- Make stop_dbg_mode return void
- Update commit description
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c +2 -3
@@ -1115,7 +1115,7 @@ static int vcn_v4_0_start(struct amdgpu_device *adev)* * Stop VCN block with dpg mode */ -static int vcn_v4_0_stop_dpg_mode (struct amdgpu_device *adev,int inst_idx) +static void vcn_v4_0_stop_dpg_mode (struct amdgpu_device *adev,int inst_idx) {uint32_t tmp;
@@ -1133,7 +1133,6 @@ static int vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)/* disable dynamic power gating mode */ WREG32_P (SOC15_REG_OFFSET (VCN , inst_idx, regUVD_POWER_STATUS),0 , ~UVD_POWER_STATUS__UVD_PG_MODE_MASK ); -return 0 ; }/**
@@ -1154,7 +1153,7 @@ static int vcn_v4_0_stop(struct amdgpu_device *adev) fw_shared->sq.queue_mode |=FW_QUEUE_DPG_HOLD_OFF ;if (adev->pg_flags &AMD_PG_SUPPORT_VCN_DPG ) { - r =vcn_v4_0_stop_dpg_mode (adev, i); +vcn_v4_0_stop_dpg_mode (adev, i);continue ; }
Signature · 1 line
2.37.1
[AMD Official Use Only - General]
This patch is
Thanks,
Ruijing
-----Original Message-----
From: Khalid Masum <[email protected]>
Sent: Monday, August 15, 2022 2:34 PM
To: Dong, Ruijing <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pan, Xinhui <[email protected]>; David Airlie <[email protected]>; Daniel Vetter <[email protected]>; Zhu, James <[email protected]>; Liu, Leo <[email protected]>; Jiang, Sonny <[email protected]>; Wan Jiabing <[email protected]>; Greg Kroah-Hartman <[email protected]>; Khalid Masum <[email protected]>
Subject: [PATCH linux-next] drm/amdgpu/vcn: Return void from the stop_dbg_mode
There is no point in returning an int here. It only returns 0 which the caller never uses. Therefore return void and remove the unnecessary assignment.
Addresses-Coverity: 1504988 ("Unused value")
Changes since V1:
- Make stop_dbg_mode return void
- Update commit description
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c +2 -1
@@ -1115,7 +1115,7 @@ static int vcn_v4_0_start(struct amdgpu_device *adev)* * Stop VCN block with dpg mode */ -static int vcn_v4_0_stop_dpg_mode (struct amdgpu_device *adev,int inst_idx) +static void vcn_v4_0_stop_dpg_mode (struct amdgpu_device *adev,int +inst_idx) {uint32_t tmp;
@@ -1133,7 +1133,6 @@ static int vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
/* disable dynamic power gating mode */
WREG32_P(SOC15_REG_OFFSET(VCN, inst_idx, regUVD_POWER_STATUS), 0,
~UVD_POWER_STATUS__UVD_PG_MODE_MASK);- return 0;
}
/**
@@ -1154,7 +1153,7 @@ static int vcn_v4_0_stop(struct amdgpu_device *adev)
fw_shared->sq.queue_mode |= FW_QUEUE_DPG_HOLD_OFF;
if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG) {
- r = vcn_v4_0_stop_dpg_mode(adev, i);
+ vcn_v4_0_stop_dpg_mode(adev, i);
continue;
}--
2.37.1
Alex Deucher
AppliedApplied. Thanks!
Alex
Quoted 69 lines · Ruijing
[AMD Official Use Only - General]
This patch is
Reviewed-by Ruijing Dong <[email protected]>Thanks,
Ruijing-----Original Message-----
From: Khalid Masum <[email protected]>
Sent: Monday, August 15, 2022 2:34 PM
To: Dong, Ruijing <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pan, Xinhui <[email protected]>; David Airlie <[email protected]>; Daniel Vetter <[email protected]>; Zhu, James <[email protected]>; Liu, Leo <[email protected]>; Jiang, Sonny <[email protected]>; Wan Jiabing <[email protected]>; Greg Kroah-Hartman <[email protected]>; Khalid Masum <[email protected]>
Subject: [PATCH linux-next] drm/amdgpu/vcn: Return void from thestop_dbg_modeThere is no point in returning an int here. It only returns 0 which the caller never uses. Therefore return void and remove the unnecessary assignment.
Addresses-Coverity: 1504988 ("Unused value")
Fixes 8da1170a16e4 ("drm/amdgpu: add VCN4 ip block support")Suggested-by Ruijing Dong <[email protected]>Suggested-by Greg Kroah-Hartman <[email protected]>Signed-off-by Khalid Masum <[email protected]>Changes since V1:
- Makestop_dbg_modereturn void
- Update commit descriptiondrivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c +3
-4@@ -1115,7 +1115,7 @@ static int vcn_v4_0_start(struct amdgpu_device *adev)* * Stop VCN block with dpg mode */ -static int vcn_v4_0_stop_dpg_mode (struct amdgpu_device *adev,int inst_idx) +static void vcn_v4_0_stop_dpg_mode (struct amdgpu_device *adev,int +inst_idx) {uint32_t tmp;@@ -1133,7 +1133,6 @@ static int vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)/* disable dynamic power gating mode */ WREG32_P (SOC15_REG_OFFSET (VCN , inst_idx, regUVD_POWER_STATUS),0 , ~UVD_POWER_STATUS__UVD_PG_MODE_MASK ); -return 0 ; }/** @@ -1154,7 +1153,7 @@ static int vcn_v4_0_stop(struct amdgpu_device *adev) fw_shared->sq.queue_mode |=FW_QUEUE_DPG_HOLD_OFF ;if (adev->pg_flags &AMD_PG_SUPPORT_VCN_DPG ) { - r =vcn_v4_0_stop_dpg_mode (adev, i); +vcn_v4_0_stop_dpg_mode (adev, i);continue ; } --2.37.1