
Do not use a macro that just ends up in unreadable code.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com ---
arch/arc/lib/bootm.c | 2 +- arch/arm/lib/bootm.c | 4 ++-- common/image.c | 6 +++--- include/image.h | 6 ------ 4 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c index 04d9d9c..c8569a6 100644 --- a/arch/arc/lib/bootm.c +++ b/arch/arc/lib/bootm.c @@ -75,7 +75,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
cleanup_before_linux();
- if (IMAGE_ENABLE_OF_LIBFDT && images->ft_len) { + if (IS_ENABLED(CONFIG_OF_LIBFDT) && images->ft_len) { r0 = 2; r2 = (unsigned int)images->ft_addr; } else { diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index a477cae..85adad1 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -205,7 +205,7 @@ static void boot_prep_linux(bootm_headers_t *images) { char *commandline = getenv("bootargs");
- if (IMAGE_ENABLE_OF_LIBFDT && images->ft_len) { + if (IS_ENABLED(CONFIG_OF_LIBFDT) && images->ft_len) { #ifdef CONFIG_OF_LIBFDT debug("using: FDT\n"); if (image_setup_linux(images)) { @@ -302,7 +302,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) bootstage_mark(BOOTSTAGE_ID_RUN_OS); announce_and_cleanup(fake);
- if (IMAGE_ENABLE_OF_LIBFDT && images->ft_len) + if (IS_ENABLED(CONFIG_OF_LIBFDT) && images->ft_len) r2 = (unsigned long)images->ft_addr; else r2 = gd->bd->bi_boot_params; diff --git a/common/image.c b/common/image.c index d980725..2c5e0b5 100644 --- a/common/image.c +++ b/common/image.c @@ -1343,7 +1343,7 @@ int image_setup_linux(bootm_headers_t *images) ulong rd_len; int ret;
- if (IMAGE_ENABLE_OF_LIBFDT) + if (IS_ENABLED(CONFIG_OF_LIBFDT)) boot_fdt_add_mem_rsv_regions(lmb, *of_flat_tree);
if (IMAGE_BOOT_GET_CMDLINE) { @@ -1362,13 +1362,13 @@ int image_setup_linux(bootm_headers_t *images) return ret; }
- if (IMAGE_ENABLE_OF_LIBFDT) { + if (IS_ENABLED(CONFIG_OF_LIBFDT)) { ret = boot_relocate_fdt(lmb, of_flat_tree, &of_size); if (ret) return ret; }
- if (IMAGE_ENABLE_OF_LIBFDT && of_size) { + if (IS_ENABLED(CONFIG_OF_LIBFDT) && of_size) { ret = image_setup_libfdt(images, *of_flat_tree, of_size, lmb); if (ret) return ret; diff --git a/include/image.h b/include/image.h index 9eab991..d19f45c 100644 --- a/include/image.h +++ b/include/image.h @@ -96,12 +96,6 @@ struct lmb;
#endif /* CONFIG_FIT */
-#ifdef CONFIG_OF_LIBFDT -# define IMAGE_ENABLE_OF_LIBFDT 1 -#else -# define IMAGE_ENABLE_OF_LIBFDT 0 -#endif - #ifdef CONFIG_SYS_BOOT_GET_CMDLINE # define IMAGE_BOOT_GET_CMDLINE 1 #else