Commit a86f50ed authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman

serial: 8250: Eliminate needless local in irq handlers

dma_err is not used other than for boolean evaluation;
substitute the actual operation directly.
Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ceeafb8e
...@@ -1033,7 +1033,6 @@ static int omap_8250_dma_handle_irq(struct uart_port *port) ...@@ -1033,7 +1033,6 @@ static int omap_8250_dma_handle_irq(struct uart_port *port)
unsigned char status; unsigned char status;
unsigned long flags; unsigned long flags;
u8 iir; u8 iir;
int dma_err = 0;
serial8250_rpm_get(up); serial8250_rpm_get(up);
...@@ -1048,9 +1047,7 @@ static int omap_8250_dma_handle_irq(struct uart_port *port) ...@@ -1048,9 +1047,7 @@ static int omap_8250_dma_handle_irq(struct uart_port *port)
status = serial_port_in(port, UART_LSR); status = serial_port_in(port, UART_LSR);
if (status & (UART_LSR_DR | UART_LSR_BI)) { if (status & (UART_LSR_DR | UART_LSR_BI)) {
if (omap_8250_rx_dma(up, iir)) {
dma_err = omap_8250_rx_dma(up, iir);
if (dma_err) {
status = serial8250_rx_chars(up, status); status = serial8250_rx_chars(up, status);
omap_8250_rx_dma(up, 0); omap_8250_rx_dma(up, 0);
} }
...@@ -1066,8 +1063,7 @@ static int omap_8250_dma_handle_irq(struct uart_port *port) ...@@ -1066,8 +1063,7 @@ static int omap_8250_dma_handle_irq(struct uart_port *port)
* try again due to an earlier failer which * try again due to an earlier failer which
* might have been resolved by now. * might have been resolved by now.
*/ */
dma_err = omap_8250_tx_dma(up); if (omap_8250_tx_dma(up))
if (dma_err)
serial8250_tx_chars(up); serial8250_tx_chars(up);
} }
} }
......
...@@ -1796,7 +1796,6 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir) ...@@ -1796,7 +1796,6 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir)
unsigned char status; unsigned char status;
unsigned long flags; unsigned long flags;
struct uart_8250_port *up = up_to_u8250p(port); struct uart_8250_port *up = up_to_u8250p(port);
int dma_err = 0;
if (iir & UART_IIR_NO_INT) if (iir & UART_IIR_NO_INT)
return 0; return 0;
...@@ -1808,10 +1807,7 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir) ...@@ -1808,10 +1807,7 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir)
DEBUG_INTR("status = %x...", status); DEBUG_INTR("status = %x...", status);
if (status & (UART_LSR_DR | UART_LSR_BI)) { if (status & (UART_LSR_DR | UART_LSR_BI)) {
if (up->dma) if (!up->dma || up->dma->rx_dma(up, iir))
dma_err = up->dma->rx_dma(up, iir);
if (!up->dma || dma_err)
status = serial8250_rx_chars(up, status); status = serial8250_rx_chars(up, status);
} }
serial8250_modem_status(up); serial8250_modem_status(up);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment