[PATCH -next 14/14] drm/amdgpu: remove unnecessary conversion to bool in gfx_v9_0.c

Chen Zhou chenzhou10 at huawei.com
Tue Jan 21 13:55:40 UTC 2020


Fixes coccicheck warning:

./drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:4737:43-48: WARNING:
	conversion to bool not needed here

Signed-off-by: Chen Zhou <chenzhou10 at huawei.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 2f782c3..e4744ae 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -4672,7 +4672,7 @@ static int gfx_v9_0_set_powergating_state(void *handle,
 					  enum amd_powergating_state state)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
-	bool enable = (state == AMD_PG_STATE_GATE) ? true : false;
+	bool enable = state == AMD_PG_STATE_GATE;
 
 	switch (adev->asic_type) {
 	case CHIP_RAVEN:
@@ -4734,7 +4734,7 @@ static int gfx_v9_0_set_clockgating_state(void *handle,
 	case CHIP_ARCTURUS:
 	case CHIP_RENOIR:
 		gfx_v9_0_update_gfx_clock_gating(adev,
-						 state == AMD_CG_STATE_GATE ? true : false);
+						 state == AMD_CG_STATE_GATE);
 		break;
 	default:
 		break;
-- 
2.7.4



More information about the dri-devel mailing list