mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-05 04:36:13 +02:00
efi_loader: avoid #ifdef in efi_setup.c
We prefer `if` over `#ifdef` in our code. Eliminate #ifdef statements in efi_setup.c. Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
82c98b9464
commit
3d23dedd92
@ -86,7 +86,6 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_EFI_SECURE_BOOT
|
||||
/**
|
||||
* efi_init_secure_boot - initialize secure boot state
|
||||
*
|
||||
@ -112,12 +111,6 @@ static efi_status_t efi_init_secure_boot(void)
|
||||
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
static efi_status_t efi_init_secure_boot(void)
|
||||
{
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
#endif /* CONFIG_EFI_SECURE_BOOT */
|
||||
|
||||
/**
|
||||
* efi_init_capsule - initialize capsule update state
|
||||
@ -302,9 +295,11 @@ efi_status_t efi_init_obj_list(void)
|
||||
}
|
||||
|
||||
/* Secure boot */
|
||||
ret = efi_init_secure_boot();
|
||||
if (ret != EFI_SUCCESS)
|
||||
goto out;
|
||||
if (IS_ENABLED(CONFIG_EFI_SECURE_BOOT)) {
|
||||
ret = efi_init_secure_boot();
|
||||
if (ret != EFI_SUCCESS)
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Indicate supported runtime services */
|
||||
ret = efi_init_runtime_supported();
|
||||
@ -322,11 +317,11 @@ efi_status_t efi_init_obj_list(void)
|
||||
if (ret != EFI_SUCCESS)
|
||||
goto out;
|
||||
}
|
||||
#ifdef CONFIG_NETDEVICES
|
||||
ret = efi_net_register();
|
||||
if (ret != EFI_SUCCESS)
|
||||
goto out;
|
||||
#endif
|
||||
if (IS_ENABLED(CONFIG_NETDEVICES)) {
|
||||
ret = efi_net_register();
|
||||
if (ret != EFI_SUCCESS)
|
||||
goto out;
|
||||
}
|
||||
if (IS_ENABLED(CONFIG_ACPI)) {
|
||||
ret = efi_acpi_register();
|
||||
if (ret != EFI_SUCCESS)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user