diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-07-20 09:17:26 +0100 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-07-20 13:49:22 +0100 |
commit | 1083b2b315cd71f714eb0d0bca20e54ef7be02ad (patch) | |
tree | b5f88c2bf84088695aced9a36b7581141b661e4b /plat/common | |
parent | bef9a10fe4b910767b94533f318cfaabe0e0ee01 (diff) | |
download | arm-trusted-firmware-1083b2b315cd71f714eb0d0bca20e54ef7be02ad.tar.gz |
PSCI: Fix types of definitions
Also change header guards to fix defects of MISRA C-2012 Rule 21.1.
Change-Id: Ied0d4b0e557ef6119ab669d106d2ac5d99620c57
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Acked-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'plat/common')
-rw-r--r-- | plat/common/plat_psci_common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plat/common/plat_psci_common.c b/plat/common/plat_psci_common.c index 0e818d0de..6c5cd55c4 100644 --- a/plat/common/plat_psci_common.c +++ b/plat/common/plat_psci_common.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -16,7 +16,7 @@ #pragma weak plat_psci_stat_get_residency /* Ticks elapsed in one second by a signal of 1 MHz */ -#define MHZ_TICKS_PER_SEC 1000000 +#define MHZ_TICKS_PER_SEC 1000000U /* Maximum time-stamp value read from architectural counters */ #ifdef AARCH32 @@ -49,7 +49,7 @@ static u_register_t calc_stat_residency(unsigned long long pwrupts, * convert time-stamp into microseconds. */ residency_div = read_cntfrq_el0() / MHZ_TICKS_PER_SEC; - assert(residency_div); + assert(residency_div > 0U); if (pwrupts < pwrdnts) res = MAX_TS - pwrdnts + pwrupts; |