summaryrefslogtreecommitdiff
path: root/plat/compat
diff options
context:
space:
mode:
authorDavid Cunado <david.cunado@arm.com>2017-06-21 16:52:45 +0100
committerDavid Cunado <david.cunado@arm.com>2017-06-27 09:57:21 +0100
commit0dd4195114c8d2b6f8be5b00c3b8011a548fe1ae (patch)
treec6a9cef690c3509ae8131e045934ec931e8471cc /plat/compat
parent73e11b4321fa8b0d7032175e1ddf65a4a320847c (diff)
Resolve signed-unsigned comparison issues
A recent commit 030567e6f51731982a7e71cbd387de93bc0e35fd added U()/ULL() macro to TF constants. This has caused some signed-unsigned comparison warnings / errors in the TF static analysis. This patch addresses these issues by migrating impacted variables from signed ints to unsigned ints and vice verse where applicable. Change-Id: I4b4c739a3fa64aaf13b69ad1702c66ec79247e53 Signed-off-by: David Cunado <david.cunado@arm.com>
Diffstat (limited to 'plat/compat')
-rw-r--r--plat/compat/plat_topology_compat.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/plat/compat/plat_topology_compat.c b/plat/compat/plat_topology_compat.c
index d22feee8..48d565c3 100644
--- a/plat/compat/plat_topology_compat.c
+++ b/plat/compat/plat_topology_compat.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -88,8 +88,8 @@ void sort_mpidr_by_cpu_idx(unsigned int aff_count, unsigned long mpidr_list[])
******************************************************************************/
static unsigned int init_pwr_domain_tree_desc(unsigned long mpidr,
unsigned int affmap_idx,
- int cur_afflvl,
- int tgt_afflvl)
+ unsigned int cur_afflvl,
+ unsigned int tgt_afflvl)
{
unsigned int ctr, aff_count;
@@ -137,18 +137,20 @@ static unsigned int init_pwr_domain_tree_desc(unsigned long mpidr,
******************************************************************************/
const unsigned char *plat_get_power_domain_tree_desc(void)
{
- int afflvl, affmap_idx;
+ int afflvl;
+ unsigned int affmap_idx;
/*
* We assume that the platform allocates affinity instance ids from
* 0 onwards at each affinity level in the mpidr. FIRST_MPIDR = 0.0.0.0
*/
affmap_idx = 0;
- for (afflvl = PLATFORM_MAX_AFFLVL; afflvl >= MPIDR_AFFLVL0; afflvl--) {
+ for (afflvl = (int) PLATFORM_MAX_AFFLVL;
+ afflvl >= (int) MPIDR_AFFLVL0; afflvl--) {
affmap_idx = init_pwr_domain_tree_desc(FIRST_MPIDR,
affmap_idx,
PLATFORM_MAX_AFFLVL,
- afflvl);
+ (unsigned int) afflvl);
}
assert(affmap_idx == (PLATFORM_NUM_AFFS - PLATFORM_CORE_COUNT + 1));