diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-04-26 15:29:44 +0100 |
---|---|---|
committer | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-04-26 15:29:44 +0100 |
commit | 45849282bfd7543253761cbf7db96151b05e5ed1 (patch) | |
tree | 1e02a8874f487041795f27427d2ee22e8c236c8c /drivers | |
parent | b453257f057b834fdf9f4a6ad6133598b79bd982 (diff) | |
download | linux-stable-45849282bfd7543253761cbf7db96151b05e5ed1.tar.gz linux-stable-45849282bfd7543253761cbf7db96151b05e5ed1.tar.bz2 linux-stable-45849282bfd7543253761cbf7db96151b05e5ed1.zip |
[PATCH] Serial: Ensure error paths are marked with unlikely()
Ensure ARM serial driver error paths are marked with the
unlikely() compiler hint.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/serial/21285.c | 2 | ||||
-rw-r--r-- | drivers/serial/amba-pl010.c | 2 | ||||
-rw-r--r-- | drivers/serial/amba-pl011.c | 2 | ||||
-rw-r--r-- | drivers/serial/clps711x.c | 2 | ||||
-rw-r--r-- | drivers/serial/s3c2410.c | 2 | ||||
-rw-r--r-- | drivers/serial/serial_lh7a40x.c | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c index f8504b0adebc..33fbda79f350 100644 --- a/drivers/serial/21285.c +++ b/drivers/serial/21285.c @@ -110,7 +110,7 @@ static irqreturn_t serial21285_rx_chars(int irq, void *dev_id, struct pt_regs *r port->icount.rx++; rxs = *CSR_RXSTAT | RXSTAT_DUMMY_READ; - if (rxs & RXSTAT_ANYERR) { + if (unlikely(rxs & RXSTAT_ANYERR)) { if (rxs & RXSTAT_PARITY) port->icount.parity++; else if (rxs & RXSTAT_FRAME) diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c index 484f6fb900b5..f2a5e2933c47 100644 --- a/drivers/serial/amba-pl010.c +++ b/drivers/serial/amba-pl010.c @@ -172,7 +172,7 @@ pl010_rx_chars(struct uart_port *port) * out of the main execution path */ rsr = UART_GET_RSR(port) | UART_DUMMY_RSR_RX; - if (rsr & UART01x_RSR_ANY) { + if (unlikely(rsr & UART01x_RSR_ANY)) { if (rsr & UART01x_RSR_BE) { rsr &= ~(UART01x_RSR_FE | UART01x_RSR_PE); port->icount.brk++; diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index ff658a830f34..d5cbef3fe8b6 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c @@ -137,7 +137,7 @@ pl011_rx_chars(struct uart_amba_port *uap) * out of the main execution path */ rsr = readw(uap->port.membase + UART01x_RSR) | UART_DUMMY_RSR_RX; - if (rsr & UART01x_RSR_ANY) { + if (unlikely(rsr & UART01x_RSR_ANY)) { if (rsr & UART01x_RSR_BE) { rsr &= ~(UART01x_RSR_FE | UART01x_RSR_PE); uap->port.icount.brk++; diff --git a/drivers/serial/clps711x.c b/drivers/serial/clps711x.c index 16592fae47f3..e145e19b3fb5 100644 --- a/drivers/serial/clps711x.c +++ b/drivers/serial/clps711x.c @@ -116,7 +116,7 @@ static irqreturn_t clps711xuart_int_rx(int irq, void *dev_id, struct pt_regs *re * Note that the error handling code is * out of the main execution path */ - if (ch & UART_ANY_ERR) + if (unlikely(ch & UART_ANY_ERR)) goto handle_error; if (uart_handle_sysrq_char(port, ch, regs)) diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c index bd6782aeb831..435750d40a47 100644 --- a/drivers/serial/s3c2410.c +++ b/drivers/serial/s3c2410.c @@ -364,7 +364,7 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id, struct pt_regs *regs) flag = TTY_NORMAL; port->icount.rx++; - if (uerstat & S3C2410_UERSTAT_ANY) { + if (unlikely(uerstat & S3C2410_UERSTAT_ANY)) { dbg("rxerr: port ch=0x%02x, rxs=0x%08x\n", ch, uerstat); diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c index 4ce3a41f1611..85cfa08d3bad 100644 --- a/drivers/serial/serial_lh7a40x.c +++ b/drivers/serial/serial_lh7a40x.c @@ -162,7 +162,7 @@ lh7a40xuart_rx_chars (struct uart_port* port) flag = TTY_NORMAL; ++port->icount.rx; - if (data & RxError) { /* Quick check, short-circuit */ + if (unlikely(data & RxError)) { /* Quick check, short-circuit */ if (data & RxBreak) { data &= ~(RxFramingError | RxParityError); ++port->icount.brk; |