[Skiboot] [PATCH v2 2/2] hw/lpc-uart.c: Handle read failure case in UART communication

Aditya Gupta adityag at linux.ibm.com
Fri Apr 11 19:41:45 AEST 2025


On 25/04/10 06:13AM, ABHISHEK SINGH TOMAR wrote:
> From: Abhishek Singh Tomar <abhishek at linux.ibm.com>
> <...snip...>
>
> -	if (uart_read(REG_LSR) & LSR_THRE) {
> +	reg = uart_read(REG_LSR);
> +	if (reg & LSR_THRE && reg != 0xff) {

Nitpick: Maybe we can have: ((reg & LSR_THRE) && (reg != 0xff)). That
seems more clear at what is being compared.

Thanks,
- Aditya G



More information about the Skiboot mailing list