summaryrefslogtreecommitdiff
path: root/lib/psci/psci_main.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-12-26 00:22:47 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-01-24 01:01:21 +0900
commit6af03f9c455861d1d37439665bc06c415215d36a (patch)
treeadd9b0cdfbf13c7858f7acf9244774d007733b86 /lib/psci/psci_main.c
parent3d8256b2a1ef1195aed86bef7378e83d0a61a91b (diff)
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>
Diffstat (limited to 'lib/psci/psci_main.c')
0 files changed, 0 insertions, 0 deletions