drm/amd/powerplay: remove unneeded conversions to bool
authorAndrew F. Davis <afd@ti.com>
Wed, 15 Mar 2017 16:20:24 +0000 (11:20 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 30 Mar 2017 03:53:58 +0000 (23:53 -0400)
Found with scripts/coccinelle/misc/boolconv.cocci.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/amd_powerplay.c
drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c

index 8132d464dcb646303afd06c49b1b33612fefbe4c..79c22f98dc5c6028499e3bebfd17ebc679092374 100644 (file)
@@ -239,7 +239,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)
index 6013ef119ffb3cee2eedee6b4adde6e612b1534a..6646e1402a134a0e41c87ad37264c9cf0861b9cb 100644 (file)
@@ -113,7 +113,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);