"Das U-Boot" Source Tree
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

lmb.c: add missing comma in lmb_dump_region()

In the message string " %s[%d]\t[0x%llx-0x%llx], 0x%08llx bytes flags: "
a comma is missing before flags.

To avoid increasing the code size replace '0x%' by '%#'.

Printing the size with leading zeros but not the addresses does not really
make sense. Remove the leading zeros from the size output.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
[trini: Fix test/cmd/bdinfo.c for these changes]
Signed-off-by: Tom Rini <trini@konsulko.com>

authored by

Heinrich Schuchardt and committed by
Tom Rini
dfe7ab35 5430a5f6

+4 -4
+2 -2
lib/lmb.c
··· 506 506 enum lmb_flags flags; 507 507 int i; 508 508 509 - printf(" %s.count = 0x%x\n", name, lmb_rgn_lst->count); 509 + printf(" %s.count = %#x\n", name, lmb_rgn_lst->count); 510 510 511 511 for (i = 0; i < lmb_rgn_lst->count; i++) { 512 512 base = rgn[i].base; ··· 514 514 end = base + size - 1; 515 515 flags = rgn[i].flags; 516 516 517 - printf(" %s[%d]\t[0x%llx-0x%llx], 0x%08llx bytes flags: ", 517 + printf(" %s[%d]\t[%#llx-%#llx], %#llx bytes, flags: ", 518 518 name, i, base, end, size); 519 519 lmb_print_region_flags(flags); 520 520 }
+2 -2
test/cmd/bdinfo.c
··· 107 107 enum lmb_flags flags; 108 108 int i; 109 109 110 - ut_assert_nextline(" %s.count = 0x%hx", name, lmb_rgn_lst->count); 110 + ut_assert_nextline(" %s.count = %#x", name, lmb_rgn_lst->count); 111 111 112 112 for (i = 0; i < lmb_rgn_lst->count; i++) { 113 113 base = rgn[i].base; ··· 119 119 ut_assert_nextlinen(" %s[%d]\t[", name, i); 120 120 continue; 121 121 } 122 - ut_assert_nextlinen(" %s[%d]\t[0x%llx-0x%llx], 0x%08llx bytes flags: ", 122 + ut_assert_nextlinen(" %s[%d]\t[%#llx-%#llx], %#llx bytes, flags: ", 123 123 name, i, base, end, size); 124 124 } 125 125