[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200426093958.22875-1-yanaijie@huawei.com>
Date: Sun, 26 Apr 2020 17:39:58 +0800
From: Jason Yan <yanaijie@...wei.com>
To: <evan.quan@....com>, <alexander.deucher@....com>,
<christian.koenig@....com>, <David1.Zhou@....com>,
<airlied@...ux.ie>, <daniel@...ll.ch>, <kevin1.wang@....com>,
<amd-gfx@...ts.freedesktop.org>, <dri-devel@...ts.freedesktop.org>,
<linux-kernel@...r.kernel.org>
CC: Jason Yan <yanaijie@...wei.com>
Subject: [PATCH] drm/amd/powerplay: remove conversion to bool in navi10_ppt.c
The '==' expression itself is bool, no need to convert it to bool again.
This fixes the following coccicheck warning:
drivers/gpu/drm/amd/powerplay/navi10_ppt.c:698:47-52: WARNING:
conversion to bool not needed here
Signed-off-by: Jason Yan <yanaijie@...wei.com>
---
drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
index 2184d247a9f7..135442c36273 100644
--- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
@@ -695,7 +695,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)
--
2.21.1
Powered by blists - more mailing lists