Skip to content

Commit 2bb2ad5

Browse files
superm1alexdeucher
authored andcommitted
drm/amd: Change jpeg_v4_0_5_start_dpg_mode() to void
jpeg_v4_0_5_start_dpg_mode() always returns 0 and the return value doesn't get used in the caller jpeg_v4_0_5_start(). Modify the function to be void. Reported-by: coverity-bot <keescook+coverity-bot@chromium.org> Addresses-Coverity-ID: 1583635 ("Code maintainability issues") Fixes: 0a119d5 ("drm/amdgpu/jpeg: add support for jpeg DPG mode") Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent f6aed04 commit 2bb2ad5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ static int jpeg_v4_0_5_enable_static_power_gating(struct amdgpu_device *adev, in
358358
*
359359
* Start JPEG block with dpg mode
360360
*/
361-
static int jpeg_v4_0_5_start_dpg_mode(struct amdgpu_device *adev, int inst_idx, bool indirect)
361+
static void jpeg_v4_0_5_start_dpg_mode(struct amdgpu_device *adev, int inst_idx, bool indirect)
362362
{
363363
struct amdgpu_ring *ring = adev->jpeg.inst[inst_idx].ring_dec;
364364
uint32_t reg_data = 0;
@@ -411,8 +411,6 @@ static int jpeg_v4_0_5_start_dpg_mode(struct amdgpu_device *adev, int inst_idx,
411411
WREG32_SOC15(JPEG, inst_idx, regUVD_JRBC_RB_CNTL, 0x00000002L);
412412
WREG32_SOC15(JPEG, inst_idx, regUVD_JRBC_RB_SIZE, ring->ring_size / 4);
413413
ring->wptr = RREG32_SOC15(JPEG, inst_idx, regUVD_JRBC_RB_WPTR);
414-
415-
return 0;
416414
}
417415

418416
/**
@@ -458,7 +456,7 @@ static int jpeg_v4_0_5_start(struct amdgpu_device *adev)
458456
VCN_JPEG_DB_CTRL__EN_MASK);
459457

460458
if (adev->pg_flags & AMD_PG_SUPPORT_JPEG_DPG) {
461-
r = jpeg_v4_0_5_start_dpg_mode(adev, i, adev->jpeg.indirect_sram);
459+
jpeg_v4_0_5_start_dpg_mode(adev, i, adev->jpeg.indirect_sram);
462460
continue;
463461
}
464462

0 commit comments

Comments
 (0)