[PATCH 1/4] serial: Fix _serial_puts using \n\r instead of \r\n

Tom Rini trini at konsulko.com
Fri Apr 15 14:08:17 CEST 2022


On Mon, Apr 04, 2022 at 02:17:57PM -0400, Sean Anderson wrote:

> A string like "test\n" would be broken up into the following sequence of
> prints by _serial_puts:
> 
> 	puts("test\n")
> 	putc('\r')
> 
> Although functionally this is the same as \r\n, it is not the standard
> sequence and caused tests to fail. Fix this by excluding the '\n' from
> the initial print. The above string will now be broken up like
> 
> 	puts("test")
> 	puts("\r\n")
> 
> Since we may now need to call ops->puts twice (with the associated retry
> logic), break that part of the function off into a helper.
> 
> Fixes: 7a76347189 ("serial: dm: Add support for puts")
> Signed-off-by: Sean Anderson <sean.anderson at seco.com>

Applied to u-boot/master, thanks!

-- 
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/20220415/c145e1ff/attachment.sig>


More information about the U-Boot mailing list