diff mbox series

[U-Boot,10/18] x86: efi: payload: Minor clean up on error message output

Message ID 1528637118-32739-11-git-send-email-bmeng.cn@gmail.com
State Accepted
Commit 558f3ed9c8d54c7b04db391d7585c7bdbdb3a369
Delegated to: Bin Meng
Headers show
Series x86: efi: Fixes and enhancements to application and payload support | expand

Commit Message

Bin Meng June 10, 2018, 1:25 p.m. UTC
If GetMemoryMap() fails, we really want to know EFI_BITS_PER_LONG
instead of BITS_PER_LONG. A space and LF are added in places where
error message is output to improve readability.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 lib/efi/efi_stub.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Simon Glass June 11, 2018, 2:54 p.m. UTC | #1
On 10 June 2018 at 05:25, Bin Meng <bmeng.cn@gmail.com> wrote:
> If GetMemoryMap() fails, we really want to know EFI_BITS_PER_LONG
> instead of BITS_PER_LONG. A space and LF are added in places where
> error message is output to improve readability.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
>  lib/efi/efi_stub.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Bin Meng June 12, 2018, 1:07 p.m. UTC | #2
On Mon, Jun 11, 2018 at 10:54 PM, Simon Glass <sjg@chromium.org> wrote:
> On 10 June 2018 at 05:25, Bin Meng <bmeng.cn@gmail.com> wrote:
>> If GetMemoryMap() fails, we really want to know EFI_BITS_PER_LONG
>> instead of BITS_PER_LONG. A space and LF are added in places where
>> error message is output to improve readability.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> ---
>>
>>  lib/efi/efi_stub.c | 8 +++++---
>>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

applied to u-boot-x86, thanks!
diff mbox series

Patch

diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c
index 3138739..09023a2 100644
--- a/lib/efi/efi_stub.c
+++ b/lib/efi/efi_stub.c
@@ -281,7 +281,8 @@  efi_status_t efi_main(efi_handle_t image, struct efi_system_table *sys_table)
 
 	ret = efi_init(priv, "Payload", image, sys_table);
 	if (ret) {
-		printhex2(ret); puts(" efi_init() failed\n");
+		printhex2(ret);
+		puts(" efi_init() failed\n");
 		return ret;
 	}
 	global_priv = priv;
@@ -294,7 +295,8 @@  efi_status_t efi_main(efi_handle_t image, struct efi_system_table *sys_table)
 	size = 0;
 	ret = boot->get_memory_map(&size, NULL, &key, &desc_size, &version);
 	if (ret != EFI_BUFFER_TOO_SMALL) {
-		printhex2(BITS_PER_LONG);
+		printhex2(EFI_BITS_PER_LONG);
+		putc(' ');
 		printhex2(ret);
 		puts(" No memory map\n");
 		return ret;
@@ -303,7 +305,7 @@  efi_status_t efi_main(efi_handle_t image, struct efi_system_table *sys_table)
 	desc = efi_malloc(priv, size, &ret);
 	if (!desc) {
 		printhex2(ret);
-		puts(" No memory for memory descriptor: ");
+		puts(" No memory for memory descriptor\n");
 		return ret;
 	}
 	ret = setup_info_table(priv, size + 128);