From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Sat, 29 Aug 2020 15:41:44 -0600 Subject: [PATCH v2 03/16] x86: zimage: Avoid using #ifdef In-Reply-To: <20200829214157.3795497-1-sjg@chromium.org> References: <20200829214157.3795497-1-sjg@chromium.org> Message-ID: <20200829214157.3795497-4-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Use IS_ENABLED() instead of #ifdef in this file. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) arch/x86/lib/zimage.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index a79971f052c..3c8081a48bb 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -303,21 +303,17 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot, build_command_line(cmd_line, auto_boot); } -#ifdef CONFIG_INTEL_MID - if (bootproto >= 0x0207) + if (IS_ENABLED(CONFIG_INTEL_MID) && bootproto >= 0x0207) hdr->hardware_subarch = X86_SUBARCH_INTEL_MID; -#endif -#ifdef CONFIG_GENERATE_ACPI_TABLE - setup_base->acpi_rsdp_addr = acpi_get_rsdp_addr(); -#endif + if (IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE)) + setup_base->acpi_rsdp_addr = acpi_get_rsdp_addr(); setup_device_tree(hdr, (const void *)env_get_hex("fdtaddr", 0)); setup_video(&setup_base->screen_info); -#ifdef CONFIG_EFI_STUB - setup_efi_info(&setup_base->efi_info); -#endif + if (IS_ENABLED(CONFIG_EFI_STUB)) + setup_efi_info(&setup_base->efi_info); return 0; } -- 2.28.0.402.g5ffc5be6b7-goog