]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/amdgpu/sdma5.2: Remove unnecessary conversion to bool
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Sat, 20 Feb 2021 08:35:10 +0000 (16:35 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Feb 2021 14:28:54 +0000 (09:28 -0500)
Fix the following coccicheck warnings:

./drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1621:40-45: WARNING: conversion
to bool not needed here.

./drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1619:40-45: WARNING: conversion
to bool not needed here.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c

index 690a5090475a57d93e57eca61f181899dd9a1966..b39e7db0e299ef3954cd0fa9aacf2e3d65558729 100644 (file)
@@ -1595,9 +1595,9 @@ static int sdma_v5_2_set_clockgating_state(void *handle,
        case CHIP_VANGOGH:
        case CHIP_DIMGREY_CAVEFISH:
                sdma_v5_2_update_medium_grain_clock_gating(adev,
-                               state == AMD_CG_STATE_GATE ? true : false);
+                               state == AMD_CG_STATE_GATE);
                sdma_v5_2_update_medium_grain_light_sleep(adev,
-                               state == AMD_CG_STATE_GATE ? true : false);
+                               state == AMD_CG_STATE_GATE);
                break;
        default:
                break;