[PATCH 21/78] debug_ll: support 64bit longs
Sascha Hauer
s.hauer at pengutronix.de
Fri Mar 16 05:52:57 PDT 2018
puthex_ll outputs an unsigned long, so print all digits in case unsigned
long is 64bit.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
include/debug_ll.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/debug_ll.h b/include/debug_ll.h
index b0eb7cd7d9..5047516399 100644
--- a/include/debug_ll.h
+++ b/include/debug_ll.h
@@ -42,7 +42,7 @@ static inline void puthex_ll(unsigned long value)
{
int i; unsigned char ch;
- for (i = 8; i--; ) {
+ for (i = sizeof(unsigned long) * 2; i--; ) {
ch = ((value >> (i * 4)) & 0xf);
ch += (ch >= 10) ? 'a' - 10 : '0';
putc_ll(ch);
--
2.16.1
More information about the barebox
mailing list