diff options
| author | Srinivasan Shanmugam <[email protected]> | 2023-12-20 14:37:54 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2024-01-03 16:16:06 +0000 |
| commit | 5ce9a6ad8ec48445ff6c999d064f7931f892bf2b (patch) | |
| tree | 5e507a13d7c2f3b23067ae0164228582ab60311e /drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c | |
| parent | drm/amd/display: Adjust kdoc for 'dcn35_hw_block_power_down' & 'dcn35_hw_bloc... (diff) | |
| download | kernel-5ce9a6ad8ec48445ff6c999d064f7931f892bf2b.tar.gz kernel-5ce9a6ad8ec48445ff6c999d064f7931f892bf2b.zip | |
drm/amdgpu: Drop redundant unsigned >=0 comparision 'amdgpu_gfx_rlc_init_microcode()'
unsigned int "version_minor" is always >= 0
Fixes the below:
drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c:534 amdgpu_gfx_rlc_init_microcode() warn: always true condition '(version_minor >= 0) => (0-u16max >= 0)'
Cc: Christian König <[email protected]>
Cc: Alex Deucher <[email protected]>
Signed-off-by: Srinivasan Shanmugam <[email protected]>
Reviewed-by: Tao Zhou <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c index 35e0ae9acadc..2c3675d91614 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c @@ -531,13 +531,12 @@ int amdgpu_gfx_rlc_init_microcode(struct amdgpu_device *adev, if (version_major == 2 && version_minor == 1) adev->gfx.rlc.is_rlc_v2_1 = true; - if (version_minor >= 0) { - err = amdgpu_gfx_rlc_init_microcode_v2_0(adev); - if (err) { - dev_err(adev->dev, "fail to init rlc v2_0 microcode\n"); - return err; - } + err = amdgpu_gfx_rlc_init_microcode_v2_0(adev); + if (err) { + dev_err(adev->dev, "fail to init rlc v2_0 microcode\n"); + return err; } + if (version_minor >= 1) amdgpu_gfx_rlc_init_microcode_v2_1(adev); if (version_minor >= 2) |
