There were lot of styleguide errors raised by checkpatch.pl against
drivers/tty/* which I have fixed. There is zero code change apart from
changes related to styleguide. checkpatch.pl returns 0 error for
style guide now.
---
drivers/tty/amiserial.c| 285 ++---
drivers/tty/ehv_bytechan.c | 5 +-
drivers/tty/goldfish.c | 2 +
3 files changed, 142 insertions(+), 150 deletions(-)
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index 1e60dbef6..15917254e 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -12,13 +12,13 @@
* (non hardware specific) changes to serial.c.
*
* The port is registered with the tty driver as minor device 64, and
- * therefore other ports should should only use 65 upwards.
+ * therefore other ports should only use 65 upwards.
*
* Richard Lucock 28/12/99
*
* Copyright (C) 1991, 1992 Linus Torvalds
- * Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997,
- * 1998, 1999 Theodore Ts'o
+ * Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997,
+ * 1998, 1999 Theodore Ts'o
*
*/
@@ -78,8 +78,8 @@ struct serial_state {
int ignore_status_mask;
int timeout;
int quot;
- int IER;/* Interrupt Enable Register */
- int MCR;/* Modem control register */
+ int IER;/* Interrupt Enable Register */
+ int MCR;/* Modem control register */
int x_char; /* xon/xoff character */
};
@@ -116,9 +116,9 @@ static struct serial_state serial_state;
#define SER_CTS (1<<4)
#define SER_DSR (1<<3)
-static __inline__ void rtsdtr_ctrl(int bits)
+static inline void rtsdtr_ctrl(int bits)
{
-ciab.pra = ((bits & (SER_RTS | SER_DTR)) ^ (SER_RTS | SER_DTR)) |
(ciab.pra & ~(SER_RTS | SER_DTR));
+ ciab.pra = ((bits & (SER_RTS | SER_DTR)) ^ (SER_RTS | SER_DTR)) |
(ciab.pra & ~(SER_RTS | SER_DTR));
}
/*
@@ -175,7 +175,7 @@ static void rs_start(struct tty_struct *tty)
static void receive_chars(struct serial_state *info)
{
-int status;
+ int status;
int serdatr;
unsigned char ch, flag;
struct async_icount *icount;
@@ -189,10 +189,10 @@ static void receive_chars(struct serial_state *info)
amiga_custom.intreq = IF_RBF;
mb();
- if((serdatr & 0x1ff) == 0)
- status |= UART_LSR_BI;
- if(serdatr & SDR_OVRUN)
- status |= UART_LSR_OE;
+ if ((serdatr & 0x1ff) == 0)
+ status |= UART_LSR_BI;
+ if (serdatr & SDR_OVRUN)
+ status |= UART_LSR_OE;
ch = serdatr & 0xff;
icount->rx++;
@@ -213,45 +213,44 @@ static void receive_chars(struct serial_state *info)
/*
* For statistics only
*/
- if (status & UART_LSR_BI) {
- status &= ~(UART_LSR_FE | UART_LSR_PE);
- icount->brk++;
- } else if (status & UART_LSR_PE)
- icount->parity++;
- else if (status & UART_LSR_FE)
- icount->frame++;
- if (status & UART_LSR_OE)
- icount->overrun++;
+ if (status & UART_LSR_BI) {
+ status &= ~(UART_LSR_FE | UART_LSR_PE);
+ icount->brk++;
+ } else if (status & UART_LSR_PE)
+ icount->parity++;
+ else if (status & UART_LSR_FE)
+ icount->frame++;
+ if (status & UART_LSR_OE)
+ icount->overrun++;
/*
* Now check to see if character should be
* ignored, and mask off conditions which
* should be ignored.
*/
- if (status & info->ignore_status_mask)
- goto out;
+ if (status & info->ignore_status_mask)
+ goto out;
- status &= info->read_status_mask;
-
- if (status & (UART_LSR_BI)) {
+ status &= info->read_status_mask;
+ if (status & (UART_LSR_BI)) {
#ifdef SERIAL_DEBUG_INTR
- printk("handling break");
+ printk("handling break");
#endif
- flag = TTY_BREAK;
- if (info->tport.flags & ASYNC_SAK)
- do_SAK(info->tport.tty);
- } else if (status & UART_LSR_PE)
- flag = TTY_PARITY;
- else if (status & UART_LSR_FE)
- flag = TTY_FRAME;
- if (status & UART_LSR_OE) {
- /*
-* Overrun is special, since it's
-* reported immediately, and doesn't
-* affect the current character
-*/
-oe = 1;
- }
+ flag = TTY_BREAK;
+ if (info->tport.flags & ASYNC_SAK)
+ do_SAK(info->tport.tty);
+