Commit 362030bf authored by Antonio Nino Diaz's avatar Antonio Nino Diaz
Browse files

psci: Use bool in internal interfaces



Change-Id: I77c9cd2d1d6d0122cc49917fa686014bee154589
Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
parent 5b395e37
...@@ -82,7 +82,7 @@ int psci_cpu_suspend(unsigned int power_state, ...@@ -82,7 +82,7 @@ int psci_cpu_suspend(unsigned int power_state,
} }
/* Fast path for CPU standby.*/ /* Fast path for CPU standby.*/
if (is_cpu_standby_req(is_power_down_state, target_pwrlvl) != 0) { if (is_cpu_standby_req(is_power_down_state, target_pwrlvl)) {
if (psci_plat_pm_ops->cpu_standby == NULL) if (psci_plat_pm_ops->cpu_standby == NULL)
return PSCI_E_INVALID_PARAMS; return PSCI_E_INVALID_PARAMS;
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <cpu_data.h> #include <cpu_data.h>
#include <psci.h> #include <psci.h>
#include <spinlock.h> #include <spinlock.h>
#include <stdbool.h>
/* /*
* The PSCI capability which are provided by the generic code but does not * The PSCI capability which are provided by the generic code but does not
...@@ -93,10 +94,10 @@ static inline plat_local_state_t psci_get_cpu_local_state_by_idx(int idx) ...@@ -93,10 +94,10 @@ static inline plat_local_state_t psci_get_cpu_local_state_by_idx(int idx)
} }
/* Helper function to identify a CPU standby request in PSCI Suspend call */ /* Helper function to identify a CPU standby request in PSCI Suspend call */
static inline int is_cpu_standby_req(unsigned int is_power_down_state, static inline bool is_cpu_standby_req(unsigned int is_power_down_state,
unsigned int retn_lvl) unsigned int retn_lvl)
{ {
return ((is_power_down_state == 0U) && (retn_lvl == 0U)) ? 1 : 0; return (is_power_down_state == 0U) && (retn_lvl == 0U);
} }
/******************************************************************************* /*******************************************************************************
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment