Skip to contentSkip to conversation

debug_uart.h: make <debug_uart.h> self-contained

PATCH New Masahiro Yamada 3 participants 3 messages Feb 24, 2020 – Mar 17, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 debug_uart.h: make <debug_uart.h> self-contained

'uint' is not a primitive type. You need to include <linux/types.h> or otherwise change it to (unsigned int).

---

 include/debug_uart.h | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
include/debug_uart.h +10 -10
index cd70ae1a04..4d1c58075c 100644
@@ -88,28 +88,28 @@ void printascii(const char *str);
  *
  * @value:	Value to output
  */
-void printhex2(uint value);
+void printhex2(unsigned int value);
 
 /**
  * printhex4() - Output a 4-digit hex value
  *
  * @value:	Value to output
  */
-void printhex4(uint value);
+void printhex4(unsigned int value);
 
 /**
  * printhex8() - Output a 8-digit hex value
  *
  * @value:	Value to output
  */
-void printhex8(uint value);
+void printhex8(unsigned int value);
 
 /**
  * printdec() - Output a decimalism value
  *
  * @value:	Value to output
  */
-void printdec(uint value);
+void printdec(unsigned int value);
 
 #ifdef CONFIG_DEBUG_UART_ANNOUNCE
 #define _DEBUG_UART_ANNOUNCE	printascii("<debug_uart> ");
@@ -151,34 +151,34 @@ void printdec(uint value);
 			_printch(*str++); \
 	} \
 \
-	static inline void printhex1(uint digit) \
+	static inline void printhex1(unsigned int digit) \
 	{ \
 		digit &= 0xf; \
 		_debug_uart_putc(digit > 9 ? digit - 10 + 'a' : digit + '0'); \
 	} \
 \
-	static inline void printhex(uint value, int digits) \
+	static inline void printhex(unsigned int value, int digits) \
 	{ \
 		while (digits-- > 0) \
 			printhex1(value >> (4 * digits)); \
 	} \
 \
-	void printhex2(uint value) \
+	void printhex2(unsigned int value) \
 	{ \
 		printhex(value, 2); \
 	} \
 \
-	void printhex4(uint value) \
+	void printhex4(unsigned int value) \
 	{ \
 		printhex(value, 4); \
 	} \
 \
-	void printhex8(uint value) \
+	void printhex8(unsigned int value) \
 	{ \
 		printhex(value, 8); \
 	} \
 \
-	void printdec(uint value) \
+	void printdec(unsigned int value) \
 	{ \
 		if (value > 10) { \
 			printdec(value / 10); \
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 debug_uart.h: make <debug_uart.h> self-contained

Hi Masahiro,

Quoted 4 lines · Masahiro Yamada

'uint' is not a primitive type. You need to include <linux/types.h> or otherwise change it to (unsigned int).

Thanks,
- Kever

Quoted 83 lines

---

  include/debug_uart.h | 20 ++++++++++----------
  1 file changed, 10 insertions(+), 10 deletions(-)
include/debug_uart.h +10 -10
index cd70ae1a04..4d1c58075c 100644
@@ -88,28 +88,28 @@ void printascii(const char *str);
   *
   * @value:	Value to output
   */
-void printhex2(uint value);
+void printhex2(unsigned int value);
 
  /**
   * printhex4() - Output a 4-digit hex value
   *
   * @value:	Value to output
   */
-void printhex4(uint value);
+void printhex4(unsigned int value);
 
  /**
   * printhex8() - Output a 8-digit hex value
   *
   * @value:	Value to output
   */
-void printhex8(uint value);
+void printhex8(unsigned int value);
 
  /**
   * printdec() - Output a decimalism value
   *
   * @value:	Value to output
   */
-void printdec(uint value);
+void printdec(unsigned int value);
 
  #ifdef CONFIG_DEBUG_UART_ANNOUNCE
  #define _DEBUG_UART_ANNOUNCE	printascii("<debug_uart> ");
@@ -151,34 +151,34 @@ void printdec(uint value);
  			_printch(*str++); \
  	} \
  \
-	static inline void printhex1(uint digit) \
+	static inline void printhex1(unsigned int digit) \
  	{ \
  		digit &= 0xf; \
  		_debug_uart_putc(digit > 9 ? digit - 10 + 'a' : digit + '0'); \
  	} \
  \
-	static inline void printhex(uint value, int digits) \
+	static inline void printhex(unsigned int value, int digits) \
  	{ \
  		while (digits-- > 0) \
  			printhex1(value >> (4 * digits)); \
  	} \
  \
-	void printhex2(uint value) \
+	void printhex2(unsigned int value) \
  	{ \
  		printhex(value, 2); \
  	} \
  \
-	void printhex4(uint value) \
+	void printhex4(unsigned int value) \
  	{ \
  		printhex(value, 4); \
  	} \
  \
-	void printhex8(uint value) \
+	void printhex8(unsigned int value) \
  	{ \
  		printhex(value, 8); \
  	} \
  \
-	void printdec(uint value) \
+	void printdec(unsigned int value) \
  	{ \
  		if (value > 10) { \
  			printdec(value / 10); \
#2 lore raw

PATCH 1/1 debug_uart.h: make <debug_uart.h> self-contained

In reply to Masahiro Yamada
Quoted 5 lines · Masahiro Yamada

'uint' is not a primitive type. You need to include <linux/types.h> or otherwise change it to (unsigned int).

Applied to u-boot/next, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200317/5788b721/attachment.sig>