public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/4] efi_loader: only evaluate EFI_EXIT()'s ret once
@ 2017-07-27 12:04 Rob Clark
  2017-07-27 12:04 ` [U-Boot] [PATCH 2/4] efi_loader: Add an EFI_CALL() macro Rob Clark
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Rob Clark @ 2017-07-27 12:04 UTC (permalink / raw)
  To: u-boot

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 <robdclark@gmail.com>
---
 include/efi_loader.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/efi_loader.h b/include/efi_loader.h
index f384cbbe77..9700a88d69 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -21,8 +21,9 @@
 	} while(0)
 
 #define EFI_EXIT(ret) ({ \
-	debug("EFI: Exit: %s: %u\n", __func__, (u32)((ret) & ~EFI_ERROR_MASK)); \
-	efi_exit_func(ret); \
+	efi_status_t _r = ret; \
+	debug("EFI: Exit: %s: %u\n", __func__, (u32)(_r & ~EFI_ERROR_MASK)); \
+	efi_exit_func(_r); \
 	})
 
 extern struct efi_runtime_services efi_runtime_services;
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-07-28 22:29 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-27 12:04 [U-Boot] [PATCH 1/4] efi_loader: only evaluate EFI_EXIT()'s ret once Rob Clark
2017-07-27 12:04 ` [U-Boot] [PATCH 2/4] efi_loader: Add an EFI_CALL() macro Rob Clark
2017-07-28 22:29   ` [U-Boot] [U-Boot,2/4] " Alexander Graf
2017-07-27 12:04 ` [U-Boot] [PATCH 3/4] efi_loader: add checking for incorrect use of EFI_ENTRY/EXIT Rob Clark
2017-07-28 22:27   ` [U-Boot] [U-Boot, " Alexander Graf
2017-07-27 12:04 ` [U-Boot] [PATCH 4/4] efi_loader: indent entry/exit prints to show nesting level Rob Clark
2017-07-28  7:24   ` Alexander Graf
2017-07-28  9:19     ` Rob Clark
2017-07-28  9:25       ` Alexander Graf
2017-07-28  9:34         ` Rob Clark
2017-07-28  9:36           ` Alexander Graf
2017-07-28 10:11             ` Rob Clark
2017-07-28 10:22               ` Alexander Graf
2017-07-28 11:54                 ` Rob Clark
2017-07-28 22:25   ` [U-Boot] [U-Boot, " Alexander Graf
2017-07-28 22:28 ` [U-Boot] [U-Boot, 1/4] efi_loader: only evaluate EFI_EXIT()'s ret once Alexander Graf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox