[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1612687765-43874-1-git-send-email-jiapeng.chong@linux.alibaba.com>
Date: Sun, 7 Feb 2021 16:49:25 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: alexander.deucher@....com
Cc: christian.koenig@....com, airlied@...ux.ie, daniel@...ll.ch,
amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Subject: [PATCH] drm/amd/pm: Remove unnecessary conversion to bool
Fix the following coccicheck warning:
./drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c:907:47-52:
WARNING: conversion to bool not needed here.
Reported-by: Abaci Robot<abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
---
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
index d68d3df..b364862 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
@@ -904,7 +904,7 @@ static bool sienna_cichlid_is_support_fine_grained_dpm(struct smu_context *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 int sienna_cichlid_print_clk_levels(struct smu_context *smu,
--
1.8.3.1
Powered by blists - more mailing lists