arm-trusted-firmware/plat
Masahiro Yamada 6af03f9c45 Use #ifdef for AARCH32 instead of #if
One nasty part of ATF is some of boolean macros are always defined
as 1 or 0, and the rest of them are only defined under certain
conditions.

For the former group, "#if FOO" or "#if !FOO" must be used because
"#ifdef FOO" is always true.  (Options passed by $(call add_define,)
are the cases.)

For the latter, "#ifdef FOO" or "#ifndef FOO" should be used because
checking the value of an undefined macro is strange.

For AARCH32/AARCH64, these macros are defined in the top-level
Makefile as follows:

ifeq (${ARCH},aarch32)
        $(eval $(call add_define,AARCH32))
else
        $(eval $(call add_define,AARCH64))
endif

This means only one of the two is defined.  So, AARCH32/AARCH64
belongs to the latter group where we should use #ifdef or #ifndef.
The conditionals are mostly coded correctly, but I see some mistakes.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-01-24 01:01:21 +09:00
..
arm Use #ifdef for AARCH32 instead of #if 2017-01-24 01:01:21 +09:00
common Use #ifdef for IMAGE_BL* instead of #if 2017-01-24 01:01:21 +09:00
compat AArch32: Add essential ARM platform and FVP support 2016-08-10 18:01:38 +01:00
mediatek Use #ifdef for IMAGE_BL* instead of #if 2017-01-24 01:01:21 +09:00
nvidia/tegra Use #ifdef for IMAGE_BL* instead of #if 2017-01-24 01:01:21 +09:00
qemu Use #ifdef for IMAGE_BL* instead of #if 2017-01-24 01:01:21 +09:00
rockchip Use #ifdef for IMAGE_BL* instead of #if 2017-01-24 01:01:21 +09:00
xilinx/zynqmp Move BL_COHERENT_RAM_BASE/END defines to common_def.h 2017-01-18 19:33:41 +09:00