From: "Frederik Völkel" <frederik.voelkel@fau.de>
To: gregkh@linuxfoundation.org, jslaby@suse.com
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
lukas.braun@fau.de, linux-kernel@i4.cs.fau.de,
"Frederik Völkel" <frederik.voelkel@fau.de>
Subject: [PATCH v2 2/4] drivers: tty: 68328serial.c: remove trailing whitespaces
Date: Wed, 16 Dec 2015 16:16:59 +0100 [thread overview]
Message-ID: <1450279021-17154-3-git-send-email-frederik.voelkel@fau.de> (raw)
In-Reply-To: <1450279021-17154-1-git-send-email-frederik.voelkel@fau.de>
This patch removes trailing whitespaces reported by checkpatch.
Signed-off-by: Frederik Völkel <frederik.voelkel@fau.de>
Signed-off-by: Lukas Braun <lukas.braun@fau.de>
---
drivers/tty/serial/68328serial.c | 98 ++++++++++++++++++++--------------------
1 file changed, 49 insertions(+), 49 deletions(-)
diff --git a/drivers/tty/serial/68328serial.c b/drivers/tty/serial/68328serial.c
index 183f6d9..f7f9b7e 100644
--- a/drivers/tty/serial/68328serial.c
+++ b/drivers/tty/serial/68328serial.c
@@ -217,7 +217,7 @@ static void rs_stop(struct tty_struct *tty)
if (serial_paranoia_check(info, tty->name, "rs_stop"))
return;
-
+
local_irq_save(flags);
uart->ustcnt &= ~USTCNT_TXEN;
local_irq_restore(flags);
@@ -246,10 +246,10 @@ static void rs_start(struct tty_struct *tty)
struct m68k_serial *info = (struct m68k_serial *)tty->driver_data;
m68328_uart *uart = &uart_addr[info->line];
unsigned long flags;
-
+
if (serial_paranoia_check(info, tty->name, "rs_start"))
return;
-
+
local_irq_save(flags);
if (info->xmit_cnt && info->xmit_buf && !(uart->ustcnt & USTCNT_TXEN)) {
#ifdef USE_INTS
@@ -267,13 +267,13 @@ static void receive_chars(struct m68k_serial *info, unsigned short rx)
unsigned char ch, flag;
/*
- * This do { } while() loop will get ALL chars out of Rx FIFO
+ * This do { } while() loop will get ALL chars out of Rx FIFO
*/
#ifndef CONFIG_XCOPILOT_BUGS
do {
-#endif
+#endif
ch = GET_FIELD(rx, URX_RXDATA);
-
+
if (info->is_cons) {
if (URX_BREAK & rx) { /* whee, break received */
return;
@@ -374,7 +374,7 @@ static int startup(struct m68k_serial *info, struct tty_struct *tty)
{
m68328_uart *uart = &uart_addr[info->line];
unsigned long flags;
-
+
if (info->tport.flags & ASYNC_INITIALIZED)
return 0;
@@ -399,7 +399,7 @@ static int startup(struct m68k_serial *info, struct tty_struct *tty)
* Finally, enable sequencing and interrupts
*/
#ifdef USE_INTS
- uart->ustcnt = USTCNT_UEN | USTCNT_RXEN |
+ uart->ustcnt = USTCNT_UEN | USTCNT_RXEN |
USTCNT_RX_INTR_MASK | USTCNT_TX_INTR_MASK;
#else
uart->ustcnt = USTCNT_UEN | USTCNT_RXEN | USTCNT_RX_INTR_MASK;
@@ -434,7 +434,7 @@ static void shutdown(struct m68k_serial *info, struct tty_struct *tty)
return;
local_irq_save(flags);
-
+
if (info->xmit_buf) {
free_page((unsigned long) info->xmit_buf);
info->xmit_buf = 0;
@@ -442,7 +442,7 @@ static void shutdown(struct m68k_serial *info, struct tty_struct *tty)
if (tty)
set_bit(TTY_IO_ERROR, &tty->flags);
-
+
info->tport.flags &= ~ASYNC_INITIALIZED;
local_irq_restore(flags);
}
@@ -491,7 +491,7 @@ struct {
{1, 0x26}, /* 38400 */
{0, 0x26}, /* 57600 */
{1, 0x38}, /* 115200 */
-};
+};
#endif
/* rate = 1036800 / ((65 - prescale) * (1<<divider)) */
@@ -520,14 +520,14 @@ static void change_speed(struct m68k_serial *info, struct tty_struct *tty)
i = (i & ~CBAUDEX) + B38400;
}
- uart->ubaud = PUT_FIELD(UBAUD_DIVIDE, hw_baud_table[i].divisor) |
+ uart->ubaud = PUT_FIELD(UBAUD_DIVIDE, hw_baud_table[i].divisor) |
PUT_FIELD(UBAUD_PRESCALER, hw_baud_table[i].prescale);
ustcnt &= ~(USTCNT_PARITYEN | USTCNT_ODD_EVEN | USTCNT_STOP | USTCNT_8_7);
-
+
if ((cflag & CSIZE) == CS8)
ustcnt |= USTCNT_8_7;
-
+
if (cflag & CSTOPB)
ustcnt |= USTCNT_STOP;
@@ -535,7 +535,7 @@ static void change_speed(struct m68k_serial *info, struct tty_struct *tty)
ustcnt |= USTCNT_PARITYEN;
if (cflag & PARODD)
ustcnt |= USTCNT_ODD_EVEN;
-
+
#ifdef CONFIG_SERIAL_68328_RTS_CTS
if (cflag & CRTSCTS) {
uart->utx.w &= ~UTX_NOCTS;
@@ -545,7 +545,7 @@ static void change_speed(struct m68k_serial *info, struct tty_struct *tty)
#endif
ustcnt |= USTCNT_TXEN;
-
+
uart->ustcnt = ustcnt;
return;
}
@@ -590,7 +590,7 @@ static void rs_fair_output(void)
void console_print_68328(const char *p)
{
char c;
-
+
while ((c = *(p++)) != 0) {
if (c == '\n')
rs_put_char('\r');
@@ -611,7 +611,7 @@ static void rs_set_ldisc(struct tty_struct *tty)
return;
info->is_cons = (tty->termios.c_line == N_TTY);
-
+
printk("ttyS%d console mode %s\n", info->line, info->is_cons ? "on" : "off");
}
@@ -677,7 +677,7 @@ static int rs_write(struct tty_struct *tty,
local_save_flags(flags);
while (1) {
- local_irq_disable();
+ local_irq_disable();
c = min_t(int, count, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
SERIAL_XMIT_SIZE - info->xmit_head));
local_irq_restore(flags);
@@ -698,7 +698,7 @@ static int rs_write(struct tty_struct *tty,
if (info->xmit_cnt && !tty->stopped) {
/* Enable transmitter */
- local_irq_disable();
+ local_irq_disable();
#ifndef USE_INTS
while (info->xmit_cnt) {
#endif
@@ -728,7 +728,7 @@ static int rs_write_room(struct tty_struct *tty)
{
struct m68k_serial *info = (struct m68k_serial *)tty->driver_data;
int ret;
-
+
if (serial_paranoia_check(info, tty->name, "rs_write_room"))
return 0;
ret = SERIAL_XMIT_SIZE - info->xmit_cnt - 1;
@@ -740,7 +740,7 @@ static int rs_write_room(struct tty_struct *tty)
static int rs_chars_in_buffer(struct tty_struct *tty)
{
struct m68k_serial *info = (struct m68k_serial *)tty->driver_data;
-
+
if (serial_paranoia_check(info, tty->name, "rs_chars_in_buffer"))
return 0;
return info->xmit_cnt;
@@ -750,7 +750,7 @@ static void rs_flush_buffer(struct tty_struct *tty)
{
struct m68k_serial *info = (struct m68k_serial *)tty->driver_data;
unsigned long flags;
-
+
if (serial_paranoia_check(info, tty->name, "rs_flush_buffer"))
return;
local_irq_save(flags);
@@ -762,7 +762,7 @@ static void rs_flush_buffer(struct tty_struct *tty)
/*
* ------------------------------------------------------------
* rs_throttle()
- *
+ *
* This routine is called by the upper-layer tty layer to signal that
* incoming characters should be throttled.
* ------------------------------------------------------------
@@ -773,7 +773,7 @@ static void rs_throttle(struct tty_struct *tty)
if (serial_paranoia_check(info, tty->name, "rs_throttle"))
return;
-
+
if (I_IXOFF(tty))
info->x_char = STOP_CHAR(tty);
@@ -786,7 +786,7 @@ static void rs_unthrottle(struct tty_struct *tty)
if (serial_paranoia_check(info, tty->name, "rs_unthrottle"))
return;
-
+
if (I_IXOFF(tty)) {
if (info->x_char)
info->x_char = 0;
@@ -807,7 +807,7 @@ static int get_serial_info(struct m68k_serial *info,
struct serial_struct *retinfo)
{
struct serial_struct tmp;
-
+
if (!retinfo)
return -EFAULT;
memset(&tmp, 0, sizeof(tmp));
@@ -832,7 +832,7 @@ static int set_serial_info(struct m68k_serial *info, struct tty_struct *tty,
struct tty_port *port = &info->tport;
struct serial_struct new_serial;
struct m68k_serial old_info;
- int retval = 0;
+ int retval = 0;
if (!new_info)
return -EFAULT;
@@ -881,7 +881,7 @@ check_and_exit:
* release the bus after transmitting. This must be done when
* the transmit shift register is empty, not be done when the
* transmit holding register is empty. This functionality
- * allows an RS485 driver to be written in user space.
+ * allows an RS485 driver to be written in user space.
*/
static int get_lsr_info(struct m68k_serial *info, unsigned int *value)
{
@@ -911,11 +911,11 @@ static void send_break(struct m68k_serial *info, unsigned int duration)
if (!info->port)
return;
local_irq_save(flags);
-#ifdef USE_INTS
+#ifdef USE_INTS
uart->utx.w |= UTX_SEND_BREAK;
msleep_interruptible(duration);
uart->utx.w &= ~UTX_SEND_BREAK;
-#endif
+#endif
local_irq_restore(flags);
}
@@ -934,7 +934,7 @@ static int rs_ioctl(struct tty_struct *tty,
if (tty->flags & (1 << TTY_IO_ERROR))
return -EIO;
}
-
+
switch (cmd) {
case TCSBRK: /* SVID version: non-zero arg --> no break */
retval = tty_check_change(tty);
@@ -979,13 +979,13 @@ static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
if ((old_termios->c_cflag & CRTSCTS) &&
!(tty->termios.c_cflag & CRTSCTS))
rs_start(tty);
-
+
}
/*
* ------------------------------------------------------------
* rs_close()
- *
+ *
* This routine is called when the serial port gets closed. First, we
* wait for the last remaining data to be sent. Then, we unlink its
* S structure from the interrupt chain if necessary, and we free
@@ -1001,14 +1001,14 @@ static void rs_close(struct tty_struct *tty, struct file *filp)
if (serial_paranoia_check(info, tty->name, "rs_close"))
return;
-
+
local_irq_save(flags);
-
+
if (tty_hung_up_p(filp)) {
local_irq_restore(flags);
return;
}
-
+
if ((tty->count == 1) && (port->count != 1)) {
/*
* Uh, oh. tty->count is 1, which means that the tty
@@ -1032,7 +1032,7 @@ static void rs_close(struct tty_struct *tty, struct file *filp)
}
port->flags |= ASYNC_CLOSING;
/*
- * Now we wait for the transmit buffer to clear; and we notify
+ * Now we wait for the transmit buffer to clear; and we notify
* the line discipline to only process XON/XOFF characters.
*/
tty->closing = 1;
@@ -1050,11 +1050,11 @@ static void rs_close(struct tty_struct *tty, struct file *filp)
shutdown(info, tty);
rs_flush_buffer(tty);
-
+
tty_ldisc_flush(tty);
tty->closing = 0;
tty_port_tty_set(&info->tport, NULL);
-#warning "This is not and has never been valid so fix it"
+#warning "This is not and has never been valid so fix it"
#if 0
if (tty->ldisc.num != ldiscs[N_TTY].num) {
if (tty->ldisc.close)
@@ -1064,7 +1064,7 @@ static void rs_close(struct tty_struct *tty, struct file *filp)
if (tty->ldisc.open)
(tty->ldisc.open)(tty);
}
-#endif
+#endif
if (port->blocked_open) {
if (port->close_delay)
msleep_interruptible(jiffies_to_msecs(port->close_delay));
@@ -1080,10 +1080,10 @@ static void rs_close(struct tty_struct *tty, struct file *filp)
void rs_hangup(struct tty_struct *tty)
{
struct m68k_serial *info = (struct m68k_serial *)tty->driver_data;
-
+
if (serial_paranoia_check(info, tty->name, "rs_hangup"))
return;
-
+
rs_flush_buffer(tty);
shutdown(info, tty);
info->tport.count = 0;
@@ -1166,14 +1166,14 @@ rs68328_init(void)
/* Initialize the tty_driver structure */
/* SPARC: Not all of this is exactly right for us. */
-
+
serial_driver->name = "ttyS";
serial_driver->major = TTY_MAJOR;
serial_driver->minor_start = 64;
serial_driver->type = TTY_DRIVER_TYPE_SERIAL;
serial_driver->subtype = SERIAL_TYPE_NORMAL;
serial_driver->init_termios = tty_std_termios;
- serial_driver->init_termios.c_cflag =
+ serial_driver->init_termios.c_cflag =
m68328_console_cbaud | CS8 | CREAD | HUPCL | CLOCAL;
serial_driver->flags = TTY_DRIVER_REAL_RAW;
tty_set_operations(serial_driver, &rs_ops);
@@ -1192,11 +1192,11 @@ rs68328_init(void)
info->x_char = 0;
info->line = i;
info->is_cons = 1; /* Means shortcuts work */
-
- printk("%s%d at 0x%08x (irq = %d)", serial_driver->name, info->line,
+
+ printk("%s%d at 0x%08x (irq = %d)", serial_driver->name, info->line,
info->port, info->irq);
printk(" is a builtin MC68328 UART\n");
-
+
#ifdef CONFIG_M68VZ328
if (i > 0)
PJSEL &= 0xCF; /* PSW enable second port output */
@@ -1244,7 +1244,7 @@ again:
goto again;
}
- UBAUD = PUT_FIELD(UBAUD_DIVIDE, hw_baud_table[i].divisor) |
+ UBAUD = PUT_FIELD(UBAUD_DIVIDE, hw_baud_table[i].divisor) |
PUT_FIELD(UBAUD_PRESCALER, hw_baud_table[i].prescale);
ustcnt &= ~(USTCNT_PARITYEN | USTCNT_ODD_EVEN | USTCNT_STOP | USTCNT_8_7);
ustcnt |= USTCNT_8_7;
--
1.9.1
next prev parent reply other threads:[~2015-12-16 15:26 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 10:36 [PATCH 0/9] Fix checkpatch errors Frederik Völkel
2015-12-11 10:36 ` [PATCH 1/9] drivers: tty: 68328serial.c: Add missing spaces(checkpatch) Frederik Völkel
2015-12-11 10:36 ` [PATCH 2/9] drivers: tty: 68328serial.c: remove unnecessary spaces(checkpatch) Frederik Völkel
2015-12-11 10:36 ` [PATCH 3/9] drivers: tty: 68328serial.c: Do not initialize statics to 0 Frederik Völkel
2015-12-11 10:36 ` [PATCH 4/9] drivers: tty: 68328serial.c: Fix "foo * bar" should be "foo *bar" Frederik Völkel
2015-12-11 10:36 ` [PATCH 5/9] drivers: tty: 68328serial.c: Remove parentheses after return Frederik Völkel
2015-12-11 10:36 ` [PATCH 6/9] drivers: tty: 68328serial.c: Use tabs for indentation Frederik Völkel
2015-12-13 7:08 ` Greg KH
2015-12-13 7:09 ` Greg KH
2015-12-11 10:36 ` [PATCH 7/9] drivers: tty: 68328serial.c: remove trailing whitespaces Frederik Völkel
2015-12-11 10:36 ` [PATCH 8/9] drivers: tty: 68328serial.c: Use use same indentation for switch/case Frederik Völkel
2015-12-11 10:36 ` [PATCH 9/9] drivers: tty: 68328serial.c: Move trailing statements to next line Frederik Völkel
2015-12-13 7:06 ` [PATCH 0/9] Fix checkpatch errors Greg KH
2015-12-13 17:44 ` Frederik
2015-12-13 18:15 ` Nicolai Stange
2015-12-13 18:26 ` Frederik
2015-12-13 20:31 ` Ken Moffat
2015-12-16 15:16 ` [PATCH v2 0/4] " Frederik Völkel
2015-12-16 15:16 ` [PATCH v2 1/4] drivers: tty: 68328serial.c: Use tabs for indentation Frederik Völkel
2015-12-16 15:43 ` One Thousand Gnomes
2015-12-16 16:25 ` Peter Hurley
2015-12-16 15:16 ` Frederik Völkel [this message]
2015-12-16 15:17 ` [PATCH v2 3/4] drivers: tty: 68328serial.c: Use use same indentation for switch/case Frederik Völkel
2015-12-16 15:17 ` [PATCH v2 4/4] drivers: tty: 68328serial.c: Move trailing statements to next line Frederik Völkel
2015-12-18 11:28 ` [PATCH] serial: Remove 68328 driver Frederik Völkel
2015-12-18 14:27 ` Geert Uytterhoeven
2016-01-04 5:03 ` Greg Ungerer
2016-01-04 10:30 ` One Thousand Gnomes
2016-01-04 11:10 ` Greg Ungerer
2016-01-11 17:57 ` Peter Hurley
2016-01-11 17:53 ` Peter Hurley
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=1450279021-17154-3-git-send-email-frederik.voelkel@fau.de \
--to=frederik.voelkel@fau.de \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-kernel@i4.cs.fau.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=lukas.braun@fau.de \
/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).