From: Rob Clark <robdclark@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] efi_loader: only evaluate EFI_EXIT()'s ret once
Date: Wed, 26 Jul 2017 15:16:18 -0400 [thread overview]
Message-ID: <20170726191618.11283-1-robdclark@gmail.com> (raw)
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>
---
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(-)
diff --git a/include/efi_loader.h b/include/efi_loader.h
index b4e9a80034..1522800764 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -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); \
})
/*
--
2.13.0
reply other threads:[~2017-07-26 19:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170726191618.11283-1-robdclark@gmail.com \
--to=robdclark@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox