diff options
author | Yann Gautier <yann.gautier@foss.st.com> | 2021-08-26 15:39:37 +0200 |
---|---|---|
committer | Manish Pandey <manish.pandey2@arm.com> | 2021-10-04 12:43:38 +0200 |
commit | 74d720a026735263d2f290fd05370dad0d4c7219 (patch) | |
tree | beb6bc6cdee078463b1c73c9dfee545e0747e40e /lib/xlat_tables_v2 | |
parent | 6acaba6238c123a7defbdf1d497b6ec78a10e063 (diff) | |
download | arm-trusted-firmware-74d720a026735263d2f290fd05370dad0d4c7219.tar.gz |
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>
Diffstat (limited to 'lib/xlat_tables_v2')
-rw-r--r-- | lib/xlat_tables_v2/aarch32/xlat_tables_arch.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c b/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c index b69c6702b..a95ef072d 100644 --- a/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c +++ b/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c @@ -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)); /* |