From: Dan Carpenter <dan.carpenter@oracle.com>
To: peter@hurleysoftware.com
Cc: linux-serial@vger.kernel.org
Subject: [bug report] serial: 8250: Extract IIR logic steering from rx dma
Date: Mon, 3 May 2021 17:54:53 +0300 [thread overview]
Message-ID: <YJAOvZpFi9nTSkAX@mwanda> (raw)
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
reply other threads:[~2021-05-03 14:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YJAOvZpFi9nTSkAX@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-serial@vger.kernel.org \
--cc=peter@hurleysoftware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).