common: fdt_support: print hexadecimal numbers in debug
PATCH v2 1/1 common: fdt_support: print hexadecimal numbers in debug
We usually deal with hexadecimal addresses and sizes in device-tree. Its much easier if debug logs print hexadecimal values too.
--- common/fdt_support.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
common/fdt_support.c +2 -2
@@ -1025,7 +1025,7 @@ static u64 of_bus_default_map(fdt32_t *addr, const fdt32_t *range, s =fdt_read_number (range + na + pna, ns); da =fdt_read_number (addr, na); -debug ("OF: default map, cp=%llu, s=%llu, da=%llu\n" , cp, s, da); +debug ("OF: default map, cp=%llx, s=%llx, da=%llx\n" , cp, s, da);if (da < cp || da >= (cp + s))return OF_BAD_ADDR ;
@@ -1080,7 +1080,7 @@ static u64 of_bus_isa_map(fdt32_t *addr, const fdt32_t *range, s =fdt_read_number (range + na + pna, ns); da =fdt_read_number (addr +1 , na -1 ); -debug ("OF: ISA map, cp=%llu, s=%llu, da=%llu\n" , cp, s, da); +debug ("OF: ISA map, cp=%llx, s=%llx, da=%llx\n" , cp, s, da);if (da < cp || da >= (cp + s))return OF_BAD_ADDR ;
Signature · 1 line
2.16.2
PATCH v2 1/1 common: fdt_support: print hexadecimal numbers in debug
Quoted 6 lines · Sekhar Nori
We usually deal with hexadecimal addresses and sizes in device-tree. Its much easier if debug logs print hexadecimal values too.
Reviewed-by Simon Glass <[email protected]>Signed-off-by Sekhar Nori <[email protected]>
Thanks and regards,
Lokesh
Quoted 27 lines
--- common/fdt_support.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)common/fdt_support.c +2
-2@@ -1025,7 +1025,7 @@ static u64 of_bus_default_map(fdt32_t *addr, const fdt32_t *range, s =fdt_read_number (range + na + pna, ns); da =fdt_read_number (addr, na); -debug ("OF: default map, cp=%llu, s=%llu, da=%llu\n" , cp, s, da); +debug ("OF: default map, cp=%llx, s=%llx, da=%llx\n" , cp, s, da);if (da < cp || da >= (cp + s))return OF_BAD_ADDR ;@@ -1080,7 +1080,7 @@ static u64 of_bus_isa_map(fdt32_t *addr, const fdt32_t *range, s =fdt_read_number (range + na + pna, ns); da =fdt_read_number (addr +1 , na -1 ); -debug ("OF: ISA map, cp=%llu, s=%llu, da=%llu\n" , cp, s, da); +debug ("OF: ISA map, cp=%llx, s=%llx, da=%llx\n" , cp, s, da);if (da < cp || da >= (cp + s))return OF_BAD_ADDR ;
PATCH v2 1/1 common: fdt_support: print hexadecimal numbers in debug
In reply to Sekhar NoriQuoted 6 lines · Sekhar Nori
We usually deal with hexadecimal addresses and sizes in device-tree. Its much easier if debug logs print hexadecimal values too.
Reviewed-by Simon Glass <[email protected]>Signed-off-by Sekhar Nori <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181206/ffce804b/attachment.sig>
PATCH v2 1/1 common: fdt_support: print hexadecimal numbers in debug
Quoted 6 lines · Sekhar Nori
We usually deal with hexadecimal addresses and sizes in device-tree. Its much easier if debug logs print hexadecimal values too.
Reviewed-by Simon Glass <[email protected]>Signed-off-by Sekhar Nori <[email protected]>
Signature · 3 lines
Tom Applied to u-boot-dm/master, thanks!