diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-08-01 16:42:10 +0100 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-08-02 15:08:18 +0100 |
commit | 362030bf0679c118233fbe69fb287d8742e598ee (patch) | |
tree | b6b95ed8b4b31c00193c217349c52ad906fc6d3d /lib | |
parent | 5b395e37465aa12a3249a6ab1dd776f89dc16d05 (diff) | |
download | platform_external_arm-trusted-firmware-362030bf0679c118233fbe69fb287d8742e598ee.tar.gz platform_external_arm-trusted-firmware-362030bf0679c118233fbe69fb287d8742e598ee.tar.bz2 platform_external_arm-trusted-firmware-362030bf0679c118233fbe69fb287d8742e598ee.zip |
psci: Use bool in internal interfaces
Change-Id: I77c9cd2d1d6d0122cc49917fa686014bee154589
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/psci/psci_main.c | 2 | ||||
-rw-r--r-- | lib/psci/psci_private.h | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/psci/psci_main.c b/lib/psci/psci_main.c index 6a35ff6f7..fd822bcfd 100644 --- a/lib/psci/psci_main.c +++ b/lib/psci/psci_main.c @@ -82,7 +82,7 @@ int psci_cpu_suspend(unsigned int power_state, } /* 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) return PSCI_E_INVALID_PARAMS; diff --git a/lib/psci/psci_private.h b/lib/psci/psci_private.h index 2ea9f76c3..82b951db6 100644 --- a/lib/psci/psci_private.h +++ b/lib/psci/psci_private.h @@ -14,6 +14,7 @@ #include <cpu_data.h> #include <psci.h> #include <spinlock.h> +#include <stdbool.h> /* * 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) } /* 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, - unsigned int retn_lvl) +static inline bool is_cpu_standby_req(unsigned int is_power_down_state, + unsigned int retn_lvl) { - return ((is_power_down_state == 0U) && (retn_lvl == 0U)) ? 1 : 0; + return (is_power_down_state == 0U) && (retn_lvl == 0U); } /******************************************************************************* |