summaryrefslogtreecommitdiff
path: root/plat/arm/common/arm_pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'plat/arm/common/arm_pm.c')
-rw-r--r--plat/arm/common/arm_pm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/plat/arm/common/arm_pm.c b/plat/arm/common/arm_pm.c
index d0350d6c..a8289ff3 100644
--- a/plat/arm/common/arm_pm.c
+++ b/plat/arm/common/arm_pm.c
@@ -30,11 +30,11 @@ extern unsigned int arm_pm_idle_states[];
int arm_validate_power_state(unsigned int power_state,
psci_power_state_t *req_state)
{
- int pstate = psci_get_pstate_type(power_state);
- int pwr_lvl = psci_get_pstate_pwrlvl(power_state);
- int i;
+ unsigned int pstate = psci_get_pstate_type(power_state);
+ unsigned int pwr_lvl = psci_get_pstate_pwrlvl(power_state);
+ unsigned int i;
- assert(req_state);
+ assert(req_state > 0U);
if (pwr_lvl > PLAT_MAX_PWR_LVL)
return PSCI_E_INVALID_PARAMS;
@@ -59,7 +59,7 @@ int arm_validate_power_state(unsigned int power_state,
/*
* We expect the 'state id' to be zero.
*/
- if (psci_get_pstate_id(power_state))
+ if (psci_get_pstate_id(power_state) != 0U)
return PSCI_E_INVALID_PARAMS;
return PSCI_E_SUCCESS;