[PATCH 2/2] drm/amd/powerplay: remove unneeded conversions to bool

From: Andrew F. Davis
Date: Fri Jul 01 2016 - 10:23:22 EST


Found with scripts/coccinelle/misc/boolconv.cocci.

Signed-off-by: Andrew F. Davis <afd@xxxxxx>
---
drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 2 +-
drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index e629f8a..e5f2596 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -299,7 +299,7 @@ static int pp_set_powergating_state(void *handle,

/* Enable/disable GFX per cu powergating through SMU */
return hwmgr->hwmgr_func->enable_per_cu_power_gating(hwmgr,
- state == AMD_PG_STATE_GATE ? true : false);
+ state == AMD_PG_STATE_GATE);
}

static int pp_suspend(void *handle)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
index efb77ed..dd8050d 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
@@ -147,7 +147,7 @@ int phm_enable_dynamic_state_management(struct pp_hwmgr *hwmgr)
NULL, NULL);
}

- enabled = ret == 0 ? true : false;
+ enabled = ret == 0;

cgs_notify_dpm_enabled(hwmgr->device, enabled);

--
2.9.0