diff mbox

[U-Boot,08/10] x86: fsp: Always use hex numbers in the hob command output

Message ID 1449831353-933-9-git-send-email-bmeng.cn@gmail.com
State Accepted
Commit 59fb7fbd49b5507204501bd5dce91d6f5ac29814
Delegated to: Bin Meng
Headers show

Commit Message

Bin Meng Dec. 11, 2015, 10:55 a.m. UTC
In the 'fsp hob' command output, decimal numbers and hexadecimal
numbers are used mixedly. Now change to always use hex numbers
to keep consistency.

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

 arch/x86/lib/fsp/cmd_fsp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Simon Glass Dec. 19, 2015, 2:52 a.m. UTC | #1
On 11 December 2015 at 03:55, Bin Meng <bmeng.cn@gmail.com> wrote:
> In the 'fsp hob' command output, decimal numbers and hexadecimal
> numbers are used mixedly. Now change to always use hex numbers
> to keep consistency.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
>  arch/x86/lib/fsp/cmd_fsp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Simon Glass <sjg@chromium.org>
Bin Meng Dec. 21, 2015, 7:50 a.m. UTC | #2
On Sat, Dec 19, 2015 at 10:52 AM, Simon Glass <sjg@chromium.org> wrote:
> On 11 December 2015 at 03:55, Bin Meng <bmeng.cn@gmail.com> wrote:
>> In the 'fsp hob' command output, decimal numbers and hexadecimal
>> numbers are used mixedly. Now change to always use hex numbers
>> to keep consistency.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> ---
>>
>>  arch/x86/lib/fsp/cmd_fsp.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> Acked-by: Simon Glass <sjg@chromium.org>

applied to u-boot-x86/next, thanks!
diff mbox

Patch

diff --git a/arch/x86/lib/fsp/cmd_fsp.c b/arch/x86/lib/fsp/cmd_fsp.c
index 4959edf..2554663 100644
--- a/arch/x86/lib/fsp/cmd_fsp.c
+++ b/arch/x86/lib/fsp/cmd_fsp.c
@@ -69,7 +69,7 @@  static int do_hob(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	printf("---|----------|-----------|------|-");
 	printf("------------------------------------------\n");
 	while (!end_of_hob(hdr)) {
-		printf("%-2d | %08x | ", i, (unsigned int)hdr);
+		printf("%02x | %08x | ", i, (unsigned int)hdr);
 		type = hdr->type;
 		if (type == HOB_TYPE_UNUSED)
 			desc = "*Unused*";
@@ -79,7 +79,7 @@  static int do_hob(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 			desc = hob_type[type];
 		else
 			desc = "*Invalid*";
-		printf("%-9s | %-4d | ", desc, hdr->len);
+		printf("%-9s | %04x | ", desc, hdr->len);
 
 		if (type == HOB_TYPE_MEM_ALLOC || type == HOB_TYPE_RES_DESC ||
 		    type == HOB_TYPE_GUID_EXT) {