Commit 6bacc73621066a1fa9c1ac3d1578980b8a6d3b27

Authored by tim.chick
Committed by Tom Rini
1 parent 33f0086cb7

debug_uart: Try not to use stack in printch

Spam detection software, running on the system "lists.denx.de",
has identified this incoming email as possible spam.  The original
message has been attached to this so you can view it or label
similar future email.  If you have any questions, see
@@CONTACT_ADDRESS@@ for details.

Content preview:  Previous change to create _printch causes the stack to be
  used, breaking printch before stack is available. Inline _printch to prevent
   this happening. Signed-off-by: Tim Chick <tim.chick@mediatek.com> --- [...]

Content analysis details:   (6.3 points, 5.0 required)

 pts rule name              description
---- ---------------------- --------------------------------------------------
 0.7 RCVD_IN_XBL            RBL: Received via a relay in Spamhaus XBL
                            [188.29.165.105 listed in zen.spamhaus.org]
 3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
 1.6 RCVD_IN_BRBL_LASTEXT   RBL: No description available.
                            [188.29.165.105 listed in bb.barracudacentral.org]
 0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                            dynamic-looking rDNS
Previous change to create _printch causes the stack to be used,
breaking printch before stack is available. Inline _printch to
prevent this happening.

Signed-off-by: Tim Chick <tim.chick@mediatek.com>

Showing 1 changed file with 8 additions and 2 deletions Side-by-side Diff

include/debug_uart.h
... ... @@ -115,17 +115,23 @@
115 115 * Now define some functions - this should be inserted into the serial driver
116 116 */
117 117 #define DEBUG_UART_FUNCS \
118   - void printch(int ch) \
  118 +\
  119 + static inline void _printch(int ch) \
119 120 { \
120 121 if (ch == '\n') \
121 122 _debug_uart_putc('\r'); \
122 123 _debug_uart_putc(ch); \
123 124 } \
124 125 \
  126 + void printch(int ch) \
  127 + { \
  128 + _printch(ch); \
  129 + } \
  130 +\
125 131 void printascii(const char *str) \
126 132 { \
127 133 while (*str) \
128   - printch(*str++); \
  134 + _printch(*str++); \
129 135 } \
130 136 \
131 137 static inline void printhex1(uint digit) \