summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-09-26 16:05:59 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-09-26 16:13:41 +0900
commit03f55a588e3f5946ef612b62cee2244b64e73484 (patch)
tree666855142792dddf56f5056b6ca09fa74d9a1bb3
parent92d0926a4a4d839942613a755597494db545eeb8 (diff)
xlat: remove cast in MAP_REGION to get back building with GCC 4.9
Since commit 769d65da778b ("xlat: Use MAP_REGION macro as compatibility layer"), building with GCC 4.9 fails. CC plat/arm/board/fvp/fvp_common.c plat/arm/board/fvp/fvp_common.c:60:2: error: initializer element is not constant ARM_MAP_SHARED_RAM, ^ plat/arm/board/fvp/fvp_common.c:60:2: error: (near initialization for 'plat_arm_mmap[0]') make: *** [Makefile:535: build/fvp/release/bl1/fvp_common.o] Error 1 Taking into account that MAP_REGION(_FLAT) is widely used in array initializers, do not use cast. Fixes: 769d65da778b ("xlat: Use MAP_REGION macro as compatibility layer") Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rw-r--r--include/lib/xlat_tables/xlat_tables_v2.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/lib/xlat_tables/xlat_tables_v2.h b/include/lib/xlat_tables/xlat_tables_v2.h
index 2be43296..59f0955f 100644
--- a/include/lib/xlat_tables/xlat_tables_v2.h
+++ b/include/lib/xlat_tables/xlat_tables_v2.h
@@ -23,12 +23,12 @@
/* Helper macro to define entries for mmap_region_t. It allows to
* re-map address mappings from 'pa' to 'va' for each region.
*/
-#define MAP_REGION(_pa, _va, _sz, _attr) ((mmap_region_t){ \
+#define MAP_REGION(_pa, _va, _sz, _attr) { \
.base_pa = (_pa), \
.base_va = (_va), \
.size = (_sz), \
.attr = (_attr), \
- })
+ }
/*
* Shifts and masks to access fields of an mmap_attr_t