efi_loader: only evaluate EFI_EXIT()'s ret once
PATCH 1/1 efi_loader: only evaluate EFI_EXIT()'s ret once
There are a couple spots doing things like:
return EFI_EXIT(some_fxn(...));
which I handn't noticed before. With addition of printing return value in the EFI_EXIT() macro, now the fxn call was getting evaluated twice. Which we didn't really want.
Signed-off-by Rob Clark <[email protected]>
---
I can rebase this one to come before the other EFI_ENTER/EFI_EXIT patches that I sent earlier today if needed.
include/efi_loader.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
include/efi_loader.h +3 -2
@@ -32,10 +32,11 @@ const char *__efi_nesting_level(int delta);* Exit the u-boot world back to UEFI: */ #define EFI_EXIT (ret) ({ \ + efi_status_t _r = ret; \ debug("%sEFI: Exit: %s: %u\n", __efi_nesting_level(-1), \ - __func__, (u32)((ret) & ~EFI_ERROR_MASK)); \ + __func__, (u32)(_r & ~EFI_ERROR_MASK)); \ assert(__efi_check_nesting(-1)); \ - efi_exit_func(ret); \ + efi_exit_func(_r); \ })/*
Signature · 1 line
2.13.0