Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1289417 > unrolled thread

[PATCH 0/9] Fix checkpatch errors

Started byFrederik Völkel <frederik.voelkel@fau.de>
First post2015-12-11 11:50 +0100
Last post2015-12-11 11:50 +0100
Articles 3 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/9] Fix checkpatch errors  Frederik Völkel <frederik.voelkel@fau.de> - 2015-12-11 11:50 +0100
    [PATCH 2/9] drivers: tty: 68328serial.c: remove unnecessary spaces(checkpatch) Frederik Völkel <frederik.voelkel@fau.de> - 2015-12-11 11:50 +0100
    [PATCH 6/9] drivers: tty: 68328serial.c: Use tabs for indentation Frederik Völkel <frederik.voelkel@fau.de> - 2015-12-11 11:50 +0100

#1289417 — [PATCH 0/9] Fix checkpatch errors

FromFrederik Völkel <frederik.voelkel@fau.de>
Date2015-12-11 11:50 +0100
Subject[PATCH 0/9] Fix checkpatch errors
Message-ID<qEtqV-35O-7@gated-at.bofh.it>
This patch series fixes all checkpatch error in 68328serial.c except
5 trailing whitespace errors we are unsure how to fix.
Checkpatch warnings are unfixed. Maybe we send an patch series witch fix
these warnings later on.

Frederik Völkel (9):
  drivers: tty: 68328serial.c: Add missing spaces(checkpatch)
  drivers: tty: 68328serial.c: remove unnecessary spaces(checkpatch)
  drivers: tty: 68328serial.c: Do not initialize statics to 0
  drivers: tty: 68328serial.c: Fix "foo * bar" should be "foo *bar"
  drivers: tty: 68328serial.c: Remove parentheses after return
  drivers: tty: 68328serial.c: Use tabs for indentation
  drivers: tty: 68328serial.c: remove trailing whitespaces
  drivers: tty: 68328serial.c: Use use same indentation for switch/case
  drivers: tty: 68328serial.c: Move trailing statements to next line

 drivers/tty/serial/68328serial.c | 337 ++++++++++++++++++++-------------------
 1 file changed, 171 insertions(+), 166 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1289418 — [PATCH 2/9] drivers: tty: 68328serial.c: remove unnecessary spaces(checkpatch)

FromFrederik Völkel <frederik.voelkel@fau.de>
Date2015-12-11 11:50 +0100
Subject[PATCH 2/9] drivers: tty: 68328serial.c: remove unnecessary spaces(checkpatch)
Message-ID<qEtqW-35O-31@gated-at.bofh.it>
In reply to#1289417
This patch removes unnecessary spaces 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 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/68328serial.c b/drivers/tty/serial/68328serial.c
index 4cdd805..b26cbae 100644
--- a/drivers/tty/serial/68328serial.c
+++ b/drivers/tty/serial/68328serial.c
@@ -538,7 +538,7 @@ static void change_speed(struct m68k_serial *info, struct tty_struct *tty)
 	
 #ifdef CONFIG_SERIAL_68328_RTS_CTS
 	if (cflag & CRTSCTS) {
-		uart->utx.w &= ~ UTX_NOCTS;
+		uart->utx.w &= ~UTX_NOCTS;
 	} else {
 		uart->utx.w |= UTX_NOCTS;
 	}
@@ -1198,7 +1198,7 @@ rs68328_init(void)
 	    printk(" is a builtin MC68328 UART\n");
 	    
 #ifdef CONFIG_M68VZ328
-		if (i > 0 )
+		if (i > 0)
 			PJSEL &= 0xCF;  /* PSW enable second port output */
 #endif
 
@@ -1298,7 +1298,7 @@ void m68328_console_write (struct console *co, const char *str,
     while (count--) {
         if (*str == '\n')
            rs_put_char('\r');
-        rs_put_char( *str++ );
+        rs_put_char(*str++);
     }
 }
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1289422 — [PATCH 6/9] drivers: tty: 68328serial.c: Use tabs for indentation

FromFrederik Völkel <frederik.voelkel@fau.de>
Date2015-12-11 11:50 +0100
Subject[PATCH 6/9] drivers: tty: 68328serial.c: Use tabs for indentation
Message-ID<qEtqX-35O-41@gated-at.bofh.it>
In reply to#1289417
The patch replaces the spaces used for indentation at some points with
tabs.

Signed-off-by: Frederik Völkel <frederik.voelkel@fau.de>
Signed-off-by: Lukas Braun <lukas.braun@fau.de>
---
 drivers/tty/serial/68328serial.c | 82 ++++++++++++++++++++--------------------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/drivers/tty/serial/68328serial.c b/drivers/tty/serial/68328serial.c
index 0982c1a..22f52e0 100644
--- a/drivers/tty/serial/68328serial.c
+++ b/drivers/tty/serial/68328serial.c
@@ -228,17 +228,17 @@ static int rs_put_char(char ch)
 	unsigned long flags;
 	int loops = 0;
 
-        local_irq_save(flags);
+	local_irq_save(flags);
 
 	while (!(UTX & UTX_TX_AVAIL) && (loops < 1000)) {
-        	loops++;
-        	udelay(5);
-        }
+		loops++;
+		udelay(5);
+	}
 
 	UTX_TXDATA = ch;
-        udelay(5);
-        local_irq_restore(flags);
-        return 1;
+	udelay(5);
+	local_irq_restore(flags);
+	return 1;
 }
 
 static void rs_start(struct tty_struct *tty)
@@ -268,7 +268,7 @@ static void receive_chars(struct m68k_serial *info, unsigned short rx)
 
 	/*
 	 * This do { } while() loop will get ALL chars out of Rx FIFO 
-         */
+	 */
 #ifndef CONFIG_XCOPILOT_BUGS
 	do {
 #endif	
@@ -400,7 +400,7 @@ static int startup(struct m68k_serial *info, struct tty_struct *tty)
 	 */
 #ifdef USE_INTS
 	uart->ustcnt = USTCNT_UEN | USTCNT_RXEN | 
-                 USTCNT_RX_INTR_MASK | USTCNT_TX_INTR_MASK;
+		USTCNT_RX_INTR_MASK | USTCNT_TX_INTR_MASK;
 #else
 	uart->ustcnt = USTCNT_UEN | USTCNT_RXEN | USTCNT_RX_INTR_MASK;
 #endif
@@ -473,24 +473,24 @@ struct {
 };
 #else
  hw_baud_table[18] = {
-                 {0, 0}, /* 0 */
-                 {0, 0}, /* 50 */
-                 {0, 0}, /* 75 */
-                 {0, 0}, /* 110 */
-                 {0, 0}, /* 134 */
-                 {0, 0}, /* 150 */
-                 {0, 0}, /* 200 */
-                 {0, 0}, /* 300 */
-                 {7, 0x26}, /* 600 */
-                 {6, 0x26}, /* 1200 */
-                 {0, 0}, /* 1800 */
-                 {5, 0x26}, /* 2400 */
-                 {4, 0x26}, /* 4800 */
-                 {3, 0x26}, /* 9600 */
-                 {2, 0x26}, /* 19200 */
-                 {1, 0x26}, /* 38400 */
-                 {0, 0x26}, /* 57600 */
-                 {1, 0x38}, /* 115200 */
+	{0, 0}, /* 0 */
+	{0, 0}, /* 50 */
+	{0, 0}, /* 75 */
+	{0, 0}, /* 110 */
+	{0, 0}, /* 134 */
+	{0, 0}, /* 150 */
+	{0, 0}, /* 200 */
+	{0, 0}, /* 300 */
+	{7, 0x26}, /* 600 */
+	{6, 0x26}, /* 1200 */
+	{0, 0}, /* 1800 */
+	{5, 0x26}, /* 2400 */
+	{4, 0x26}, /* 4800 */
+	{3, 0x26}, /* 9600 */
+	{2, 0x26}, /* 19200 */
+	{1, 0x26}, /* 38400 */
+	{0, 0x26}, /* 57600 */
+	{1, 0x38}, /* 115200 */
 }; 
 #endif
 /* rate = 1036800 / ((65 - prescale) * (1<<divider)) */
@@ -516,9 +516,9 @@ static void change_speed(struct m68k_serial *info, struct tty_struct *tty)
 	uart->ustcnt = ustcnt & ~USTCNT_TXEN;
 
 	i = cflag & CBAUD;
-        if (i & CBAUDEX) {
-                i = (i & ~CBAUDEX) + B38400;
-        }
+	if (i & CBAUDEX) {
+		i = (i & ~CBAUDEX) + B38400;
+	}
 
 	uart->ubaud = PUT_FIELD(UBAUD_DIVIDE,    hw_baud_table[i].divisor) | 
 		PUT_FIELD(UBAUD_PRESCALER, hw_baud_table[i].prescale);
@@ -907,16 +907,16 @@ static int get_lsr_info(struct m68k_serial *info, unsigned int *value)
 static void send_break(struct m68k_serial *info, unsigned int duration)
 {
 	m68328_uart *uart = &uart_addr[info->line];
-        unsigned long flags;
-        if (!info->port)
-                return;
-        local_irq_save(flags);
+	unsigned long flags;
+	if (!info->port)
+		return;
+	local_irq_save(flags);
 #ifdef USE_INTS	
 	uart->utx.w |= UTX_SEND_BREAK;
 	msleep_interruptible(duration);
 	uart->utx.w &= ~UTX_SEND_BREAK;
 #endif		
-        local_irq_restore(flags);
+	local_irq_restore(flags);
 }
 
 static int rs_ioctl(struct tty_struct *tty,
@@ -1206,7 +1206,7 @@ rs68328_init(void)
 			    rs_interrupt,
 			    0,
 			    "M68328_UART", info))
-                panic("Unable to attach 68328 serial interrupt\n");
+		panic("Unable to attach 68328 serial interrupt\n");
 
 	    tty_port_link_device(&info->tport, serial_driver, i);
 	}
@@ -1295,11 +1295,11 @@ void m68328_console_write (struct console *co, const char *str,
 {
 	if (!m68328_console_initted)
 		m68328_set_baud();
-    while (count--) {
-        if (*str == '\n')
-           rs_put_char('\r');
-        rs_put_char(*str++);
-    }
+	while (count--) {
+		if (*str == '\n')
+		    rs_put_char('\r');
+	rs_put_char(*str++);
+	}
 }
 
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web