From 1083b2b315cd71f714eb0d0bca20e54ef7be02ad Mon Sep 17 00:00:00 2001 From: Antonio Nino Diaz Date: Fri, 20 Jul 2018 09:17:26 +0100 Subject: 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 Acked-by: Anson Huang Signed-off-by: Antonio Nino Diaz --- plat/common/plat_psci_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plat/common') 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; -- cgit v1.2.3