]> www.infradead.org Git - users/willy/linux.git/commitdiff
drm/amdgpu/swsmu/navi1x: Remove unnecessary conversion to bool
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Sat, 20 Feb 2021 02:55:06 +0000 (10:55 +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/pm/swsmu/smu11/navi10_ppt.c:900:47-52: WARNING:
conversion to bool not needed here.

Reviewed-by: Evan Quan <evan.quan@amd.com>
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/pm/swsmu/smu11/navi10_ppt.c

index 6e641f1513d80b0b48a2fce00dfb9485c79ae5a7..e609f1e7914b7c431c8bfc52cacfacb9affd0a36 100644 (file)
@@ -897,7 +897,7 @@ static bool navi10_is_support_fine_grained_dpm(struct smu_context *smu, enum smu
        dpm_desc = &pptable->DpmDescriptor[clk_index];
 
        /* 0 - Fine grained DPM, 1 - Discrete DPM */
-       return dpm_desc->SnapToDiscrete == 0 ? true : false;
+       return dpm_desc->SnapToDiscrete == 0;
 }
 
 static inline bool navi10_od_feature_is_supported(struct smu_11_0_overdrive_table *od_table, enum SMU_11_0_ODFEATURE_CAP cap)