fix(xlat): remove always true check in assert

This issue was found with Clang compiler:
lib/xlat_tables_v2/aarch32/xlat_tables_arch.c:206:34:
 error: result of comparison of constant 4294967296 with expression
 of type 'uintptr_t' (aka 'unsigned long') is always true
 [-Werror,-Wtautological-constant-out-of-range-compare]
                assert(virtual_addr_space_size <=
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~

On AARCH32, MAX_VIRT_ADDR_SPACE_SIZE is defined as 1 << 32, and a 32 bit
uintptr_t is always lower.
Just remove the assert line.

Change-Id: Iec2c05290cede6e9fedbbf7b7dff2118bd1f9b16
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
This commit is contained in:
Yann Gautier 2021-08-26 15:39:37 +02:00 committed by Manish Pandey
parent 6acaba6238
commit 74d720a026
1 changed files with 1 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2017-2021, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -203,8 +203,6 @@ void setup_mmu_cfg(uint64_t *params, unsigned int flags,
assert(virtual_addr_space_size >=
xlat_get_min_virt_addr_space_size());
assert(virtual_addr_space_size <=
MAX_VIRT_ADDR_SPACE_SIZE);
assert(IS_POWER_OF_TWO(virtual_addr_space_size));
/*