* [bug report] serial: 8250: Extract IIR logic steering from rx dma
@ 2021-05-03 14:54 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2021-05-03 14:54 UTC (permalink / raw)
To: peter; +Cc: linux-serial
Hello Peter Hurley,
The patch 33d9b8b23a73: "serial: 8250: Extract IIR logic steering
from rx dma" from Apr 9, 2016, leads to the following static checker
warning:
drivers/tty/serial/8250/8250_omap.c:1093 handle_rx_dma()
warn: signedness bug returning '(-22)'
drivers/tty/serial/8250/8250_omap.c
1084 static bool handle_rx_dma(struct uart_8250_port *up, unsigned int iir)
^^^^
This returns bool
1085 {
1086 switch (iir & 0x3f) {
1087 case UART_IIR_RLSI:
1088 case UART_IIR_RX_TIMEOUT:
1089 case UART_IIR_RDI:
1090 omap_8250_rx_dma_flush(up);
1091 return true;
1092 }
1093 return omap_8250_rx_dma(up);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This returns error codes
1094 }
1095
1096 static unsigned char omap_8250_handle_rx_dma(struct uart_8250_port *up,
1097 u8 iir, unsigned char status)
1098 {
1099 if ((status & (UART_LSR_DR | UART_LSR_BI)) &&
1100 (iir & UART_IIR_RDI)) {
1101 if (handle_rx_dma(up, iir)) {
^^^^^^^^^^^^^^^^^^^^^^
So I guess this is reversed for the omap_8250_rx_dma() case.
1102 status = serial8250_rx_chars(up, status);
1103 omap_8250_rx_dma(up);
1104 }
1105 }
1106
1107 return status;
1108 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-03 14:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-03 14:54 [bug report] serial: 8250: Extract IIR logic steering from rx dma Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.