Skip to contentSkip to conversation

drivers: tty: Fix kernel-docs comments

PATCH In review Tobin C. Harding 2 participants 9 messages Oct 18, 2018 – Nov 9, 2018

Subsystems (18)
lore
Share & tools
lore
#0 lore raw

v2 cover drivers: tty: Fix kernel-docs comments

Hi,

v2 with the author amended to use the correct _new_ email address (thanks Geert and Greg) so that the SoB is correct.

Applies on top of tty-next tree.

From v1:

My first patch set using kernel.org email address. I've been so careful with this one I'm expecting some epic fail :)

This set is an attempt to clean up the kernel docs comments under drivers/tty/. I do not know what time in the kernel dev cycle would be best for this set. If now is not the time please do not hesitate to say so and stop reading here.

I included a couple of whitespace patches to kick off with, in hindsight these might be nothing more than code churn (if so I can remove them).

I had a real hard time breaking these changes up into separate patches. This was mainly because I was super conscious that this set is borderline trivial yet large enough to be a P in the A to review. I have reviewed these patches a bunch of times myself and am happy with the result being as easy to review as I know how. If there was anything more I could have done please say. Patch 3 and 7 are the two that are most arduous to review.

Apart from the first two whitespace patches only comments are touched by this set. The set builds cleanly but does _not_ checkpatch cleanly - there is a limit to the code churn I was willing to risk posting :)

Extra thanks to anyone who reviews this. This set is super non-critical so please only review at your leisure.

thanks,
Tobin.

v2:
- Check author of each patch, run when required:

    `git commit --amend --author="Tobin C. Harding <[email protected]>"

- Fix introduced 'space before tab warnings' in patch 3 and 7.

Tobin C. Harding (7):
tty: Fix whitespace before tab warnings
tty: Remove trailing whitespace
tty: Partially fix kernel-docs layout
tty: Fix kernel-doc variable typos
tty: Fix spacing between kernel-doc sections
tty: Remove newline after function kernel-doc
tty: Fix section format

 drivers/tty/amiserial.c                     |   62 +-
 drivers/tty/cyclades.c                      |    2 +-
 drivers/tty/ehv_bytechan.c                  |    2 +-
 drivers/tty/hvc/hvc_console.c               |    8 +-
 drivers/tty/hvc/hvc_iucv.c                  |   14 +-
 drivers/tty/hvc/hvc_xen.c                   |    2 +-
 drivers/tty/hvc/hvcs.c                      |    4 +-
 drivers/tty/ipwireless/tty.c                |    2 +-
 drivers/tty/isicom.c                        |    4 +-
 drivers/tty/mips_ejtag_fdc.c                |    4 +-
 drivers/tty/moxa.c                          |   38 +-
 drivers/tty/mxser.c                         |   14 +-
 drivers/tty/n_gsm.c                         |  754 +++++++-------
 drivers/tty/n_hdlc.c                        |  208 ++--
 drivers/tty/n_r3964.c                       |    6 +-
 drivers/tty/n_tracerouter.c                 |   18 +-
 drivers/tty/n_tracesink.c                   |   24 +-
 drivers/tty/n_tty.c                         |  688 ++++++-------
 drivers/tty/pty.c                           |  126 ++-
 drivers/tty/rocket.c                        |   78 +-
 drivers/tty/serdev/core.c                   |    2 +-
 drivers/tty/serial/21285.c                  |    2 +-
 drivers/tty/serial/8250/8250_core.c         |   72 +-
 drivers/tty/serial/8250/8250_dw.c           |    4 +-
 drivers/tty/serial/8250/8250_port.c         |   42 +-
 drivers/tty/serial/amba-pl010.c             |    2 +-
 drivers/tty/serial/amba-pl011.c             |   34 +-
 drivers/tty/serial/cpm_uart/cpm_uart_core.c |    8 +-
 drivers/tty/serial/earlycon.c               |   26 +-
 drivers/tty/serial/icom.c                   |    5 +-
 drivers/tty/serial/ifx6x60.c                |  387 ++++---
 drivers/tty/serial/ioc3_serial.c            |   73 +-
 drivers/tty/serial/ioc4_serial.c            |   85 +-
 drivers/tty/serial/ip22zilog.c              |    2 +-
 drivers/tty/serial/jsm/jsm_neo.c            |    2 +-
 drivers/tty/serial/kgdb_nmi.c               |    2 +-
 drivers/tty/serial/max3100.c                |    2 +-
 drivers/tty/serial/max310x.c                |    2 +-
 drivers/tty/serial/men_z135_uart.c          |    5 +-
 drivers/tty/serial/mux.c                    |   62 +-
 drivers/tty/serial/mxs-auart.c              |    2 +-
 drivers/tty/serial/pmac_zilog.c             |   62 +-
 drivers/tty/serial/pxa.c                    |   20 +-
 drivers/tty/serial/sa1100.c                 |    2 +-
 drivers/tty/serial/serial-tegra.c           |    4 +-
 drivers/tty/serial/serial_core.c            |  198 ++--
 drivers/tty/serial/serial_txx9.c            |   23 +-
 drivers/tty/serial/sn_console.c             |  105 +-
 drivers/tty/serial/sunsab.c                 |   16 +-
 drivers/tty/serial/sunsu.c                  |    8 +-
 drivers/tty/serial/sunzilog.c               |   10 +-
 drivers/tty/serial/uartlite.c               |   15 +-
 drivers/tty/serial/ucc_uart.c               |  134 +--
 drivers/tty/serial/vr41xx_siu.c             |    2 +-
 drivers/tty/serial/xilinx_uartps.c          |   71 +-
 drivers/tty/serial/zs.c                     |   12 +-
 drivers/tty/synclink.c                      | 1016 +++++++++----------
 drivers/tty/synclinkmp.c                    |   16 +-
 drivers/tty/sysrq.c                         |   34 +-
 drivers/tty/tty_audit.c                     |   39 +-
 drivers/tty/tty_baudrate.c                  |   77 +-
 drivers/tty/tty_buffer.c                    |  245 +++--
 drivers/tty/tty_io.c                        |  847 ++++++++--------
 drivers/tty/tty_ioctl.c                     |  222 ++--
 drivers/tty/tty_jobctrl.c                   |  140 ++-
 drivers/tty/tty_ldisc.c                     |  290 +++---
 drivers/tty/tty_port.c                      |  124 ++-
 drivers/tty/vt/consolemap.c                 |   84 +-
 drivers/tty/vt/keyboard.c                   |  165 +--
 drivers/tty/vt/selection.c                  |   40 +-
 drivers/tty/vt/vt.c                         |  138 ++-
 drivers/tty/vt/vt_ioctl.c                   |   70 +-
 72 files changed, 3452 insertions(+), 3656 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/7 tty: Fix whitespace before tab warnings

This patch is whitespace only.

Checkpatch emits a BUNCH of warnings of type

WARNING: please, no spaces at the start of a line
WARNING: please, no space before tabs

While these may seem trivial they hinder further cleanup efforts because there are so many that later cleanup touches many of the same lines, this makes the cleanup patches super noisy when parsed with checkpatch (although checkpatching this series is prohibitively noisy even with this patch).

In preparation for doing kernel-docs cleanup fix all the whitespace before tab and whitespace at start of line warnings. We do not fix any that are obviously there for extra-ordinary formatting reasons.

Any line in the diff with obvious other formatting errors is fixed also excluding kernel-docs lines.

---

Actually, checkpatch is only noisy on a couple of patches from this set. I ran checkpatch individually (instead of on the whole set) on each patch and fixed things within scope of this set while working on version 2 of the set.

 drivers/tty/amiserial.c                     |  43 ++++---
 drivers/tty/hvc/hvc_console.c               |   2 +-
 drivers/tty/ipwireless/tty.c                |   2 +-
 drivers/tty/isicom.c                        |   4 +-
 drivers/tty/moxa.c                          |  30 +++--
 drivers/tty/mxser.c                         |  10 +-
 drivers/tty/n_hdlc.c                        |  10 +-
 drivers/tty/rocket.c                        |   8 +-
 drivers/tty/serdev/core.c                   |   2 +-
 drivers/tty/serial/8250/8250_dw.c           |   4 +-
 drivers/tty/serial/amba-pl011.c             |   8 +-
 drivers/tty/serial/cpm_uart/cpm_uart_core.c |   8 +-
 drivers/tty/serial/icom.c                   |   5 +-
 drivers/tty/serial/ip22zilog.c              |   2 +-
 drivers/tty/serial/jsm/jsm_neo.c            |   2 +-
 drivers/tty/serial/mux.c                    |   6 +-
 drivers/tty/serial/mxs-auart.c              |   2 +-
 drivers/tty/serial/pmac_zilog.c             |   4 +-
 drivers/tty/serial/pxa.c                    |  20 +--
 drivers/tty/serial/serial_txx9.c            |   2 +-
 drivers/tty/serial/sn_console.c             |  38 +++---
 drivers/tty/serial/sunsab.c                 |   2 +-
 drivers/tty/serial/sunsu.c                  |   4 +-
 drivers/tty/serial/sunzilog.c               |   2 +-
 drivers/tty/serial/ucc_uart.c               | 134 ++++++++++----------
 drivers/tty/serial/vr41xx_siu.c             |   2 +-
 drivers/tty/serial/zs.c                     |  12 +-
 drivers/tty/sysrq.c                         |  34 ++---
 drivers/tty/tty_baudrate.c                  |   2 +-
 drivers/tty/tty_io.c                        |  22 ++--
 drivers/tty/tty_ioctl.c                     |   2 +-
 drivers/tty/tty_jobctrl.c                   |   8 +-
 drivers/tty/vt/consolemap.c                 |   6 +-
 drivers/tty/vt/keyboard.c                   |  29 +++--
 drivers/tty/vt/selection.c                  |  12 +-
 drivers/tty/vt/vt.c                         |  40 +++---
 drivers/tty/vt/vt_ioctl.c                   |  14 +-
 37 files changed, 271 insertions(+), 266 deletions(-)
drivers/tty/amiserial.c +22 -21
index 34dead614149..73d4033cef6b 100644
@@ -18,7 +18,7 @@
  *
  *  Copyright (C) 1991, 1992  Linus Torvalds
  *  Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 
- * 		1998, 1999  Theodore Ts'o
+ *		1998, 1999  Theodore Ts'o
  *
  */
 
@@ -26,8 +26,8 @@
  * Serial driver configuration section.  Here are the various options:
  *
  * SERIAL_PARANOIA_CHECK
- * 		Check the magic number for the async_structure where
- * 		ever possible.
+ *		Check the magic number for the async_structure where
+ *		ever possible.
  */
 
 #include <linux/delay.h>
@@ -104,8 +104,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 */
 };
 
@@ -173,7 +173,8 @@ static inline int serial_paranoia_check(struct serial_state *info,
 
 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));
 }
 
 /*
@@ -243,13 +244,13 @@ static void rs_start(struct tty_struct *tty)
  *
  * and look at the resulting assemble code in serial.s.
  *
- * 				- Ted Ts'o ([email protected]), 7-Mar-93
+ *				- Ted Ts'o ([email protected]), 7-Mar-93
  * -----------------------------------------------------------------------
  */
 
 static void receive_chars(struct serial_state *info)
 {
-        int status;
+	int status;
 	int serdatr;
 	unsigned char ch, flag;
 	struct	async_icount *icount;
@@ -912,7 +913,7 @@ static void rs_flush_buffer(struct tty_struct *tty)
 static void rs_send_xchar(struct tty_struct *tty, char ch)
 {
 	struct serial_state *info = tty->driver_data;
-        unsigned long flags;
+	unsigned long flags;
 
 	if (serial_paranoia_check(info, tty->name, "rs_send_xchar"))
 		return;
@@ -921,8 +922,8 @@ static void rs_send_xchar(struct tty_struct *tty, char ch)
 	if (ch) {
 		/* Make sure transmit interrupts are on */
 
-	        /* Check this ! */
-	        local_irq_save(flags);
+		/* Check this ! */
+		local_irq_save(flags);
 		if(!(custom.intenar & IF_TBE)) {
 		    custom.intena = IF_SETCLR | IF_TBE;
 		    mb();
@@ -1000,7 +1001,7 @@ static int get_serial_info(struct tty_struct *tty, struct serial_state *state,
 			   struct serial_struct __user * retinfo)
 {
 	struct serial_struct tmp;
-   
+
 	memset(&tmp, 0, sizeof(tmp));
 	tty_lock(tty);
 	tmp.line = tty->index;
@@ -1023,7 +1024,7 @@ static int set_serial_info(struct tty_struct *tty, struct serial_state *state,
 	struct tty_port *port = &state->tport;
 	struct serial_struct new_serial;
 	bool change_spd;
-	int 			retval = 0;
+	int			retval = 0;
 
 	if (copy_from_user(&new_serial,new_info,sizeof(new_serial)))
 		return -EFAULT;
@@ -1036,7 +1037,7 @@ static int set_serial_info(struct tty_struct *tty, struct serial_state *state,
 		tty_unlock(tty);
 		return -EINVAL;
 	}
-  
+
 	if (!serial_isroot()) {
 		if ((new_serial.baud_base != state->baud_base) ||
 		    (new_serial.close_delay != port->close_delay) ||
@@ -1089,11 +1090,11 @@ static int set_serial_info(struct tty_struct *tty, struct serial_state *state,
  * get_lsr_info - get line status register info
  *
  * Purpose: Let user call ioctl() to get info when the UART physically
- * 	    is emptied.  On bus types like RS485, the transmitter must
- * 	    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. 
+ *	    is emptied.  On bus types like RS485, the transmitter must
+ *	    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.
  */
 static int get_lsr_info(struct serial_state *info, unsigned int __user *value)
 {
@@ -1251,7 +1252,7 @@ static int rs_ioctl(struct tty_struct *tty,
 		/*
 		 * Wait for any of the 4 modem inputs (DCD,RI,DSR,CTS) to change
 		 * - mask passed in arg for lines of interest
- 		 *   (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
+		 *   (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
 		 * Caller should use TIOCGICOUNT to see which one it was
 		 */
 		case TIOCMIWAIT:
@@ -1581,7 +1582,7 @@ static int rs_proc_show(struct seq_file *m, void *v)
  */
 static void show_serial_version(void)
 {
- 	printk(KERN_INFO "%s version %s\n", serial_name, serial_version);
+	printk(KERN_INFO "%s version %s\n", serial_name, serial_version);
 }
 
 
drivers/tty/hvc/hvc_console.c +1 -1
index 27284a2dcd2b..676cf5b73ed2 100644
@@ -268,7 +268,7 @@ static void hvc_check_console(int index)
 	if (hvc_console.flags & CON_ENABLED)
 		return;
 
- 	/* If this index is what the user requested, then register
+	/* If this index is what the user requested, then register
 	 * now (setup won't fail at this point).  It's ok to just
 	 * call register again if previously .setup failed.
 	 */
drivers/tty/ipwireless/tty.c +1 -1
index 1ef751c27ac6..20779f7e6e32 100644
@@ -35,7 +35,7 @@
 #include "hardware.h"
 #include "main.h"
 
-#define IPWIRELESS_PCMCIA_START 	(0)
+#define IPWIRELESS_PCMCIA_START	(0)
 #define IPWIRELESS_PCMCIA_MINORS	(24)
 #define IPWIRELESS_PCMCIA_MINOR_RANGE	(8)
 
drivers/tty/isicom.c +2 -2
index 8d96e86966f1..b45eb8b20606 100644
@@ -86,7 +86,7 @@
  *	10/12/03  Ravindra		Made to work for Fedora Core 1 of
  *					Red Hat Distribution
  *
- *	06/01/05  Alan Cox 		Merged the ISI and base kernel strands
+ *	06/01/05  Alan Cox		Merged the ISI and base kernel strands
  *					into a single 2.6 driver
  *
  *	***********************************************************
@@ -1665,7 +1665,7 @@ static int __init isicom_init(void)
 		goto error;
 	}
 
-	isicom_normal->name 			= "ttyM";
+	isicom_normal->name			= "ttyM";
 	isicom_normal->major			= ISICOM_NMAJOR;
 	isicom_normal->minor_start		= 0;
 	isicom_normal->type			= TTY_DRIVER_TYPE_SERIAL;
drivers/tty/moxa.c +16 -14
index 250a19f042d7..7ce06f43b6ae 100644
@@ -148,7 +148,7 @@ struct mon_str {
 
 /* statusflags */
 #define TXSTOPPED	1
-#define LOWWAIT 	2
+#define LOWWAIT	2
 #define EMPTYWAIT	3
 
 
@@ -244,8 +244,9 @@ static void moxa_wait_finish(void __iomem *ofsAddr)
 
 static void moxafunc(void __iomem *ofsAddr, u16 cmd, u16 arg)
 {
-        unsigned long flags;
-        spin_lock_irqsave(&moxafunc_lock, flags);
+	unsigned long flags;
+
+	spin_lock_irqsave(&moxafunc_lock, flags);
 	writew(arg, ofsAddr + FuncArg);
 	writew(cmd, ofsAddr + FuncCode);
 	moxa_wait_finish(ofsAddr);
@@ -254,9 +255,10 @@ static void moxafunc(void __iomem *ofsAddr, u16 cmd, u16 arg)
 
 static int moxafuncret(void __iomem *ofsAddr, u16 cmd, u16 arg)
 {
-        unsigned long flags;
-        u16 ret;
-        spin_lock_irqsave(&moxafunc_lock, flags);
+	unsigned long flags;
+	u16 ret;
+
+	spin_lock_irqsave(&moxafunc_lock, flags);
 	writew(arg, ofsAddr + FuncArg);
 	writew(cmd, ofsAddr + FuncCode);
 	moxa_wait_finish(ofsAddr);
@@ -348,9 +350,9 @@ static int moxa_ioctl(struct tty_struct *tty,
 				memset(&tmp, 0, sizeof(tmp));
 				spin_lock_bh(&moxa_lock);
 				if (!moxa_boards[i].ready) {
-				        spin_unlock_bh(&moxa_lock);
+					spin_unlock_bh(&moxa_lock);
 					goto copy;
-                                }
+				}
 
 				status = MoxaPortLineStatus(p);
 				spin_unlock_bh(&moxa_lock);
@@ -1138,7 +1140,7 @@ module_exit(moxa_exit);
 static void moxa_shutdown(struct tty_port *port)
 {
 	struct moxa_port *ch = container_of(port, struct moxa_port, port);
-        MoxaPortDisable(ch);
+	MoxaPortDisable(ch);
 	MoxaPortFlushData(ch, 2);
 }
 
@@ -1260,7 +1262,7 @@ static int moxa_chars_in_buffer(struct tty_struct *tty)
 		 * Make it possible to wakeup anything waiting for output
 		 * in tty_ioctl.c, etc.
 		 */
-        	set_bit(EMPTYWAIT, &ch->statusflags);
+		set_bit(EMPTYWAIT, &ch->statusflags);
 	return chars;
 }
 
@@ -1361,8 +1363,8 @@ static void moxa_new_dcdstate(struct moxa_port *p, u8 dcd)
 
 	spin_lock_irqsave(&p->port.lock, flags);
 	if (dcd != p->DCDState) {
-        	p->DCDState = dcd;
-        	spin_unlock_irqrestore(&p->port.lock, flags);
+		p->DCDState = dcd;
+		spin_unlock_irqrestore(&p->port.lock, flags);
 		if (!dcd)
 			tty_port_tty_hangup(&p->port, true);
 	}
@@ -1496,7 +1498,7 @@ static void moxa_set_tty_param(struct tty_struct *tty, struct ktermios *old_term
 }
 
 /*****************************************************************************
- *	Driver level functions: 					     *
+ *	Driver level functions:					             *
  *****************************************************************************/
 
 static void MoxaPortFlushData(struct moxa_port *port, int mode)
@@ -2080,7 +2082,7 @@ static int moxa_set_serial_info(struct moxa_port *info,
 
 
 /*****************************************************************************
- *	Static local functions: 					     *
+ *	Static local functions:					             *
  *****************************************************************************/
 
 static void MoxaSetFifo(struct moxa_port *port, int enable)
drivers/tty/mxser.c +5 -5
index 8bc15cb67a58..3f800b35689e 100644
@@ -1429,11 +1429,11 @@ static void __init mxser_normal_mode(int port)
 	outb(0x00, port + 4);
 }
 
-#define CHIP_SK 	0x01	/* Serial Data Clock  in Eprom */
-#define CHIP_DO 	0x02	/* Serial Data Output in Eprom */
-#define CHIP_CS 	0x04	/* Serial Chip Select in Eprom */
-#define CHIP_DI 	0x08	/* Serial Data Input  in Eprom */
-#define EN_CCMD 	0x000	/* Chip's command register     */
+#define CHIP_SK	0x01	/* Serial Data Clock  in Eprom */
+#define CHIP_DO	0x02	/* Serial Data Output in Eprom */
+#define CHIP_CS	0x04	/* Serial Chip Select in Eprom */
+#define CHIP_DI	0x08	/* Serial Data Input  in Eprom */
+#define EN_CCMD	0x000	/* Chip's command register     */
 #define EN0_RSARLO	0x008	/* Remote start address reg 0  */
 #define EN0_RSARHI	0x009	/* Remote start address reg 1  */
 #define EN0_RCNTLO	0x00A	/* Remote byte count reg WR    */
drivers/tty/n_hdlc.c +5 -5
index dabb391909aa..1f2e24424b44 100644
@@ -382,10 +382,10 @@ static void n_hdlc_send_frames(struct n_hdlc *n_hdlc, struct tty_struct *tty)
 		printk("%s(%d)n_hdlc_send_frames() called\n",__FILE__,__LINE__);
  check_again:
 		
- 	spin_lock_irqsave(&n_hdlc->tx_buf_list.spinlock, flags);
+	spin_lock_irqsave(&n_hdlc->tx_buf_list.spinlock, flags);
 	if (n_hdlc->tbusy) {
 		n_hdlc->woke_up = 1;
- 		spin_unlock_irqrestore(&n_hdlc->tx_buf_list.spinlock, flags);
+		spin_unlock_irqrestore(&n_hdlc->tx_buf_list.spinlock, flags);
 		return;
 	}
 	n_hdlc->tbusy = 1;
@@ -447,7 +447,7 @@ static void n_hdlc_send_frames(struct n_hdlc *n_hdlc, struct tty_struct *tty)
 	n_hdlc->tbusy = 0;
 	spin_unlock_irqrestore(&n_hdlc->tx_buf_list.spinlock, flags); 
 	
-        if (n_hdlc->woke_up)
+	if (n_hdlc->woke_up)
 	  goto check_again;
 
 	if (debuglevel >= DEBUG_LEVEL_INFO)	
@@ -554,7 +554,7 @@ static void n_hdlc_tty_receive(struct tty_struct *tty, const __u8 *data,
  * @file - pointer to open file object
  * @buf - pointer to returned data buffer
  * @nr - size of returned data buffer
- * 	
+ *
  * Returns the number of bytes returned or error code.
  */
 static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
@@ -638,7 +638,7 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
  * @file - pointer to file object data
  * @data - pointer to transmit data (one frame)
  * @count - size of transmit frame in bytes
- * 		
+ *
  * Returns the number of bytes written (or error code).
  */
 static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
drivers/tty/rocket.c +4 -4
index b121d8f8f3d7..c123fdb7eed8 100644
@@ -1253,7 +1253,7 @@ static int reset_rm2(struct r_port *info, void __user *arg)
 		reset = 1;
 
 	if (rcktpt_type[info->board] != ROCKET_TYPE_MODEMII &&
-            rcktpt_type[info->board] != ROCKET_TYPE_MODEMIII)
+	    rcktpt_type[info->board] != ROCKET_TYPE_MODEMIII)
 		return -EINVAL;
 
 	if (info->ctlp->BusType == isISA)
@@ -1619,8 +1619,8 @@ static int rp_write(struct tty_struct *tty,
 		set_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]);
 	
 end:
- 	if (info->xmit_cnt < WAKEUP_CHARS) {
- 		tty_wakeup(tty);
+	if (info->xmit_cnt < WAKEUP_CHARS) {
+		tty_wakeup(tty);
 #ifdef ROCKETPORT_HAVE_POLL_WAIT
 		wake_up_interruptible(&tty->poll_wait);
 #endif
@@ -2257,7 +2257,7 @@ static int __init init_ISA(int i)
 		rcktpt_io_addr[i] = 0;
 		return (0);
 	}
-  
+
 	rocketModel[i].startingPortNumber = nextLineNumber;
 
 	for (aiop = 0; aiop < num_aiops; aiop++) {
drivers/tty/serdev/core.c +1 -1
index 9db93f500b4e..bc4d2f9d3333 100644
@@ -648,7 +648,7 @@ int __serdev_device_driver_register(struct serdev_device_driver *sdrv, struct mo
 	sdrv->driver.owner = owner;
 
 	/* force drivers to async probe so I/O is possible in probe */
-        sdrv->driver.probe_type = PROBE_PREFER_ASYNCHRONOUS;
+	sdrv->driver.probe_type = PROBE_PREFER_ASYNCHRONOUS;
 
 	return driver_register(&sdrv->driver);
 }
drivers/tty/serial/8250/8250_dw.c +2 -2
index d31b975dd3fd..85f3f03603fd 100644
@@ -243,9 +243,9 @@ static void dw8250_serial_out32be(struct uart_port *p, int offset, int value)
 
 static unsigned int dw8250_serial_in32be(struct uart_port *p, int offset)
 {
-       unsigned int value = ioread32be(p->membase + (offset << p->regshift));
+	unsigned int value = ioread32be(p->membase + (offset << p->regshift));
 
-       return dw8250_modify_msr(p, offset, value);
+	return dw8250_modify_msr(p, offset, value);
 }
 
 
drivers/tty/serial/amba-pl011.c +4 -4
index ebd33c0232e6..8a47ba2cfe54 100644
@@ -1822,11 +1822,11 @@ static int sbsa_uart_startup(struct uart_port *port)
 static void pl011_shutdown_channel(struct uart_amba_port *uap,
 					unsigned int lcrh)
 {
-      unsigned long val;
+	unsigned long val;
 
-      val = pl011_read(uap, lcrh);
-      val &= ~(UART01x_LCRH_BRK | UART01x_LCRH_FEN);
-      pl011_write(val, uap, lcrh);
+	val = pl011_read(uap, lcrh);
+	val &= ~(UART01x_LCRH_BRK | UART01x_LCRH_FEN);
+	pl011_write(val, uap, lcrh);
 }
 
 /*
drivers/tty/serial/cpm_uart/cpm_uart_core.c +4 -4
index 79ad30d34949..d61605fc9f6b 100644
@@ -481,8 +481,8 @@ static void cpm_uart_shutdown(struct uart_port *port)
 }
 
 static void cpm_uart_set_termios(struct uart_port *port,
-                                 struct ktermios *termios,
-                                 struct ktermios *old)
+				 struct ktermios *termios,
+				 struct ktermios *old)
 {
 	int baud;
 	unsigned long flags;
@@ -1138,7 +1138,7 @@ static const struct uart_ops cpm_uart_pops = {
 struct uart_cpm_port cpm_uart_ports[UART_NR];
 
 static int cpm_uart_init_port(struct device_node *np,
-                              struct uart_cpm_port *pinfo)
+			      struct uart_cpm_port *pinfo)
 {
 	const u32 *data;
 	void __iomem *mem, *pram;
@@ -1451,7 +1451,7 @@ static struct platform_driver cpm_uart_driver = {
 	},
 	.probe = cpm_uart_probe,
 	.remove = cpm_uart_remove,
- };
+};
 
 static int __init cpm_uart_init(void)
 {
drivers/tty/serial/icom.c +3 -2
index ad374f7c476d..001621aec4a0 100644
@@ -1505,8 +1505,9 @@ static int icom_probe(struct pci_dev *dev,
 	}
 
 	pci_write_config_dword(dev, PCI_COMMAND,
-		command_reg | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER
- 		| PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
+			       command_reg | PCI_COMMAND_MEMORY |
+			       PCI_COMMAND_MASTER | PCI_COMMAND_PARITY |
+			       PCI_COMMAND_SERR);
 
 	if (ent->driver_data == ADAPTER_V1) {
 		pci_write_config_dword(dev, 0x44, 0x8300830A);
drivers/tty/serial/ip22zilog.c +1 -1
index 8c810733df3d..05c835e08256 100644
@@ -1091,7 +1091,7 @@ static void __init ip22zilog_prepare(void)
 		spin_lock_init(&ip22zilog_port_table[channel].port.lock);
 
 	ip22zilog_irq_chain = &ip22zilog_port_table[NUM_CHANNELS - 1];
-        up = &ip22zilog_port_table[0];
+	up = &ip22zilog_port_table[0];
 	for (channel = NUM_CHANNELS - 1 ; channel > 0; channel--)
 		up[channel].next = &up[channel - 1];
 	up[channel].next = NULL;
drivers/tty/serial/jsm/jsm_neo.c +1 -1
index bf0e2a4cb0ce..50f805b9a1b1 100644
@@ -29,7 +29,7 @@ static u32 jsm_offset_table[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x8
  */
 static inline void neo_pci_posting_flush(struct jsm_board *bd)
 {
-      readb(bd->re_map_membase + 0x8D);
+	readb(bd->re_map_membase + 0x8D);
 }
 
 static void neo_set_cts_flow_control(struct jsm_channel *ch)
drivers/tty/serial/mux.c +3 -3
index 00ce31e8d19a..880d1b3127c2 100644
@@ -405,7 +405,7 @@ static void mux_console_write(struct console *co, const char *s, unsigned count)
 
 static int mux_console_setup(struct console *co, char *options)
 {
-        return 0;
+	return 0;
 }
 
 static struct console mux_console = {
@@ -457,7 +457,7 @@ static int __init mux_probe(struct parisc_device *dev)
 
 	dev_set_drvdata(&dev->dev, (void *)(long)port_count);
 	request_mem_region(dev->hpa.start + MUX_OFFSET,
-                           port_count * MUX_LINE_OFFSET, "Mux");
+			   port_count * MUX_LINE_OFFSET, "Mux");
 
 	if(!port_cnt) {
 		mux_driver.cons = MUX_CONSOLE;
@@ -576,7 +576,7 @@ static int __init mux_init(void)
 		mod_timer(&mux_timer, jiffies + MUX_POLL_DELAY);
 
 #ifdef CONFIG_SERIAL_MUX_CONSOLE
-	        register_console(&mux_console);
+		register_console(&mux_console);
 #endif
 	}
 
drivers/tty/serial/mxs-auart.c +1 -1
index 27235a526cce..c5869064fd99 100644
@@ -1329,7 +1329,7 @@ static const struct uart_ops mxs_auart_ops = {
 	.shutdown       = mxs_auart_shutdown,
 	.set_termios    = mxs_auart_settermios,
 	.set_ldisc      = mxs_auart_set_ldisc,
-	.type	   	= mxs_auart_type,
+	.type		= mxs_auart_type,
 	.release_port   = mxs_auart_release_port,
 	.request_port   = mxs_auart_request_port,
 	.config_port    = mxs_auart_config_port,
drivers/tty/serial/pmac_zilog.c +2 -2
index a9d40988e1c8..a5558051de74 100644
@@ -1845,7 +1845,7 @@ MODULE_DEVICE_TABLE (of, pmz_match);
 
 static struct macio_driver pmz_driver = {
 	.driver = {
-		.name 		= "pmac_zilog",
+		.name		= "pmac_zilog",
 		.owner		= THIS_MODULE,
 		.of_match_table	= pmz_match,
 	},
@@ -1894,7 +1894,7 @@ static int __init init_pmz(void)
 	if (rc) {
 		printk(KERN_ERR 
 			"pmac_zilog: Error registering serial device, disabling pmac_zilog.\n"
-		 	"pmac_zilog: Did another serial driver already claim the minors?\n"); 
+			"pmac_zilog: Did another serial driver already claim the minors?\n");
 		/* effectively "pmz_unprobe()" */
 		for (i=0; i < pmz_ports_count; i++)
 			pmz_dispose_port(&pmz_ports[i]);
drivers/tty/serial/pxa.c +10 -10
index 4932b674f7ef..dd102571a751 100644
@@ -795,22 +795,22 @@ static struct uart_driver serial_pxa_reg = {
 #ifdef CONFIG_PM
 static int serial_pxa_suspend(struct device *dev)
 {
-        struct uart_pxa_port *sport = dev_get_drvdata(dev);
+	struct uart_pxa_port *sport = dev_get_drvdata(dev);
 
-        if (sport)
-                uart_suspend_port(&serial_pxa_reg, &sport->port);
+	if (sport)
+		uart_suspend_port(&serial_pxa_reg, &sport->port);
 
-        return 0;
+	return 0;
 }
 
 static int serial_pxa_resume(struct device *dev)
 {
-        struct uart_pxa_port *sport = dev_get_drvdata(dev);
+	struct uart_pxa_port *sport = dev_get_drvdata(dev);
 
-        if (sport)
-                uart_resume_port(&serial_pxa_reg, &sport->port);
+	if (sport)
+		uart_resume_port(&serial_pxa_reg, &sport->port);
 
-        return 0;
+	return 0;
 }
 
 static const struct dev_pm_ops serial_pxa_pm_ops = {
@@ -914,10 +914,10 @@ static int serial_pxa_probe(struct platform_device *dev)
 }
 
 static struct platform_driver serial_pxa_driver = {
-        .probe          = serial_pxa_probe,
+	.probe          = serial_pxa_probe,
 
 	.driver		= {
-	        .name	= "pxa2xx-uart",
+		.name	= "pxa2xx-uart",
 #ifdef CONFIG_PM
 		.pm	= &serial_pxa_pm_ops,
 #endif
drivers/tty/serial/serial_txx9.c +1 -1
index 1b4008d022bf..33c630d0f1b2 100644
@@ -1259,7 +1259,7 @@ static int __init serial_txx9_init(void)
 {
 	int ret;
 
- 	printk(KERN_INFO "%s version %s\n", serial_name, serial_version);
+	printk(KERN_INFO "%s version %s\n", serial_name, serial_version);
 
 	ret = uart_register_driver(&serial_txx9_reg);
 	if (ret)
drivers/tty/serial/sn_console.c +19 -19
index fe9170731c16..457a062fffd8 100644
@@ -454,31 +454,31 @@ sn_receive_chars(struct sn_cons_port *port, unsigned long flags)
 			break;
 		}
 #ifdef CONFIG_MAGIC_SYSRQ
-                if (sysrq_requested) {
-                        unsigned long sysrq_timeout = sysrq_requested + HZ*5;
-
-                        sysrq_requested = 0;
-                        if (ch && time_before(jiffies, sysrq_timeout)) {
-                                spin_unlock_irqrestore(&port->sc_port.lock, flags);
-                                handle_sysrq(ch);
-                                spin_lock_irqsave(&port->sc_port.lock, flags);
-                                /* ignore actual sysrq command char */
-                                continue;
-                        }
-                }
-                if (ch == *sysrq_serial_ptr) {
-                        if (!(*++sysrq_serial_ptr)) {
-                                sysrq_requested = jiffies;
-                                sysrq_serial_ptr = sysrq_serial_str;
-                        }
+		if (sysrq_requested) {
+			unsigned long sysrq_timeout = sysrq_requested + HZ*5;
+
+			sysrq_requested = 0;
+			if (ch && time_before(jiffies, sysrq_timeout)) {
+				spin_unlock_irqrestore(&port->sc_port.lock, flags);
+				handle_sysrq(ch);
+				spin_lock_irqsave(&port->sc_port.lock, flags);
+				/* ignore actual sysrq command char */
+				continue;
+			}
+		}
+		if (ch == *sysrq_serial_ptr) {
+			if (!(*++sysrq_serial_ptr)) {
+				sysrq_requested = jiffies;
+				sysrq_serial_ptr = sysrq_serial_str;
+			}
 			/*
 			 * ignore the whole sysrq string except for the
 			 * leading escape
 			 */
 			if (ch != '\e')
 				continue;
-                }
-                else
+		}
+		else
 			sysrq_serial_ptr = sysrq_serial_str;
 #endif /* CONFIG_MAGIC_SYSRQ */
 
drivers/tty/serial/sunsab.c +1 -1
index 72131b5e132e..7744ed852d52 100644
@@ -654,7 +654,7 @@ static void calc_ebrg(int baud, int *n_ret, int *m_ret)
 		*m_ret = 0;
 		return;
 	}
-     
+
 	/*
 	 * We scale numbers by 10 so that we get better accuracy
 	 * without having to use floating point.  Here we increment m
drivers/tty/serial/sunsu.c +2 -2
index 6cf3e9b0728f..1a371c37a644 100644
@@ -74,7 +74,7 @@ static const struct serial_uart_config uart_config[] = {
 	{ "16450",	1,	0 },
 	{ "16550",	1,	0 },
 	{ "16550A",	16,	UART_CLEAR_FIFO | UART_USE_FIFO },
-	{ "Cirrus",	1, 	0 },
+	{ "Cirrus",	1,	0 },
 	{ "ST16650",	1,	UART_CLEAR_FIFO | UART_STARTECH },
 	{ "ST16650V2",	32,	UART_CLEAR_FIFO | UART_USE_FIFO | UART_STARTECH },
 	{ "TI16750",	64,	UART_CLEAR_FIFO | UART_USE_FIFO },
@@ -1138,7 +1138,7 @@ static void sunsu_autoconfig(struct uart_sunsu_port *up)
 			 * mode if the UART_FCR7_64BYTE bit was set
 			 * while UART_LCR_DLAB was latched.
 			 */
- 			serial_outp(up, UART_FCR, UART_FCR_ENABLE_FIFO);
+			serial_outp(up, UART_FCR, UART_FCR_ENABLE_FIFO);
 			serial_outp(up, UART_LCR, 0);
 			serial_outp(up, UART_FCR,
 				    UART_FCR_ENABLE_FIFO | UART_FCR7_64BYTE);
drivers/tty/serial/sunzilog.c +1 -1
index bc7af8b08a72..cb0dbff46db0 100644
@@ -394,7 +394,7 @@ sunzilog_receive_chars(struct uart_sunzilog_port *up,
 
 		if (up->port.ignore_status_mask == 0xff ||
 		    (r1 & up->port.ignore_status_mask) == 0) {
-		    	tty_insert_flip_char(port, ch, flag);
+			tty_insert_flip_char(port, ch, flag);
 		}
 		if (r1 & Rx_OVR)
 			tty_insert_flip_char(port, 0, TTY_OVERRUN);
drivers/tty/serial/ucc_uart.c +67 -67

205 lines not on this page · raw message

drivers/tty/serial/vr41xx_siu.c +1 -1
index 6d106e33f842..277301e9ef77 100644
@@ -500,7 +500,7 @@ static void siu_shutdown(struct uart_port *port)
 }
 
 static void siu_set_termios(struct uart_port *port, struct ktermios *new,
-                            struct ktermios *old)
+			    struct ktermios *old)
 {
 	tcflag_t c_cflag, c_iflag;
 	uint8_t lcr, fcr, ier;
drivers/tty/serial/zs.c +6 -6
index b03d3e458ea2..120da605d0df 100644
@@ -98,7 +98,7 @@ static char zs_version[] __initdata = "0.10";
 #define ZS_CHAN_IO_STRIDE 4		/* Register alignment.  */
 #define ZS_CHAN_IO_OFFSET 1		/* The SCC resides on the high byte
 					   of the 16-bit IOBUS.  */
-#define ZS_CLOCK        7372800 	/* Z85C30 PCLK input clock rate.  */
+#define ZS_CLOCK        7372800	/* Z85C30 PCLK input clock rate.  */
 
 #define to_zport(uport) container_of(uport, struct zs_port, port)
 
@@ -299,11 +299,11 @@ static void load_zsregs(struct zs_port *zport, u8 *regs, int irq)
  * zs_tx_empty() -- get the transmitter empty status
  *
  * Purpose: Let user call ioctl() to get info when the UART physically
- * 	    is emptied.  On bus types like RS485, the transmitter must
- * 	    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.
+ *	    is emptied.  On bus types like RS485, the transmitter must
+ *	    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.
  */
 static unsigned int zs_tx_empty(struct uart_port *uport)
 {
drivers/tty/sysrq.c +17 -17
index 06ed20dd01ba..c87cee67fc15 100644
@@ -512,22 +512,22 @@ static int sysrq_key_table_key2index(int key)
  */
 struct sysrq_key_op *__sysrq_get_key_op(int key)
 {
-        struct sysrq_key_op *op_p = NULL;
-        int i;
+	struct sysrq_key_op *op_p = NULL;
+	int i;
 
 	i = sysrq_key_table_key2index(key);
 	if (i != -1)
-	        op_p = sysrq_key_table[i];
+		op_p = sysrq_key_table[i];
 
-        return op_p;
+	return op_p;
 }
 
 static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p)
 {
-        int i = sysrq_key_table_key2index(key);
+	int i = sysrq_key_table_key2index(key);
 
-        if (i != -1)
-                sysrq_key_table[i] = op_p;
+	if (i != -1)
+		sysrq_key_table[i] = op_p;
 }
 
 void __handle_sysrq(int key, bool check_mask)
@@ -548,8 +548,8 @@ void __handle_sysrq(int key, bool check_mask)
 	console_loglevel = CONSOLE_LOGLEVEL_DEFAULT;
 	pr_info("SysRq : ");
 
-        op_p = __sysrq_get_key_op(key);
-        if (op_p) {
+	op_p = __sysrq_get_key_op(key);
+	if (op_p) {
 		/*
 		 * Should we check for enabled operations (/proc/sysrq-trigger
 		 * should not) and is the invoked operation enabled?
@@ -595,13 +595,13 @@ static int sysrq_reset_downtime_ms;
 
 /* Simple translation table for the SysRq keys */
 static const unsigned char sysrq_xlate[KEY_CNT] =
-        "\000\0331234567890-=\177\t"                    /* 0x00 - 0x0f */
-        "qwertyuiop[]\r\000as"                          /* 0x10 - 0x1f */
-        "dfghjkl;'`\000\\zxcv"                          /* 0x20 - 0x2f */
-        "bnm,./\000*\000 \000\201\202\203\204\205"      /* 0x30 - 0x3f */
-        "\206\207\210\211\212\000\000789-456+1"         /* 0x40 - 0x4f */
-        "230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */
-        "\r\000/";                                      /* 0x60 - 0x6f */
+	"\000\0331234567890-=\177\t"                    /* 0x00 - 0x0f */
+	"qwertyuiop[]\r\000as"                          /* 0x10 - 0x1f */
+	"dfghjkl;'`\000\\zxcv"                          /* 0x20 - 0x2f */
+	"bnm,./\000*\000 \000\201\202\203\204\205"      /* 0x30 - 0x3f */
+	"\206\207\210\211\212\000\000789-456+1"         /* 0x40 - 0x4f */
+	"230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */
+	"\r\000/";                                      /* 0x60 - 0x6f */
 
 struct sysrq_state {
 	struct input_handle handle;
@@ -1055,7 +1055,7 @@ int sysrq_toggle_support(int enable_mask)
 }
 
 static int __sysrq_swap_key_ops(int key, struct sysrq_key_op *insert_op_p,
-                                struct sysrq_key_op *remove_op_p)
+				struct sysrq_key_op *remove_op_p)
 {
 	int retval;
 
drivers/tty/tty_baudrate.c +1 -1
index 7576ceace571..ceee34760c62 100644
@@ -150,7 +150,7 @@ void tty_termios_encode_baud_rate(struct ktermios *termios,
 	int iclose = ibaud/50, oclose = obaud/50;
 	int ibinput = 0;
 
-	if (obaud == 0)			/* CD dropped 		  */
+	if (obaud == 0)			/* CD dropped */
 		ibaud = 0;		/* Clear ibaud to be sure */
 
 	termios->c_ispeed = ibaud;
drivers/tty/tty_io.c +11 -11
index 252eef2c32f9..df94cdbe0096 100644
@@ -33,7 +33,7 @@
  *	-- Nick Holloway <[email protected]>, 27th May 1993.
  *
  * Rewrote canonical mode and added more termios flags.
- * 	-- [email protected] (J. Cowley), 13Jan94
+ *	-- [email protected] (J. Cowley), 13Jan94
  *
  * Reorganized FASYNC support so mouse code can share it.
  *	-- [email protected], 9Sep95
@@ -1023,7 +1023,7 @@ static ssize_t tty_write(struct file *file, const char __user *buf,
 						size_t count, loff_t *ppos)
 {
 	struct tty_struct *tty = file_tty(file);
- 	struct tty_ldisc *ld;
+	struct tty_ldisc *ld;
 	ssize_t ret;
 
 	if (tty_paranoia_check(tty, file_inode(file), "tty_write"))
@@ -1244,8 +1244,8 @@ static void tty_driver_remove_tty(struct tty_driver *driver, struct tty_struct *
 }
 
 /*
- * 	tty_reopen()	- fast re-open of an open tty
- * 	@tty	- the tty to open
+ *	tty_reopen()	- fast re-open of an open tty
+ *	@tty	- the tty to open
  *
  *	Return 0 on success, -errno on error.
  *	Re-opens on master ptys are not allowed and return -EIO.
@@ -1811,8 +1811,8 @@ static struct tty_struct *tty_open_current_tty(dev_t device, struct file *filp)
  *	@index: index for the device in the @return driver
  *	@return: driver for this inode (with increased refcount)
  *
- * 	If @return is not erroneous, the caller is responsible to decrement the
- * 	refcount by tty_driver_kref_put.
+ *	If @return is not erroneous, the caller is responsible to decrement the
+ *	refcount by tty_driver_kref_put.
  *
  *	Locking: tty_mutex protects get_tty_driver
  */
@@ -2624,7 +2624,7 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	case TIOCGICOUNT:
 		retval = tty_tiocgicount(tty, p);
 		/* For the moment allow fall through to the old method */
-        	if (retval != -EINVAL)
+		if (retval != -EINVAL)
 			return retval;
 		break;
 	case TCFLSH:
@@ -3013,11 +3013,11 @@ struct device *tty_register_device_attr(struct tty_driver *driver,
 EXPORT_SYMBOL_GPL(tty_register_device_attr);
 
 /**
- * 	tty_unregister_device - unregister a tty device
- * 	@driver: the tty driver that describes the tty device
- * 	@index: the index in the tty driver for this tty device
+ *	tty_unregister_device - unregister a tty device
+ *	@driver: the tty driver that describes the tty device
+ *	@index: the index in the tty driver for this tty device
  *
- * 	If a tty device is registered with a call to tty_register_device() then
+ *	If a tty device is registered with a call to tty_register_device() then
  *	this function must be called when the tty device is gone.
  *
  *	Locking: ??
drivers/tty/tty_ioctl.c +1 -1
index d99fec44036c..f9bcae2b7e36 100644
@@ -72,7 +72,7 @@ EXPORT_SYMBOL(tty_chars_in_buffer);
  *	the number of bytes written. If no method is provided 2K is always
  *	returned and data may be lost as there will be no flow control.
  */
- 
+
 int tty_write_room(struct tty_struct *tty)
 {
 	if (tty->ops->write_room)
drivers/tty/tty_jobctrl.c +4 -4
index c4ecd66fafef..6155cc7b3f56 100644
@@ -238,10 +238,10 @@ int tty_signal_session_leader(struct tty_struct *tty, int exit_session)
  *	it wants to disassociate itself from its controlling tty.
  *
  *	It performs the following functions:
- * 	(1)  Sends a SIGHUP and SIGCONT to the foreground process group
- * 	(2)  Clears the tty from being controlling the session
- * 	(3)  Clears the controlling tty for all processes in the
- * 		session group.
+ *	(1)  Sends a SIGHUP and SIGCONT to the foreground process group
+ *	(2)  Clears the tty from being controlling the session
+ *	(3)  Clears the controlling tty for all processes in the
+ *		session group.
  *
  *	The argument on_exit is set to 1 if called when a process is
  *	exiting; it is 0 if called by the ioctl TIOCNOTTY.
drivers/tty/vt/consolemap.c +3 -3
index 7c7ada0b3ea0..97d02684b922 100644
@@ -187,7 +187,7 @@ static unsigned short translations[][256] = {
 static int inv_translate[MAX_NR_CONSOLES];
 
 struct uni_pagedir {
-	u16 		**uni_pgdir[32];
+	u16		**uni_pgdir[32];
 	unsigned long	refcount;
 	unsigned long	sum;
 	unsigned char	*inverse_translations[4];
@@ -215,7 +215,7 @@ static void set_inverse_transl(struct vc_data *conp, struct uni_pagedir *p, int
 		glyph = conv_uni_to_pc(conp, t[j]);
 		if (glyph >= 0 && glyph < MAX_GLYPH && q[glyph] < 32) {
 			/* prefer '-' above SHY etc. */
-		  	q[glyph] = j;
+			q[glyph] = j;
 		}
 	}
 }
@@ -249,7 +249,7 @@ static void set_inverse_trans_unicode(struct vc_data *conp,
 				glyph = p2[k];
 				if (glyph >= 0 && glyph < MAX_GLYPH
 					       && q[glyph] < 32)
-		  			q[glyph] = (i << 11) + (j << 6) + k;
+					q[glyph] = (i << 11) + (j << 6) + k;
 			}
 		}
 	}
drivers/tty/vt/keyboard.c +15 -14
index 88312c6c92cc..214ad559fd2d 100644
@@ -1110,8 +1110,9 @@ static unsigned char getledstate(void)
 
 void setledstate(struct kbd_struct *kb, unsigned int led)
 {
-        unsigned long flags;
-        spin_lock_irqsave(&led_lock, flags);
+	unsigned long flags;
+
+	spin_lock_irqsave(&led_lock, flags);
 	if (!(led & ~7)) {
 		ledioctl = led;
 		kb->ledmode = LED_SHOW_IOCTL;
@@ -2047,7 +2048,7 @@ int vt_do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm)
 			fj = first_free;
 
 		delta = (q ? -strlen(q) : 1) + strlen(kbs->kb_string);
-		if (delta <= funcbufleft) { 	/* it fits in current buf */
+		if (delta <= funcbufleft) {	/* it fits in current buf */
 		    if (j < MAX_NR_FUNC) {
 			memmove(fj + delta, fj, first_free - fj);
 			for (k = j; k < MAX_NR_FUNC; k++)
@@ -2099,16 +2100,16 @@ int vt_do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm)
 int vt_do_kdskled(int console, int cmd, unsigned long arg, int perm)
 {
 	struct kbd_struct *kb = kbd_table + console;
-        unsigned long flags;
+	unsigned long flags;
 	unsigned char ucval;
 
-        switch(cmd) {
+	switch(cmd) {
 	/* the ioctls below read/set the flags usually shown in the leds */
 	/* don't use them - they will go away without warning */
 	case KDGKBLED:
-                spin_lock_irqsave(&kbd_event_lock, flags);
+		spin_lock_irqsave(&kbd_event_lock, flags);
 		ucval = kb->ledflagstate | (kb->default_ledflagstate << 4);
-                spin_unlock_irqrestore(&kbd_event_lock, flags);
+		spin_unlock_irqrestore(&kbd_event_lock, flags);
 		return put_user(ucval, (char __user *)arg);
 
 	case KDSKBLED:
@@ -2116,11 +2117,11 @@ int vt_do_kdskled(int console, int cmd, unsigned long arg, int perm)
 			return -EPERM;
 		if (arg & ~0x77)
 			return -EINVAL;
-                spin_lock_irqsave(&led_lock, flags);
+		spin_lock_irqsave(&led_lock, flags);
 		kb->ledflagstate = (arg & 7);
 		kb->default_ledflagstate = ((arg >> 4) & 7);
 		set_leds();
-                spin_unlock_irqrestore(&led_lock, flags);
+		spin_unlock_irqrestore(&led_lock, flags);
 		return 0;
 
 	/* the ioctls below only set the lights, not the functions */
@@ -2134,8 +2135,8 @@ int vt_do_kdskled(int console, int cmd, unsigned long arg, int perm)
 			return -EPERM;
 		setledstate(kb, arg);
 		return 0;
-        }
-        return -ENOIOCTLCMD;
+	}
+	return -ENOIOCTLCMD;
 }
 
 int vt_do_kdgkbmode(int console)
@@ -2165,7 +2166,7 @@ int vt_do_kdgkbmode(int console)
 int vt_do_kdgkbmeta(int console)
 {
 	struct kbd_struct *kb = kbd_table + console;
-        /* Again a spot read so no locking */
+	/* Again a spot read so no locking */
 	return vc_kbd_mode(kb, VC_META) ? K_ESCPREFIX : K_METABIT;
 }
 
@@ -2192,8 +2193,8 @@ void vt_reset_unicode(int console)
  */
 int vt_get_shift_state(void)
 {
-        /* Don't lock as this is a transient report */
-        return shift_state;
+	/* Don't lock as this is a transient report */
+	return shift_state;
 }
 
 /**
drivers/tty/vt/selection.c +6 -6
index 07496c711d7d..75aa58ea79b6 100644
@@ -37,7 +37,7 @@ extern void poke_blanked_console(void);
 /* Use a dynamic buffer, instead of static (Dec 1994) */
 struct vc_data *sel_cons;		/* must not be deallocated */
 static int use_unicode;
-static volatile int sel_start = -1; 	/* cleared by clear_selection */
+static volatile int sel_start = -1;	/* cleared by clear_selection */
 static int sel_end;
 static int sel_buffer_lth;
 static char *sel_buffer;
@@ -86,10 +86,10 @@ void clear_selection(void)
  * 128 bits. Locked by the console lock.
  */
 static u32 inwordLut[]={
-  0x00000000, /* control chars     */
-  0x03FFE000, /* digits and "-./"  */
-  0x87FFFFFE, /* uppercase and '_' */
-  0x07FFFFFE, /* lowercase         */
+	0x00000000, /* control chars     */
+	0x03FFE000, /* digits and "-./"  */
+	0x87FFFFFE, /* uppercase and '_' */
+	0x07FFFFFE, /* lowercase         */
 };
 
 static inline int inword(const u32 c)
@@ -154,7 +154,7 @@ static int store_utf8(u32 c, char *p)
 }
 
 /**
- *	set_selection		- 	set the current selection.
+ *	set_selection		-	set the current selection.
  *	@sel: user selection info
  *	@tty: the console tty
  *
drivers/tty/vt/vt.c +20 -20
index 5f1183b0b89d..94131c746ef7 100644
@@ -700,7 +700,7 @@ void update_region(struct vc_data *vc, unsigned long start, int count)
 /* Structure of attributes is hardware-dependent */
 
 static u8 build_attr(struct vc_data *vc, u8 _color, u8 _intensity, u8 _blink,
-    u8 _underline, u8 _reverse, u8 _italic)
+		     u8 _underline, u8 _reverse, u8 _italic)
 {
 	if (vc->vc_sw->con_build_attr)
 		return vc->vc_sw->con_build_attr(vc, _color, _intensity,
@@ -1399,7 +1399,7 @@ static void gotoxy(struct vc_data *vc, int new_x, int new_y)
 			vc->vc_x = new_x;
 	}
 
- 	if (vc->vc_decom) {
+	if (vc->vc_decom) {
 		min_y = vc->vc_top;
 		max_y = vc->vc_bottom;
 	} else {
@@ -1436,13 +1436,13 @@ void scrollfront(struct vc_data *vc, int lines)
 
 static void lf(struct vc_data *vc)
 {
-    	/* don't scroll if above bottom of scrolling region, or
+	/* don't scroll if above bottom of scrolling region, or
 	 * if below scrolling region
 	 */
-    	if (vc->vc_y + 1 == vc->vc_bottom)
+	if (vc->vc_y + 1 == vc->vc_bottom)
 		con_scroll(vc, vc->vc_top, vc->vc_bottom, SM_UP, 1);
 	else if (vc->vc_y < vc->vc_rows - 1) {
-	    	vc->vc_y++;
+		vc->vc_y++;
 		vc->vc_pos += vc->vc_size_row;
 	}
 	vc->vc_need_wrap = 0;
@@ -1451,7 +1451,7 @@ static void lf(struct vc_data *vc)
 
 static void ri(struct vc_data *vc)
 {
-    	/* don't scroll if below top of scrolling region, or
+	/* don't scroll if below top of scrolling region, or
 	 * if above scrolling region
 	 */
 	if (vc->vc_y == vc->vc_top)
@@ -2653,17 +2653,17 @@ static int do_con_write(struct tty_struct *tty, const unsigned char *buf, int co
 					&param) == NOTIFY_STOP)
 			continue;
 
-                /* If the original code was a control character we
-                 * only allow a glyph to be displayed if the code is
-                 * not normally used (such as for cursor movement) or
-                 * if the disp_ctrl mode has been explicitly enabled.
-                 * Certain characters (as given by the CTRL_ALWAYS
-                 * bitmap) are always displayed as control characters,
-                 * as the console would be pretty useless without
-                 * them; to display an arbitrary font position use the
-                 * direct-to-font zone in UTF-8 mode.
-                 */
-                ok = tc && (c >= 32 ||
+		/* If the original code was a control character we
+		 * only allow a glyph to be displayed if the code is
+		 * not normally used (such as for cursor movement) or
+		 * if the disp_ctrl mode has been explicitly enabled.
+		 * Certain characters (as given by the CTRL_ALWAYS
+		 * bitmap) are always displayed as control characters,
+		 * as the console would be pretty useless without
+		 * them; to display an arbitrary font position use the
+		 * direct-to-font zone in UTF-8 mode.
+		 */
+		ok = tc && (c >= 32 ||
 			    !(vc->vc_disp_ctrl ? (CTRL_ALWAYS >> c) & 1 :
 				  vc->vc_utf || ((CTRL_ACTION >> c) & 1)))
 			&& (c != 127 || vc->vc_disp_ctrl)
@@ -2847,7 +2847,7 @@ struct tty_driver *console_driver;
 /**
  * vt_kmsg_redirect() - Sets/gets the kernel message console
  * @new:	The new virtual terminal number or -1 if the console should stay
- * 		unchanged
+ *		unchanged
  *
  * By default, the kernel messages are always printed on the current virtual
  * console. However, the user may modify that default with the
@@ -3636,7 +3636,7 @@ static int vt_bind(struct con_driver *con)
 	const struct consw *defcsw = NULL, *csw = NULL;
 	int i, more = 1, first = -1, last = -1, deflt = 0;
 
- 	if (!con->con || !(con->flag & CON_DRIVER_FLAG_MODULE))
+	if (!con->con || !(con->flag & CON_DRIVER_FLAG_MODULE))
 		goto err;
 
 	csw = con->con;
@@ -3687,7 +3687,7 @@ static int vt_unbind(struct con_driver *con)
 	int i, more = 1, first = -1, last = -1, deflt = 0;
 	int ret;
 
- 	if (!con->con || !(con->flag & CON_DRIVER_FLAG_MODULE))
+	if (!con->con || !(con->flag & CON_DRIVER_FLAG_MODULE))
 		goto err;
 
 	csw = con->con;
drivers/tty/vt/vt_ioctl.c +7 -7
index 73cdc0d633dd..30e02ec5d6a0 100644
@@ -230,7 +230,7 @@ do_fontx_ioctl(int cmd, struct consolefontdesc __user *user_cfd, int perm, struc
 
 	if (copy_from_user(&cfdarg, user_cfd, sizeof(struct consolefontdesc))) 
 		return -EFAULT;
- 	
+
 	switch (cmd) {
 	case PIO_FONTX:
 		if (!perm)
@@ -345,7 +345,7 @@ int vt_ioctl(struct tty_struct *tty,
 	console = vc->vc_num;
 
 
-	if (!vc_cons_allocated(console)) { 	/* impossible? */
+	if (!vc_cons_allocated(console)) {	/* impossible? */
 		ret = -ENOIOCTLCMD;
 		goto out;
 	}
@@ -358,7 +358,7 @@ int vt_ioctl(struct tty_struct *tty,
 	perm = 0;
 	if (current->signal->tty == tty || capable(CAP_SYS_TTY_CONFIG))
 		perm = 1;
- 
+
 	switch (cmd) {
 	case TIOCLINUX:
 		ret = tioclinux(tty, arg);
@@ -915,14 +915,14 @@ int vt_ioctl(struct tty_struct *tty,
 	}
 
 	case PIO_CMAP:
-                if (!perm)
+		if (!perm)
 			ret = -EPERM;
 		else
-	                ret = con_set_cmap(up);
+			ret = con_set_cmap(up);
 		break;
 
 	case GIO_CMAP:
-                ret = con_get_cmap(up);
+		ret = con_get_cmap(up);
 		break;
 
 	case PIO_FONTX:
@@ -1182,7 +1182,7 @@ long vt_compat_ioctl(struct tty_struct *tty,
 
 	console = vc->vc_num;
 
-	if (!vc_cons_allocated(console)) { 	/* impossible? */
+	if (!vc_cons_allocated(console)) {	/* impossible? */
 		ret = -ENOIOCTLCMD;
 		goto out;
 	}
Signature · 1 line
2.17.1
#3 lore raw

PATCH v2 2/7 tty: Remove trailing whitespace

In reply to Tobin C. Harding

Currently files under drivers/tty/ contain trailing whitespace. This is easy to fix and easy to review so lets do it now before we do other kernel-docs cleanups.

---
 drivers/tty/amiserial.c         |   19 +-
 drivers/tty/cyclades.c          |    2 +-
 drivers/tty/hvc/hvc_console.c   |    2 +-
 drivers/tty/hvc/hvc_xen.c       |    2 +-
 drivers/tty/hvc/hvcs.c          |    4 +-
 drivers/tty/moxa.c              |    8 +-
 drivers/tty/mxser.c             |    4 +-
 drivers/tty/n_hdlc.c            |  154 ++---
 drivers/tty/n_r3964.c           |    6 +-
 drivers/tty/rocket.c            |   70 +--
 drivers/tty/serial/21285.c      |    2 +-
 drivers/tty/serial/amba-pl010.c |    2 +-
 drivers/tty/serial/max3100.c    |    2 +-
 drivers/tty/serial/max310x.c    |    2 +-
 drivers/tty/serial/mux.c        |   12 +-
 drivers/tty/serial/pmac_zilog.c |   58 +-
 drivers/tty/serial/sa1100.c     |    2 +-
 drivers/tty/serial/sunsab.c     |   14 +-
 drivers/tty/serial/sunsu.c      |    4 +-
 drivers/tty/serial/sunzilog.c   |    8 +-
 drivers/tty/synclink.c          | 1016 +++++++++++++++----------------
 drivers/tty/synclinkmp.c        |   16 +-
 drivers/tty/tty_io.c            |    2 +-
 drivers/tty/tty_ioctl.c         |    2 +-
 drivers/tty/vt/consolemap.c     |   50 +-
 drivers/tty/vt/keyboard.c       |    2 +-
 drivers/tty/vt/vt.c             |   12 +-
 drivers/tty/vt/vt_ioctl.c       |   16 +-
 28 files changed, 746 insertions(+), 747 deletions(-)
drivers/tty/amiserial.c +9 -10
index 73d4033cef6b..7027b85e0428 100644
@@ -17,7 +17,7 @@
  * Richard Lucock 28/12/99
  *
  *  Copyright (C) 1991, 1992  Linus Torvalds
- *  Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 
+ *  Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997,
  *		1998, 1999  Theodore Ts'o
  *
  */
@@ -239,7 +239,7 @@ static void rs_start(struct tty_struct *tty)
  * rs_interrupt() should try to keep the interrupt handler as fast as
  * possible.  After you are done making modifications, it is not a bad
  * idea to do:
- * 
+ *
  * gcc -S -DKERNEL -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer serial.c
  *
  * and look at the resulting assemble code in serial.s.
@@ -746,7 +746,7 @@ static void change_speed(struct tty_struct *tty, struct serial_state *info,
 	if (I_IGNBRK(tty)) {
 		info->ignore_status_mask |= UART_LSR_BI;
 		/*
-		 * If we're ignore parity and break indicators, ignore 
+		 * If we're ignore parity and break indicators, ignore
 		 * overruns too.  (For real raw support).
 		 */
 		if (I_IGNPAR(tty))
@@ -940,7 +940,7 @@ static void rs_send_xchar(struct tty_struct *tty, char ch)
 /*
  * ------------------------------------------------------------
  * rs_throttle()
- * 
+ *
  * This routine is called by the upper-layer tty layer to signal that
  * incoming characters should be throttled.
  * ------------------------------------------------------------
@@ -1085,7 +1085,6 @@ static int set_serial_info(struct tty_struct *tty, struct serial_state *state,
 	return retval;
 }
 
-
 /*
  * get_lsr_info - get line status register info
  *
@@ -1266,7 +1265,7 @@ static int rs_ioctl(struct tty_struct *tty,
 				local_irq_save(flags);
 				cnow = info->icount; /* atomic copy */
 				local_irq_restore(flags);
-				if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr && 
+				if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr &&
 				    cnow.dcd == cprev.dcd && cnow.cts == cprev.cts) {
 					ret = -EIO; /* no change => error */
 					break;
@@ -1348,7 +1347,7 @@ static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 /*
  * ------------------------------------------------------------
  * 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
  * async structure from the interrupt chain if necessary, and we free
@@ -1390,7 +1389,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
 	}
 	shutdown(tty, state);
 	rs_flush_buffer(tty);
-		
+
 	tty_ldisc_flush(tty);
 	port->tty = NULL;
 
@@ -1418,7 +1417,7 @@ static void rs_wait_until_sent(struct tty_struct *tty, int timeout)
 	 * Set the check interval to be 1/5 of the estimated time to
 	 * send a single character, and make it at least 1.  The check
 	 * interval should also be less than the timeout.
-	 * 
+	 *
 	 * Note: we have to use pretty tight timings here to satisfy
 	 * the NIST-PCTS.
 	 */
@@ -1669,7 +1668,7 @@ static int __init amiga_serial_probe(struct platform_device *pdev)
 	state = rs_table;
 	state->port = (int)&custom.serdatr; /* Just to give it a value */
 	state->custom_divisor = 0;
-	state->icount.cts = state->icount.dsr = 
+	state->icount.cts = state->icount.dsr =
 	  state->icount.rng = state->icount.dcd = 0;
 	state->icount.rx = state->icount.tx = 0;
 	state->icount.frame = state->icount.parity = 0;
drivers/tty/cyclades.c +1 -1
index 6d3c58051ce3..c82fce6f39ed 100644
@@ -1028,7 +1028,7 @@ static void cyz_handle_tx(struct cyclades_port *info)
 
 	if (!char_count)
 		return;
-		
+
 	tty = tty_port_tty_get(&info->port);
 	if (tty == NULL)
 		goto ztxdone;
drivers/tty/hvc/hvc_console.c +1 -1
index 676cf5b73ed2..6d57d0bfff5d 100644
@@ -204,7 +204,7 @@ static struct tty_driver *hvc_console_device(struct console *c, int *index)
 }
 
 static int hvc_console_setup(struct console *co, char *options)
-{	
+{
 	if (co->index < 0 || co->index >= MAX_NR_HVC_CONSOLES)
 		return -ENODEV;
 
drivers/tty/hvc/hvc_xen.c +1 -1
index dc43fa96c3de..2c32dd544829 100644
@@ -114,7 +114,7 @@ static int domU_write_console(uint32_t vtermno, const char *data, int len)
 	 */
 	while (len) {
 		int sent = __write_console(cons, data, len);
-		
+
 		data += sent;
 		len -= sent;
 
drivers/tty/hvc/hvcs.c +2 -2
index cb4db1b3ca3c..2420068d69d8 100644
@@ -153,8 +153,8 @@ MODULE_VERSION(HVCS_DRIVER_VERSION);
 /*
  * The hcall interface involves putting 8 chars into each of two registers.
  * We load up those 2 registers (in arch/powerpc/platforms/pseries/hvconsole.c)
- * by casting char[16] to long[2].  It would work without __ALIGNED__, but a 
- * little (tiny) bit slower because an unaligned load is slower than aligned 
+ * by casting char[16] to long[2].  It would work without __ALIGNED__, but a
+ * little (tiny) bit slower because an unaligned load is slower than aligned
  * load.
  */
 #define __ALIGNED__	__attribute__((__aligned__(8)))
drivers/tty/moxa.c +4 -4
index 7ce06f43b6ae..91c3599a93d4 100644
@@ -1635,10 +1635,10 @@ static void MoxaPortFlushData(struct moxa_port *port, int mode)
  *      Syntax:
  *      void MoxaPortFlushData(int port, int mode);
  *           int port           : port number (0 - 127)
- *           int mode    
- *                      0       : flush the Rx buffer 
- *                      1       : flush the Tx buffer 
- *                      2       : flush the Rx and Tx buffer 
+ *           int mode
+ *                      0       : flush the Rx buffer
+ *                      1       : flush the Tx buffer
+ *                      2       : flush the Rx and Tx buffer
  *
  *
  *      Function 20:    Write data.
drivers/tty/mxser.c +2 -2
index 3f800b35689e..aac8c747e85a 100644
@@ -1089,7 +1089,7 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
 	mutex_unlock(&port->mutex);
 	info->closing = 0;
 	/* Right now the tty_port set is done outside of the close_end helper
-	   as we don't yet have everyone using refcounts */	
+	   as we don't yet have everyone using refcounts */
 	tty_port_close_end(port, tty);
 	tty_port_tty_set(port, NULL);
 }
@@ -1517,7 +1517,7 @@ static int mxser_ioctl_special(unsigned int cmd, void __user *argp)
 				mutex_lock(&port->mutex);
 				if (!ip->ioaddr)
 					goto copy;
-				
+
 				tty = tty_port_tty_get(port);
 
 				if (!tty)
drivers/tty/n_hdlc.c +77 -77

449 lines not on this page · raw message

drivers/tty/n_r3964.c +3 -3
index dbf1ab36758e..84f4f4f9b7c1 100644
@@ -2,7 +2,7 @@
 /* r3964 linediscipline for linux
  *
  * -----------------------------------------------------------
- * Copyright by 
+ * Copyright by
  * Philips Automation Projects
  * Kassel (Germany)
  * -----------------------------------------------------------
@@ -1126,8 +1126,8 @@ static ssize_t r3964_write(struct tty_struct *tty, struct file *file,
 	unsigned char *new_data;
 
 	TRACE_L("write request, %d characters", count);
-/* 
- * Verify the pointers 
+/*
+ * Verify the pointers
  */
 
 	if (!pInfo)
drivers/tty/rocket.c +35 -35

219 lines not on this page · raw message

drivers/tty/serial/21285.c +1 -1
index 32b3acf8150a..6176f5e8b228 100644
@@ -227,7 +227,7 @@ serial21285_set_termios(struct uart_port *port, struct ktermios *termios,
 	/*
 	 * Ask the core to calculate the divisor for us.
 	 */
-	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); 
+	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
 	quot = uart_get_divisor(port, baud);
 	b = port->uartclk / (16 * quot);
 	tty_termios_encode_baud_rate(termios, b, b);
drivers/tty/serial/amba-pl010.c +1 -1
index 2c37d11726ab..fa49f25a7fbc 100644
@@ -390,7 +390,7 @@ pl010_set_termios(struct uart_port *port, struct ktermios *termios,
 	/*
 	 * Ask the core to calculate the divisor for us.
 	 */
-	baud = uart_get_baud_rate(port, termios, old, 0, uap->port.uartclk/16); 
+	baud = uart_get_baud_rate(port, termios, old, 0, uap->port.uartclk/16);
 	quot = uart_get_divisor(port, baud);
 
 	switch (termios->c_cflag & CSIZE) {
drivers/tty/serial/max3100.c +1 -1
index 371569a0fd00..95090a6ad6c4 100644
@@ -826,7 +826,7 @@ static int max3100_remove(struct spi_device *spi)
 		}
 
 	WARN_ON(i == MAX_MAX3100);
-	
+
 	/* check if this is the last chip we have */
 	for (i = 0; i < MAX_MAX3100; i++)
 		if (max3100s[i]) {
drivers/tty/serial/max310x.c +1 -1
index 3db48fcd6068..aae234b14be6 100644
@@ -386,7 +386,7 @@ static int max14830_detect(struct device *dev)
 			   MAX310X_EXTREG_ENBL);
 	if (ret)
 		return ret;
-	
+
 	regmap_read(s->regmap, MAX310X_REVID_EXTREG, &val);
 	regmap_write(s->regmap, MAX310X_GLOBALCMD_REG, MAX310X_EXTREG_DSBL);
 	if (((val & MAX310x_REV_MASK) != MAX14830_REV_ID)) {
drivers/tty/serial/mux.c +6 -6
index 880d1b3127c2..f7d67125675e 100644
@@ -108,7 +108,7 @@ static int __init get_mux_port_count(struct parisc_device *dev)
 static unsigned int mux_tx_empty(struct uart_port *port)
 {
 	return UART_GET_FIFO_CNT(port) ? 0 : TIOCSER_TEMT;
-} 
+}
 
 /**
  * mux_set_mctrl - Set the current state of the modem control inputs.
@@ -130,7 +130,7 @@ static void mux_set_mctrl(struct uart_port *port, unsigned int mctrl)
  * treated as permanently active.
  */
 static unsigned int mux_get_mctrl(struct uart_port *port)
-{ 
+{
 	return TIOCM_CAR | TIOCM_DSR | TIOCM_CTS;
 }
 
@@ -209,7 +209,7 @@ static void mux_write(struct uart_port *port)
 
 	} while(--count > 0);
 
-	while(UART_GET_FIFO_CNT(port)) 
+	while(UART_GET_FIFO_CNT(port))
 		udelay(1);
 
 	if(uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
@@ -254,7 +254,7 @@ static void mux_read(struct uart_port *port)
 
 		tty_insert_flip_char(tport, data & 0xFF, TTY_NORMAL);
 	}
-	
+
 	if (start_count != port->icount.rx)
 		tty_flip_buffer_push(tport);
 }
@@ -312,7 +312,7 @@ static const char *mux_type(struct uart_port *port)
 /**
  * mux_release_port - Release memory and IO regions.
  * @port: Ptr to the uart_port.
- * 
+ *
  * Release any memory and IO region resources currently in use by
  * the port.
  */
@@ -372,7 +372,7 @@ static int mux_verify_port(struct uart_port *port, struct serial_struct *ser)
  * This function periodically polls the Serial MUX to check for new data.
  */
 static void mux_poll(struct timer_list *unused)
-{  
+{
 	int i;
 
 	for(i = 0; i < port_cnt; ++i) {
drivers/tty/serial/pmac_zilog.c +29 -29

226 lines not on this page · raw message

drivers/tty/serial/sa1100.c +1 -1
index a399772be3fc..ef20d42c321c 100644
@@ -436,7 +436,7 @@ sa1100_set_termios(struct uart_port *port, struct ktermios *termios,
 	/*
 	 * Ask the core to calculate the divisor for us.
 	 */
-	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); 
+	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
 	quot = uart_get_divisor(port, baud);
 
 	spin_lock_irqsave(&sport->port.lock, flags);
drivers/tty/serial/sunsab.c +7 -7
index 7744ed852d52..680df0e62bda 100644
@@ -447,7 +447,7 @@ static void sunsab_start_tx(struct uart_port *port)
 
 	up->interrupt_mask1 &= ~(SAB82532_IMR1_ALLS|SAB82532_IMR1_XPR);
 	writeb(up->interrupt_mask1, &up->regs->w.imr1);
-	
+
 	if (!test_bit(SAB82532_XPR, &up->irqflags))
 		return;
 
@@ -554,7 +554,7 @@ static int sunsab_startup(struct uart_port *port)
 	(void) readb(&up->regs->r.isr1);
 
 	/*
-	 * Now, initialize the UART 
+	 * Now, initialize the UART
 	 */
 	writeb(0, &up->regs->w.ccr0);				/* power-down */
 	writeb(SAB82532_CCR0_MCE | SAB82532_CCR0_SC_NRZ |
@@ -568,7 +568,7 @@ static int sunsab_startup(struct uart_port *port)
 			   SAB82532_MODE_RAC);
 	writeb(up->cached_mode, &up->regs->w.mode);
 	writeb(SAB82532_RFC_DPS|SAB82532_RFC_RFTH_32, &up->regs->w.rfc);
-	
+
 	tmp = readb(&up->regs->rw.ccr0);
 	tmp |= SAB82532_CCR0_PU;	/* power-up */
 	writeb(tmp, &up->regs->rw.ccr0);
@@ -612,7 +612,7 @@ static void sunsab_shutdown(struct uart_port *port)
 	up->cached_dafo &= ~SAB82532_DAFO_XBRK;
 	writeb(up->cached_dafo, &up->regs->rw.dafo);
 
-	/* Disable Receiver */	
+	/* Disable Receiver */
 	up->cached_mode &= ~SAB82532_MODE_RAC;
 	writeb(up->cached_mode, &up->regs->rw.mode);
 
@@ -627,7 +627,7 @@ static void sunsab_shutdown(struct uart_port *port)
 	 * speed the chip was configured for when the port was open).
 	 */
 #if 0
-	/* Power Down */	
+	/* Power Down */
 	tmp = readb(&up->regs->rw.ccr0);
 	tmp &= ~SAB82532_CCR0_PU;
 	writeb(tmp, &up->regs->rw.ccr0);
@@ -797,7 +797,7 @@ static const char *sunsab_type(struct uart_port *port)
 {
 	struct uart_sunsab_port *up = (void *)port;
 	static char buf[36];
-	
+
 	sprintf(buf, "SAB82532 %s", sab82532_version[up->type]);
 	return buf;
 }
@@ -942,7 +942,7 @@ static int sunsab_console_setup(struct console *con, char *options)
 	sunsab_set_mctrl(&up->port, TIOCM_DTR | TIOCM_RTS);
 
 	spin_unlock_irqrestore(&up->port.lock, flags);
-	
+
 	return 0;
 }
 
drivers/tty/serial/sunsu.c +2 -2
index 1a371c37a644..a2b9b963d521 100644
@@ -913,7 +913,7 @@ sunsu_set_termios(struct uart_port *port, struct ktermios *termios,
 	/*
 	 * Ask the core to calculate the divisor for us.
 	 */
-	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); 
+	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
 	quot = uart_get_divisor(port, baud);
 
 	sunsu_change_speed(port, termios->c_cflag, termios->c_iflag, quot);
@@ -1079,7 +1079,7 @@ static void sunsu_autoconfig(struct uart_sunsu_port *up)
 	save_mcr = serial_in(up, UART_MCR);
 	save_lcr = serial_in(up, UART_LCR);
 
-	/* 
+	/*
 	 * Check to see if a UART is really there.  Certain broken
 	 * internal modems based on the Rockwell chipset fail this
 	 * test, because they apparently don't implement the loopback
drivers/tty/serial/sunzilog.c +4 -4
index cb0dbff46db0..801856a2c2db 100644
@@ -228,7 +228,7 @@ static int __load_zsregs(struct zilog_channel __iomem *channel, unsigned char *r
 	/* Lower and upper byte of baud rate generator divisor.  */
 	write_zsreg(channel, R12, regs[R12]);
 	write_zsreg(channel, R13, regs[R13]);
-	
+
 	/* Now rewrite R14, with BRENAB (if set).  */
 	write_zsreg(channel, R14, regs[R14]);
 
@@ -661,7 +661,7 @@ static void sunzilog_set_mctrl(struct uart_port *port, unsigned int mctrl)
 	else
 		clear_bits |= DTR;
 
-	/* NOTE: Not subject to 'transmitter active' rule.  */ 
+	/* NOTE: Not subject to 'transmitter active' rule.  */
 	up->curregs[R5] |= set_bits;
 	up->curregs[R5] &= ~clear_bits;
 	write_zsreg(channel, R5, up->curregs[R5]);
@@ -749,7 +749,7 @@ static void sunzilog_enable_ms(struct uart_port *port)
 	if (new_reg != up->curregs[R15]) {
 		up->curregs[R15] = new_reg;
 
-		/* NOTE: Not subject to 'transmitter active' rule.  */ 
+		/* NOTE: Not subject to 'transmitter active' rule.  */
 		write_zsreg(channel, R15, up->curregs[R15] & ~WR7pEN);
 	}
 }
@@ -776,7 +776,7 @@ static void sunzilog_break_ctl(struct uart_port *port, int break_state)
 	if (new_reg != up->curregs[R5]) {
 		up->curregs[R5] = new_reg;
 
-		/* NOTE: Not subject to 'transmitter active' rule.  */ 
+		/* NOTE: Not subject to 'transmitter active' rule.  */
 		write_zsreg(channel, R5, up->curregs[R5]);
 	}
 
drivers/tty/synclink.c +508 -508

1,753 lines not on this page · raw message

drivers/tty/synclinkmp.c +8 -8
index 1e4d5b9c981a..58570451d0be 100644

Lines of this file are not shown. View the raw message.

drivers/tty/tty_io.c +1 -1
index df94cdbe0096..6e47e9a5e86d 100644

Lines of this file are not shown. View the raw message.

drivers/tty/tty_ioctl.c +1 -1
index f9bcae2b7e36..56426611050d 100644

Lines of this file are not shown. View the raw message.

drivers/tty/vt/consolemap.c +25 -25

50 lines not on this page · raw message

drivers/tty/vt/keyboard.c +1 -1
index 214ad559fd2d..4d044bc7122f 100644

Lines of this file are not shown. View the raw message.

drivers/tty/vt/vt.c +6 -6
index 94131c746ef7..27f0f19a4c31 100644

Lines of this file are not shown. View the raw message.

drivers/tty/vt/vt_ioctl.c +8 -8
index 30e02ec5d6a0..801f2f6e1302 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.17.1

Part of the diff is not shown here. View the raw message.

#5 lore raw

PATCH v2 4/7 tty: Fix kernel-doc variable typos

In reply to Tobin C. Harding

There are a few typos in the kernel-doc variables [descriptions]. Fix these by using the correct variable name and adding a description.

Fix kernel-doc variable typos.

---
 drivers/tty/serial/men_z135_uart.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/men_z135_uart.c +2 -2
index ef89534dd760..784756139935 100644
@@ -173,7 +173,7 @@ static void men_z135_reg_clr(struct men_z135_port *uart,
 
 /**
  * men_z135_handle_modem_status() - Handle change of modem status
- * @port: The UART port
+ * @uart: The UART port
  *
  * Handle change of modem status register. This is done by reading the "delta"
  * versions of DCD (Data Carrier Detect) and CTS (Clear To Send).
@@ -597,7 +597,7 @@ static void men_z135_stop_rx(struct uart_port *port)
 
 /**
  * men_z135_enable_ms() - Enable Modem Status
- * port:
+ * @port: The UART port
  *
  * Enable Modem Status IRQ.
  */
Signature · 1 line
2.17.1
#6 lore raw

PATCH v2 5/7 tty: Fix spacing between kernel-doc sections

In reply to Tobin C. Harding

There is a specified spacing for kernel-doc layout in Documentation/doc-guide/kernel-doc.rst we should try to adhere to it as much as possible.

Fix spacing between sections.

---
 drivers/tty/n_hdlc.c              | 2 ++
 drivers/tty/serial/serial-tegra.c | 2 --
 drivers/tty/serial/uartlite.c     | 5 +----
 drivers/tty/tty_buffer.c          | 1 +
 drivers/tty/tty_port.c            | 2 --
 5 files changed, 4 insertions(+), 8 deletions(-)
drivers/tty/n_hdlc.c +2 -0
index 4b7aaf9ee09c..5b0c776a43a2 100644
@@ -794,6 +794,7 @@ static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file,
  *
  * Determine which operations (read/write) will not block and return info
  * to caller.
+ *
  * Returns a bit mask containing info on which ops will not block.
  */
 static __poll_t n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp,
@@ -918,6 +919,7 @@ static void n_hdlc_buf_put(struct n_hdlc_buf_list *buf_list,
  *
  * Remove and return an HDLC buffer from the head of the specified HDLC buffer
  * list.
+ *
  * Returns a pointer to HDLC buffer if available, otherwise %NULL.
  */
 static struct n_hdlc_buf *n_hdlc_buf_get(struct n_hdlc_buf_list *buf_list)
drivers/tty/serial/serial-tegra.c +0 -2
index 872f3b2ed196..cb240a899127 100644
@@ -74,7 +74,6 @@
 
 /**
  * tegra_uart_chip_data: SOC specific data.
- *
  * @tx_fifo_full_status: Status flag available for checking tx fifo full.
  * @allow_txfifo_reset_fifo_mode: allow_tx fifo reset with fifo mode or not.
  *			Tegra30 does not allow this.
@@ -220,7 +219,6 @@ static void tegra_uart_break_ctl(struct uart_port *u, int break_ctl)
 
 /**
  * tegra_uart_wait_cycle_time() - Wait for N UART clock periods
- *
  * @tup:	Tegra serial port data structure.
  * @cycles:	Number of clock periods to wait.
  *
drivers/tty/serial/uartlite.c +1 -4
index 94a91748da40..718d3bbd002d 100644
@@ -605,7 +605,6 @@ static struct uart_driver ulite_uart_driver = {
 
 /**
  * ulite_assign() - register a uartlite device with the driver
- *
  * @dev: pointer to device structure
  * @id: requested id number.  Pass -1 for automatic port assignment
  * @base: base address of uartlite registers
@@ -687,7 +686,6 @@ static int ulite_assign(struct device *dev, int id, u32 base, int irq,
 
 /**
  * ulite_release() - register a uartlite device with the driver
- *
  * @dev: pointer to device structure
  */
 static int ulite_release(struct device *dev)
@@ -706,7 +704,6 @@ static int ulite_release(struct device *dev)
 
 /**
  * ulite_suspend() - Stop the device.
- *
  * @dev: handle to the device structure.
  * Return: 0 always.
  */
@@ -722,8 +719,8 @@ static int __maybe_unused ulite_suspend(struct device *dev)
 
 /**
  * ulite_resume() - Resume the device.
- *
  * @dev: handle to the device structure.
+ *
  * Return: 0 on success, errno otherwise.
  */
 static int __maybe_unused ulite_resume(struct device *dev)
drivers/tty/tty_buffer.c +1 -0
index d50dbe06896b..5f05500ee4d0 100644
@@ -148,6 +148,7 @@ void tty_buffer_free_all(struct tty_port *port)
  * Allocate a new tty buffer to hold the desired number of characters.
  * We round our buffers off in 256 character chunks to get better
  * allocation behaviour.
+ *
  * Return NULL if out of memory or the allocation would exceed the
  * per device queue
  */
drivers/tty/tty_port.c +0 -2
index 60927a52ec9c..d4dfe29a6348 100644
@@ -363,7 +363,6 @@ EXPORT_SYMBOL(tty_port_hangup);
 
 /**
  * tty_port_tty_hangup() - helper to hang up a tty
- *
  * @port: tty port
  * @check_clocal: hang only ttys with CLOCAL unset?
  */
@@ -379,7 +378,6 @@ EXPORT_SYMBOL_GPL(tty_port_tty_hangup);
 
 /**
  * tty_port_tty_wakeup() - helper to wake up a tty
- *
  * @port: tty port
  */
 void tty_port_tty_wakeup(struct tty_port *port)
Signature · 1 line
2.17.1
#4 lore raw

PATCH v2 3/7 tty: Partially fix kernel-docs layout

In reply to Tobin C. Harding

Currently a bunch of the kernel-docs function comments contain custom layout. We should use the standard kernel-docs function comment layout as per Documentation/doc-guide/kerenl-doc.rst

Fix layout in kernel-docs to be kernel standard.

---

Subject line contains 'Partially' because a later patch fixes the section format which is still part of the layout.

 drivers/tty/ehv_bytechan.c          |   2 +-
 drivers/tty/n_gsm.c                 | 699 ++++++++++++------------
 drivers/tty/n_hdlc.c                |  28 +-
 drivers/tty/n_tracerouter.c         |   4 +-
 drivers/tty/n_tracesink.c           |   4 +-
 drivers/tty/n_tty.c                 | 660 +++++++++++------------
 drivers/tty/pty.c                   | 116 ++--
 drivers/tty/serial/8250/8250_core.c |  64 +--
 drivers/tty/serial/8250/8250_port.c |  42 +-
 drivers/tty/serial/amba-pl011.c     |  26 +-
 drivers/tty/serial/earlycon.c       |  26 +-
 drivers/tty/serial/ifx6x60.c        | 382 ++++++-------
 drivers/tty/serial/ioc3_serial.c    |  68 +--
 drivers/tty/serial/ioc4_serial.c    |  82 +--
 drivers/tty/serial/kgdb_nmi.c       |   2 +-
 drivers/tty/serial/mux.c            |  44 +-
 drivers/tty/serial/serial-tegra.c   |   2 +-
 drivers/tty/serial/serial_core.c    | 198 +++----
 drivers/tty/serial/serial_txx9.c    |  20 +-
 drivers/tty/serial/sn_console.c     |  66 +--
 drivers/tty/serial/uartlite.c       |  10 +-
 drivers/tty/serial/xilinx_uartps.c  |  54 +-
 drivers/tty/tty_audit.c             |  38 +-
 drivers/tty/tty_baudrate.c          |  70 +--
 drivers/tty/tty_buffer.c            | 226 ++++----
 drivers/tty/tty_io.c                | 798 ++++++++++++++--------------
 drivers/tty/tty_ioctl.c             | 206 +++----
 drivers/tty/tty_jobctrl.c           | 132 ++---
 drivers/tty/tty_ldisc.c             | 272 +++++-----
 drivers/tty/tty_port.c              | 118 ++--
 drivers/tty/vt/consolemap.c         |  30 +-
 drivers/tty/vt/keyboard.c           | 132 ++---
 drivers/tty/vt/selection.c          |  26 +-
 drivers/tty/vt/vt.c                 |  66 +--
 drivers/tty/vt/vt_ioctl.c           |  37 +-
 35 files changed, 2372 insertions(+), 2378 deletions(-)
drivers/tty/ehv_bytechan.c +1 -1
index 769e0a5d1dfc..9e8d0439d802 100644
@@ -730,7 +730,7 @@ static struct platform_driver ehv_bc_tty_driver = {
 };
 
 /**
- * ehv_bc_init - ePAPR hypervisor byte channel driver initialization
+ * ehv_bc_init() - ePAPR hypervisor byte channel driver initialization
  *
  * This function is called when this driver is loaded.
  */
drivers/tty/n_gsm.c +346 -353

1,116 lines not on this page · raw message

drivers/tty/n_hdlc.c +14 -14
index 789251f8a1e2..4b7aaf9ee09c 100644
@@ -227,7 +227,7 @@ static struct tty_ldisc_ops n_hdlc_ldisc = {
 };
 
 /**
- * n_hdlc_release - release an n_hdlc per device line discipline info structure
+ * n_hdlc_release() - release an n_hdlc per device line discipline info structure
  * @n_hdlc - per device line discipline info structure
  */
 static void n_hdlc_release(struct n_hdlc *n_hdlc)
@@ -279,7 +279,7 @@ static void n_hdlc_release(struct n_hdlc *n_hdlc)
 }	/* end of n_hdlc_release() */
 
 /**
- * n_hdlc_tty_close - line discipline close
+ * n_hdlc_tty_close() - line discipline close
  * @tty - pointer to tty info structure
  *
  * Called when the line discipline is changed to something
@@ -318,7 +318,7 @@ static void n_hdlc_tty_close(struct tty_struct *tty)
 }	/* end of n_hdlc_tty_close() */
 
 /**
- * n_hdlc_tty_open - called when line discipline changed to n_hdlc
+ * n_hdlc_tty_open() - called when line discipline changed to n_hdlc
  * @tty - pointer to tty info structure
  *
  * Returns 0 if success, otherwise error code
@@ -364,7 +364,7 @@ static int n_hdlc_tty_open (struct tty_struct *tty)
 }	/* end of n_tty_hdlc_open() */
 
 /**
- * n_hdlc_send_frames - send frames on pending send buffer list
+ * n_hdlc_send_frames() - send frames on pending send buffer list
  * @n_hdlc - pointer to ldisc instance data
  * @tty - pointer to tty instance data
  *
@@ -456,7 +456,7 @@ static void n_hdlc_send_frames(struct n_hdlc *n_hdlc, struct tty_struct *tty)
 }	/* end of n_hdlc_send_frames() */
 
 /**
- * n_hdlc_tty_wakeup - Callback for transmit wakeup
+ * n_hdlc_tty_wakeup() - Callback for transmit wakeup
  * @tty	- pointer to associated tty instance data
  *
  * Called when low level device driver can accept more send data.
@@ -481,7 +481,7 @@ static void n_hdlc_tty_wakeup(struct tty_struct *tty)
 }	/* end of n_hdlc_tty_wakeup() */
 
 /**
- * n_hdlc_tty_receive - Called by tty driver when receive data is available
+ * n_hdlc_tty_receive() - Called by tty driver when receive data is available
  * @tty	- pointer to tty instance data
  * @data - pointer to received data
  * @flags - pointer to flags for data
@@ -549,7 +549,7 @@ static void n_hdlc_tty_receive(struct tty_struct *tty, const __u8 *data,
 }	/* end of n_hdlc_tty_receive() */
 
 /**
- * n_hdlc_tty_read - Called to retrieve one frame of data (if available)
+ * n_hdlc_tty_read() - Called to retrieve one frame of data (if available)
  * @tty - pointer to tty instance data
  * @file - pointer to open file object
  * @buf - pointer to returned data buffer
@@ -633,7 +633,7 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
 }	/* end of n_hdlc_tty_read() */
 
 /**
- * n_hdlc_tty_write - write a single frame of data to device
+ * n_hdlc_tty_write() - write a single frame of data to device
  * @tty	- pointer to associated tty device instance data
  * @file - pointer to file object data
  * @data - pointer to transmit data (one frame)
@@ -717,7 +717,7 @@ static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
 }	/* end of n_hdlc_tty_write() */
 
 /**
- * n_hdlc_tty_ioctl - process IOCTL system call for the tty device.
+ * n_hdlc_tty_ioctl() - process IOCTL system call for the tty device.
  * @tty - pointer to tty instance data
  * @file - pointer to open file object for device
  * @cmd - IOCTL command code
@@ -787,7 +787,7 @@ static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file,
 }	/* end of n_hdlc_tty_ioctl() */
 
 /**
- * n_hdlc_tty_poll - TTY callback for poll system call
+ * n_hdlc_tty_poll() - TTY callback for poll system call
  * @tty - pointer to tty instance data
  * @filp - pointer to open file object for device
  * @poll_table - wait queue for operations
@@ -827,7 +827,7 @@ static __poll_t n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp,
 }	/* end of n_hdlc_tty_poll() */
 
 /**
- * n_hdlc_alloc - allocate an n_hdlc instance data structure
+ * n_hdlc_alloc() - allocate an n_hdlc instance data structure
  *
  * Returns a pointer to newly created structure if success, otherwise %NULL
  */
@@ -877,7 +877,7 @@ static struct n_hdlc *n_hdlc_alloc(void)
 }	/* end of n_hdlc_alloc() */
 
 /**
- * n_hdlc_buf_return - put the HDLC buffer after the head of the specified list
+ * n_hdlc_buf_return() - put the HDLC buffer after the head of the specified list
  * @buf_list - pointer to the buffer list
  * @buf - pointer to the buffer
  */
@@ -895,7 +895,7 @@ static void n_hdlc_buf_return(struct n_hdlc_buf_list *buf_list,
 }
 
 /**
- * n_hdlc_buf_put - add specified HDLC buffer to tail of specified list
+ * n_hdlc_buf_put() - add specified HDLC buffer to tail of specified list
  * @buf_list - pointer to buffer list
  * @buf	- pointer to buffer
  */
@@ -913,7 +913,7 @@ static void n_hdlc_buf_put(struct n_hdlc_buf_list *buf_list,
 }	/* end of n_hdlc_buf_put() */
 
 /**
- * n_hdlc_buf_get - remove and return an HDLC buffer from list
+ * n_hdlc_buf_get() - remove and return an HDLC buffer from list
  * @buf_list - pointer to HDLC buffer list
  *
  * Remove and return an HDLC buffer from the head of the specified HDLC buffer
drivers/tty/n_tracerouter.c +2 -2
index 4479af4d2fa5..f7a2616145cf 100644
@@ -184,7 +184,7 @@ static struct tty_ldisc_ops tty_ptirouter_ldisc = {
 };
 
 /**
- * n_tracerouter_init -	module initialisation
+ * n_tracerouter_init() - module initialisation
  *
  * Registers this module as a line discipline driver.
  *
@@ -210,7 +210,7 @@ static int __init n_tracerouter_init(void)
 }
 
 /**
- * n_tracerouter_exit -	module unload
+ * n_tracerouter_exit() - module unload
  *
  * Removes this module as a line discipline driver.
  */
drivers/tty/n_tracesink.c +2 -2
index d96ba82cc356..8feeea7d33b6 100644
@@ -188,7 +188,7 @@ static struct tty_ldisc_ops tty_n_tracesink = {
 };
 
 /**
- * n_tracesink_init-	module initialisation
+ * n_tracesink_init() - module initialisation
  *
  * Registers this module as a line discipline driver.
  *
@@ -207,7 +207,7 @@ static int __init n_tracesink_init(void)
 }
 
 /**
- * n_tracesink_exit -	module unload
+ * n_tracesink_exit() - module unload
  *
  * Removes this module as a line discipline driver.
  */
drivers/tty/n_tty.c +330 -330

924 lines not on this page · raw message

drivers/tty/pty.c +58 -58

189 lines not on this page · raw message

drivers/tty/serial/8250/8250_core.c +32 -32

109 lines not on this page · raw message

drivers/tty/serial/8250/8250_port.c +21 -21

62 lines not on this page · raw message

drivers/tty/serial/amba-pl011.c +13 -13
index 8a47ba2cfe54..589adc597923 100644
@@ -2340,22 +2340,22 @@ static int __init pl011_console_setup(struct console *co, char *options)
 }
 
 /**
- *	pl011_console_match - non-standard console matching
- *	@co:	  registering console
- *	@name:	  name from console command line
- *	@idx:	  index from console command line
- *	@options: ptr to option string from console command line
+ * pl011_console_match() - non-standard console matching
+ * @co: registering console
+ * @name: name from console command line
+ * @idx: index from console command line
+ * @options: ptr to option string from console command line
  *
- *	Only attempts to match console command lines of the form:
- *	    console=pl011,mmio|mmio32,<addr>[,<options>]
- *	    console=pl011,0x<addr>[,<options>]
- *	This form is used to register an initial earlycon boot console and
- *	replace it with the amba_console at pl011 driver init.
+ * Only attempts to match console command lines of the form:
+ *     console=pl011,mmio|mmio32,<addr>[,<options>]
+ *     console=pl011,0x<addr>[,<options>]
+ * This form is used to register an initial earlycon boot console and
+ * replace it with the amba_console at pl011 driver init.
  *
- *	Performs console setup for a match (as required by interface)
- *	If no <options> are specified, then assume the h/w is already setup.
+ * Performs console setup for a match (as required by interface)
+ * If no <options> are specified, then assume the h/w is already setup.
  *
- *	Returns 0 if console matches; otherwise non-zero to use default matching
+ * Returns 0 if console matches; otherwise non-zero to use default matching
  */
 static int __init pl011_console_match(struct console *co, char *name, int idx,
 				      char *options)
drivers/tty/serial/earlycon.c +13 -13
index c14873b67803..85bd5a5d7f39 100644
@@ -150,22 +150,22 @@ static int __init register_earlycon(char *buf, const struct earlycon_id *match)
 }
 
 /**
- *	setup_earlycon - match and register earlycon console
- *	@buf:	earlycon param string
+ * setup_earlycon() - match and register earlycon console
+ * @buf: earlycon param string
  *
- *	Registers the earlycon console matching the earlycon specified
- *	in the param string @buf. Acceptable param strings are of the form
- *	   <name>,io|mmio|mmio32|mmio32be,<addr>,<options>
- *	   <name>,0x<addr>,<options>
- *	   <name>,<options>
- *	   <name>
+ * Registers the earlycon console matching the earlycon specified
+ * in the param string @buf. Acceptable param strings are of the form
+ *    <name>,io|mmio|mmio32|mmio32be,<addr>,<options>
+ *    <name>,0x<addr>,<options>
+ *    <name>,<options>
+ *    <name>
  *
- *	Only for the third form does the earlycon setup() method receive the
- *	<options> string in the 'options' parameter; all other forms set
- *	the parameter to NULL.
+ * Only for the third form does the earlycon setup() method receive the
+ * <options> string in the 'options' parameter; all other forms set
+ * the parameter to NULL.
  *
- *	Returns 0 if an attempt to register the earlycon was made,
- *	otherwise negative error code
+ * Returns 0 if an attempt to register the earlycon was made,
+ * otherwise negative error code
  */
 int __init setup_earlycon(char *buf)
 {
drivers/tty/serial/ifx6x60.c +191 -191

378 lines not on this page · raw message

drivers/tty/serial/ioc3_serial.c +34 -34

68 lines not on this page · raw message

drivers/tty/serial/ioc4_serial.c +41 -41

82 lines not on this page · raw message

drivers/tty/serial/kgdb_nmi.c +1 -1
index 4029272891f9..f4fa9c6d61ab 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/mux.c +22 -22

44 lines not on this page · raw message

drivers/tty/serial/serial-tegra.c +1 -1
index af2a29cfbbe9..872f3b2ed196 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/serial_core.c +99 -99

198 lines not on this page · raw message

drivers/tty/serial/serial_txx9.c +10 -10
index 33c630d0f1b2..b6b17d5005f6 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/sn_console.c +33 -33

66 lines not on this page · raw message

drivers/tty/serial/uartlite.c +6 -4
index f0344adc86db..94a91748da40 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/xilinx_uartps.c +27 -27

54 lines not on this page · raw message

drivers/tty/tty_audit.c +19 -19
index 50f567b6a66e..54574c8d677e 100644

Lines of this file are not shown. View the raw message.

drivers/tty/tty_baudrate.c +35 -35

70 lines not on this page · raw message

drivers/tty/tty_buffer.c +113 -113

226 lines not on this page · raw message

drivers/tty/tty_io.c +399 -399

798 lines not on this page · raw message

drivers/tty/tty_ioctl.c +103 -103

206 lines not on this page · raw message

drivers/tty/tty_jobctrl.c +66 -66

132 lines not on this page · raw message

drivers/tty/tty_ldisc.c +136 -136

272 lines not on this page · raw message

drivers/tty/tty_port.c +59 -59

118 lines not on this page · raw message

drivers/tty/vt/consolemap.c +15 -15
index 71086e4abc9a..74f4ef98aa7d 100644

Lines of this file are not shown. View the raw message.

drivers/tty/vt/keyboard.c +66 -66

132 lines not on this page · raw message

drivers/tty/vt/selection.c +13 -13
index 75aa58ea79b6..473015beb0f2 100644

Lines of this file are not shown. View the raw message.

drivers/tty/vt/vt.c +33 -33

66 lines not on this page · raw message

drivers/tty/vt/vt_ioctl.c +18 -19
index 801f2f6e1302..0d1b232cb5fd 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.17.1

Part of the diff is not shown here. View the raw message.

#7 lore raw

PATCH v2 6/7 tty: Remove newline after function kernel-doc

In reply to Tobin C. Harding

Currently there are many places were a newline is left between the kernel-doc function comment and the function it is documenting. There should not be a newline here.

Remove newline after function kernel-doc. This patch is whitespace only.

---

 drivers/tty/n_gsm.c                | 46 ------------------------------
 drivers/tty/n_tty.c                | 33 ---------------------
 drivers/tty/pty.c                  |  7 -----
 drivers/tty/serial/ifx6x60.c       |  5 ----
 drivers/tty/serial/ioc3_serial.c   |  5 ----
 drivers/tty/serial/ioc4_serial.c   |  3 --
 drivers/tty/serial/men_z135_uart.c |  1 -
 drivers/tty/serial/sn_console.c    |  1 -
 drivers/tty/tty_baudrate.c         |  4 ---
 drivers/tty/tty_buffer.c           | 14 ---------
 drivers/tty/tty_io.c               | 36 -----------------------
 drivers/tty/tty_ioctl.c            | 13 ---------
 drivers/tty/tty_ldisc.c            | 19 ------------
 drivers/tty/vt/vt_ioctl.c          |  3 --
 14 files changed, 190 deletions(-)
drivers/tty/n_gsm.c +0 -46
index e25944ee2766..c65a9afb7cc4 100644
@@ -366,7 +366,6 @@ static const u8 gsm_fcs8[256] = {
  * Update the FCS to include c. Uses the algorithm in the specification
  * notes.
  */
-
 static inline u8 gsm_fcs_add(u8 fcs, u8 c)
 {
 	return gsm_fcs8[fcs ^ c];
@@ -381,7 +380,6 @@ static inline u8 gsm_fcs_add(u8 fcs, u8 c)
  * Update the FCS to include c. Uses the algorithm in the specification
  * notes.
  */
-
 static inline u8 gsm_fcs_add_block(u8 fcs, u8 *c, int len)
 {
 	while (len--)
@@ -397,7 +395,6 @@ static inline u8 gsm_fcs_add_block(u8 fcs, u8 *c, int len)
  * Processes one byte of an EA. Updates the passed variable
  * and returns 1 if the EA is now completely read
  */
-
 static int gsm_read_ea(unsigned int *val, u8 c)
 {
 	/* Add the next 7 bits into the value */
@@ -414,7 +411,6 @@ static int gsm_read_ea(unsigned int *val, u8 c)
  * Returns the correct GSM encoded modem status bits (6 bit field) for
  * the current status of the DLCI and attached tty object
  */
-
 static u8 gsm_encode_modem(const struct gsm_dlci *dlci)
 {
 	u8 modembits = 0;
@@ -444,7 +440,6 @@ static u8 gsm_encode_modem(const struct gsm_dlci *dlci)
  * Displays a packet in human readable format for debugging purposes. The
  * style is based on amateur radio LAP-B dump display.
  */
-
 static void gsm_print_packet(const char *hdr, int addr, int cr,
 					u8 control, const u8 *data, int dlen)
 {
@@ -525,7 +520,6 @@ static void gsm_print_packet(const char *hdr, int addr, int cr,
  * is doubling and the caller is responsible for handing out
  * suitable sized buffers.
  */
-
 static int gsm_stuff_frame(const u8 *input, u8 *output, int len)
 {
 	int olen = 0;
@@ -555,7 +549,6 @@ static int gsm_stuff_frame(const u8 *input, u8 *output, int len)
  *
  * FIXME: Lock versus data TX path
  */
-
 static void gsm_send(struct gsm_mux *gsm, int addr, int cr, int control)
 {
 	int len;
@@ -602,7 +595,6 @@ static void gsm_send(struct gsm_mux *gsm, int addr, int cr, int control)
  *
  * Format up and transmit a link level response frame.
  */
-
 static inline void gsm_response(struct gsm_mux *gsm, int addr, int control)
 {
 	gsm_send(gsm, addr, 0, control);
@@ -616,7 +608,6 @@ static inline void gsm_response(struct gsm_mux *gsm, int addr, int control)
  *
  * Format up and transmit a link level command frame.
  */
-
 static inline void gsm_command(struct gsm_mux *gsm, int addr, int control)
 {
 	gsm_send(gsm, addr, 1, control);
@@ -637,7 +628,6 @@ static inline void gsm_command(struct gsm_mux *gsm, int addr, int control)
  * at the front for header bytes but that is treated as an implementation
  * detail and not for the high level code to use
  */
-
 static struct gsm_msg *gsm_data_alloc(struct gsm_mux *gsm, u8 addr, int len,
 								u8 ctrl)
 {
@@ -664,7 +654,6 @@ static struct gsm_msg *gsm_data_alloc(struct gsm_mux *gsm, u8 addr, int len,
  *
  * FIXME: lock against link layer control transmissions
  */
-
 static void gsm_data_kick(struct gsm_mux *gsm)
 {
 	struct gsm_msg *msg, *nmsg;
@@ -715,7 +704,6 @@ static void gsm_data_kick(struct gsm_mux *gsm)
  * out of the mux tty if not already doing so. The Caller must hold
  * the gsm tx lock.
  */
-
 static void __gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
 {
 	struct gsm_mux *gsm = dlci->gsm;
@@ -766,7 +754,6 @@ static void __gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
  * out of the mux tty if not already doing so. Take the
  * the gsm tx lock and dlci lock.
  */
-
 static void gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
 {
 	unsigned long flags;
@@ -786,7 +773,6 @@ static void gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
  *
  * Caller must hold the tx_lock of the mux.
  */
-
 static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci)
 {
 	struct gsm_msg *msg;
@@ -839,7 +825,6 @@ static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci)
  *
  * Caller must hold the tx_lock of the mux.
  */
-
 static int gsm_dlci_data_output_framed(struct gsm_mux *gsm,
 						struct gsm_dlci *dlci)
 {
@@ -913,7 +898,6 @@ static int gsm_dlci_data_output_framed(struct gsm_mux *gsm,
  * FIXME: We should round robin between groups and in theory you can
  * renegotiate DLCI priorities with optional stuff. Needs optimising.
  */
-
 static void gsm_dlci_data_sweep(struct gsm_mux *gsm)
 {
 	int len;
@@ -950,7 +934,6 @@ static void gsm_dlci_data_sweep(struct gsm_mux *gsm)
  * a tty wakeup except when we filled the pipe so we need to fire off
  * new data ourselves in other cases.
  */
-
 static void gsm_dlci_data_kick(struct gsm_dlci *dlci)
 {
 	unsigned long flags;
@@ -987,7 +970,6 @@ static void gsm_dlci_data_kick(struct gsm_dlci *dlci)
  *
  * Encode up and queue a UI/UIH frame containing our response.
  */
-
 static void gsm_control_reply(struct gsm_mux *gsm, int cmd, u8 *data,
 					int dlen)
 {
@@ -1010,7 +992,6 @@ static void gsm_control_reply(struct gsm_mux *gsm, int cmd, u8 *data,
  * Used when a modem control message or line state inline in adaption
  * layer 2 is processed. Sort out the local modem state and throttles
  */
-
 static void gsm_process_modem(struct tty_struct *tty, struct gsm_dlci *dlci,
 							u32 modem, int clen)
 {
@@ -1072,7 +1053,6 @@ static void gsm_process_modem(struct tty_struct *tty, struct gsm_dlci *dlci,
  * to indicate break signals. Unpack it, convert to Linux representation
  * and if need be stuff a break message down the tty.
  */
-
 static void gsm_control_modem(struct gsm_mux *gsm, u8 *data, int clen)
 {
 	unsigned int addr = 0;
@@ -1133,7 +1113,6 @@ static void gsm_control_modem(struct gsm_mux *gsm, u8 *data, int clen)
  * it wishes to send us an error state from the virtual link. Stuff
  * this into the uplink tty if present
  */
-
 static void gsm_control_rls(struct gsm_mux *gsm, u8 *data, int clen)
 {
 	struct tty_port *port;
@@ -1187,7 +1166,6 @@ static void gsm_dlci_begin_close(struct gsm_dlci *dlci);
  * Processes the incoming request and queues a response frame or an
  * NSC response if not supported
  */
-
 static void gsm_control_message(struct gsm_mux *gsm, unsigned int command,
 							u8 *data, int clen)
 {
@@ -1259,7 +1237,6 @@ static void gsm_control_message(struct gsm_mux *gsm, unsigned int command,
  * is done by the caller, we just update the fields, flag it as done
  * and return
  */
-
 static void gsm_control_response(struct gsm_mux *gsm, unsigned int command,
 							u8 *data, int clen)
 {
@@ -1291,7 +1268,6 @@ static void gsm_control_response(struct gsm_mux *gsm, unsigned int command,
  *
  * Send out a pending control command (called under control lock)
  */
-
 static void gsm_control_transmit(struct gsm_mux *gsm, struct gsm_control *ctrl)
 {
 	struct gsm_msg *msg = gsm_data_alloc(gsm, 0, ctrl->len + 1, gsm->ftype);
@@ -1312,7 +1288,6 @@ static void gsm_control_transmit(struct gsm_mux *gsm, struct gsm_control *ctrl)
  * In that situation the timer may still occur in a small window but
  * gsm->pending_cmd will be NULL and we just let the timer expire.
  */
-
 static void gsm_control_retransmit(struct timer_list *t)
 {
 	struct gsm_mux *gsm = from_timer(gsm, t, t2_timer);
@@ -1347,7 +1322,6 @@ static void gsm_control_retransmit(struct timer_list *t)
  * active at a time. In theory more can be outstanding but the matching
  * gets really complicated so for now stick to one outstanding.
  */
-
 static struct gsm_control *gsm_control_send(struct gsm_mux *gsm,
 		unsigned int command, u8 *data, int clen)
 {
@@ -1389,7 +1363,6 @@ static struct gsm_control *gsm_control_send(struct gsm_mux *gsm,
  * resources and returns 0 for success, or an error if the remote
  * rejected or ignored the request.
  */
-
 static int gsm_control_wait(struct gsm_mux *gsm, struct gsm_control *control)
 {
 	int err;
@@ -1415,7 +1388,6 @@ static int gsm_control_wait(struct gsm_mux *gsm, struct gsm_control *control)
  * Perform processing when moving a DLCI into closed state. If there
  * is an attached tty this is hung up
  */
-
 static void gsm_dlci_close(struct gsm_dlci *dlci)
 {
 	del_timer(&dlci->t1);
@@ -1438,7 +1410,6 @@ static void gsm_dlci_close(struct gsm_dlci *dlci)
  *
  * Perform processing when moving a DLCI into open state.
  */
-
 static void gsm_dlci_open(struct gsm_dlci *dlci)
 {
 	/* Note that SABM UA .. SABM UA first UA lost can mean that we go
@@ -1465,7 +1436,6 @@ static void gsm_dlci_open(struct gsm_dlci *dlci)
  * fine. In that case we can just keep the control dlci open after the
  * DLCI_OPENING retries time out.
  */
-
 static void gsm_dlci_t1(struct timer_list *t)
 {
 	struct gsm_dlci *dlci = from_timer(dlci, t, t1);
@@ -1508,7 +1478,6 @@ static void gsm_dlci_t1(struct timer_list *t)
  * we will move into open state. Opening is done asynchronously with retry
  * running off timers and the responses.
  */
-
 static void gsm_dlci_begin_open(struct gsm_dlci *dlci)
 {
 	struct gsm_mux *gsm = dlci->gsm;
@@ -1530,7 +1499,6 @@ static void gsm_dlci_begin_open(struct gsm_dlci *dlci)
  * off timers. We may also receive a DM reply from the other end which
  * indicates the channel was already closed.
  */
-
 static void gsm_dlci_begin_close(struct gsm_dlci *dlci)
 {
 	struct gsm_mux *gsm = dlci->gsm;
@@ -1552,7 +1520,6 @@ static void gsm_dlci_begin_close(struct gsm_dlci *dlci)
  * other than the control channel. If the relevant virtual tty is
  * open we shovel the bits down it, if not we drop them.
  */
-
 static void gsm_dlci_data(struct gsm_dlci *dlci, u8 *data, int clen)
 {
 	/* krefs .. */
@@ -1602,7 +1569,6 @@ static void gsm_dlci_data(struct gsm_dlci *dlci, u8 *data, int clen)
  * control data bytes. The command EA contains a command/response bit
  * and we divide up the work accordingly.
  */
-
 static void gsm_dlci_command(struct gsm_dlci *dlci, u8 *data, int len)
 {
 	/* See what command is involved */
@@ -1640,7 +1606,6 @@ static void gsm_dlci_command(struct gsm_dlci *dlci, u8 *data, int len)
  *
  * FIXME: review locking races
  */
-
 static struct gsm_dlci *gsm_dlci_alloc(struct gsm_mux *gsm, int addr)
 {
 	struct gsm_dlci *dlci = kzalloc(sizeof(struct gsm_dlci), GFP_ATOMIC);
@@ -1741,7 +1706,6 @@ static void gsm_dlci_release(struct gsm_dlci *dlci)
  * been handled below us and the frame is unpacked into the structures.
  * The fcs holds the header FCS but any data FCS must be added here.
  */
-
 static void gsm_queue(struct gsm_mux *gsm)
 {
 	struct gsm_dlci *dlci;
@@ -2012,7 +1976,6 @@ static void gsm1_receive(struct gsm_mux *gsm, unsigned char c)
  *
  * FIXME: better diagnostics ?
  */
-
 static void gsm_error(struct gsm_mux *gsm,
 				unsigned char data, unsigned char flag)
 {
@@ -2055,7 +2018,6 @@ static int gsm_disconnect(struct gsm_mux *gsm)
  * protocols. Remove the mux from the mux table, stop all the timers
  * and then shut down each device hanging up the channels as we go.
  */
-
 static void gsm_cleanup_mux(struct gsm_mux *gsm)
 {
 	int i;
@@ -2101,7 +2063,6 @@ static void gsm_cleanup_mux(struct gsm_mux *gsm)
  * protocols. Add the mux to the mux table so it can be opened and
  * finally kick off connecting to DLCI 0 on the modem.
  */
-
 static int gsm_activate_mux(struct gsm_mux *gsm)
 {
 	struct gsm_dlci *dlci;
@@ -2220,7 +2181,6 @@ static struct gsm_mux *gsm_alloc_mux(void)
  * Write a block of data from the GSM mux to the data channel. This
  * will eventually be serialized from above but at the moment isn't.
  */
-
 static int gsmld_output(struct gsm_mux *gsm, u8 *data, int len)
 {
 	if (tty_write_room(gsm->tty) < len) {
@@ -2243,7 +2203,6 @@ static int gsmld_output(struct gsm_mux *gsm, u8 *data, int len)
  * modem. Currently called from the line discipline set up but
  * will need moving to an ioctl path.
  */
-
 static int gsmld_attach_gsm(struct tty_struct *tty, struct gsm_mux *gsm)
 {
 	int ret, i, base;
@@ -2340,7 +2299,6 @@ static void gsmld_flush_buffer(struct tty_struct *tty)
  * discipline change. The function will not be called while other
  * ldisc methods are in progress.
  */
-
 static void gsmld_close(struct tty_struct *tty)
 {
 	struct gsm_mux *gsm = tty->disc_data;
@@ -2361,7 +2319,6 @@ static void gsmld_close(struct tty_struct *tty)
  * other events will occur in parallel. No further open will occur
  * until a close.
  */
-
 static int gsmld_open(struct tty_struct *tty)
 {
 	struct gsm_mux *gsm;
@@ -2426,7 +2383,6 @@ static void gsmld_write_wakeup(struct tty_struct *tty)
  *
  * This code must be sure never to sleep through a hangup.
  */
-
 static ssize_t gsmld_read(struct tty_struct *tty, struct file *file,
 			 unsigned char __user *buf, size_t nr)
 {
@@ -2446,7 +2402,6 @@ static ssize_t gsmld_read(struct tty_struct *tty, struct file *file,
  * by userspace. Frames are either sent whole or not at all as this
  * avoids pain user side.
  */
-
 static ssize_t gsmld_write(struct tty_struct *tty, struct file *file,
 			   const unsigned char *buf, size_t nr)
 {
@@ -2470,7 +2425,6 @@ static ssize_t gsmld_write(struct tty_struct *tty, struct file *file,
  * This code must be sure never to sleep through a hangup.
  * Called without the kernel lock held - fine
  */
-
 static __poll_t gsmld_poll(struct tty_struct *tty, struct file *file,
 							poll_table *wait)
 {
drivers/tty/n_tty.c +0 -33
index af0836f11459..3e2b59e99153 100644
@@ -198,7 +198,6 @@ static int tty_copy_to_user(struct tty_struct *tty, void __user *to,
  * n_tty_read()/consumer path:
  *    holds non-exclusive termios_rwsem
  */
-
 static void n_tty_kick_worker(struct tty_struct *tty)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -239,7 +238,6 @@ static ssize_t chars_in_buffer(struct tty_struct *tty)
  * that attach themselves to the master and rely on ASYNC
  * IO must be woken up
  */
-
 static void n_tty_write_wakeup(struct tty_struct *tty)
 {
 	clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
@@ -311,7 +309,6 @@ static void n_tty_check_unthrottle(struct tty_struct *tty)
  * n_tty_receive_buf()/producer path:
  *     caller holds non-exclusive termios_rwsem
  */
-
 static inline void put_tty_queue(unsigned char c, struct n_tty_data *ldata)
 {
 	*read_buf_addr(ldata, ldata->read_head) = c;
@@ -328,7 +325,6 @@ static inline void put_tty_queue(unsigned char c, struct n_tty_data *ldata)
  * Locking: caller holds exclusive termios_rwsem
  *          (or locking is not required)
  */
-
 static void reset_buffer_flags(struct n_tty_data *ldata)
 {
 	ldata->read_head = ldata->canon_head = ldata->read_tail = 0;
@@ -365,7 +361,6 @@ static void n_tty_packet_mode_flush(struct tty_struct *tty)
  *
  * Locking: ctrl_lock, exclusive termios_rwsem
  */
-
 static void n_tty_flush_buffer(struct tty_struct *tty)
 {
 	down_write(&tty->termios_rwsem);
@@ -385,7 +380,6 @@ static void n_tty_flush_buffer(struct tty_struct *tty)
  * character. We use this to correctly compute the on screen size
  * of the character when printing
  */
-
 static inline int is_utf8_continuation(unsigned char c)
 {
 	return (c & 0xc0) == 0x80;
@@ -398,7 +392,6 @@ static inline int is_utf8_continuation(unsigned char c)
  * Returns true if the utf8 character 'c' is a multibyte continuation
  * character and the terminal is in unicode mode.
  */
-
 static inline int is_continuation(unsigned char c, struct tty_struct *tty)
 {
 	return I_IUTF8(tty) && is_utf8_continuation(c);
@@ -425,7 +418,6 @@ static inline int is_continuation(unsigned char c, struct tty_struct *tty)
  * Locking: should be called under the output_lock to protect
  *          the column state and space left in the buffer
  */
-
 static int do_output_char(unsigned char c, struct tty_struct *tty, int space)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -500,7 +492,6 @@ static int do_output_char(unsigned char c, struct tty_struct *tty, int space)
  *          (also, this is called from n_tty_write under the
  *          tty layer write lock)
  */
-
 static int process_output(unsigned char c, struct tty_struct *tty)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -536,7 +527,6 @@ static int process_output(unsigned char c, struct tty_struct *tty)
  *          (also, this is called from n_tty_write under the
  *          tty layer write lock)
  */
-
 static ssize_t process_output_block(struct tty_struct *tty,
 				    const unsigned char *buf, unsigned int nr)
 {
@@ -620,7 +610,6 @@ static ssize_t process_output_block(struct tty_struct *tty,
  *
  * Locking: callers must hold output_lock
  */
-
 static size_t __process_echoes(struct tty_struct *tty)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -835,7 +824,6 @@ static void flush_echoes(struct tty_struct *tty)
  *
  * Add a character or operation byte to the echo buffer.
  */
-
 static inline void add_echo_byte(unsigned char c, struct n_tty_data *ldata)
 {
 	*echo_buf_addr(ldata, ldata->echo_head) = c;
@@ -849,7 +837,6 @@ static inline void add_echo_byte(unsigned char c, struct n_tty_data *ldata)
  *
  * Add an operation to the echo buffer to move back one column.
  */
-
 static void echo_move_back_col(struct n_tty_data *ldata)
 {
 	add_echo_byte(ECHO_OP_START, ldata);
@@ -863,7 +850,6 @@ static void echo_move_back_col(struct n_tty_data *ldata)
  * Add an operation to the echo buffer to set the canon column
  * to the current column.
  */
-
 static void echo_set_canon_col(struct n_tty_data *ldata)
 {
 	add_echo_byte(ECHO_OP_START, ldata);
@@ -884,7 +870,6 @@ static void echo_set_canon_col(struct n_tty_data *ldata)
  * canon column (if applicable), to go back the correct number
  * of columns.
  */
-
 static void echo_erase_tab(unsigned int num_chars, int after_tab,
 			   struct n_tty_data *ldata)
 {
@@ -911,7 +896,6 @@ static void echo_erase_tab(unsigned int num_chars, int after_tab,
  *
  * This variant does not treat control characters specially.
  */
-
 static void echo_char_raw(unsigned char c, struct n_tty_data *ldata)
 {
 	if (c == ECHO_OP_START) {
@@ -933,7 +917,6 @@ static void echo_char_raw(unsigned char c, struct n_tty_data *ldata)
  * This variant tags control characters to be echoed as "^X"
  * (where X is the letter representing the control char).
  */
-
 static void echo_char(unsigned char c, struct tty_struct *tty)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -952,7 +935,6 @@ static void echo_char(unsigned char c, struct tty_struct *tty)
  * finish_erasing() - complete erase
  * @ldata: n_tty data
  */
-
 static inline void finish_erasing(struct n_tty_data *ldata)
 {
 	if (ldata->erasing) {
@@ -973,7 +955,6 @@ static inline void finish_erasing(struct n_tty_data *ldata)
  * n_tty_receive_buf()/producer path:
  *     caller holds non-exclusive termios_rwsem
  */
-
 static void eraser(unsigned char c, struct tty_struct *tty)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -1106,7 +1087,6 @@ static void eraser(unsigned char c, struct tty_struct *tty)
  *
  * Locking: ctrl_lock
  */
-
 static void __isig(int sig, struct tty_struct *tty)
 {
 	struct pid *tty_pgrp = tty_get_pgrp(tty);
@@ -1163,7 +1143,6 @@ static void isig(int sig, struct tty_struct *tty)
  *
  * Note: may get exclusive termios_rwsem if flushing input buffer
  */
-
 static void n_tty_receive_break(struct tty_struct *tty)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -1193,7 +1172,6 @@ static void n_tty_receive_break(struct tty_struct *tty)
  * need locking as num_overrun and overrun_time are function
  * private.
  */
-
 static void n_tty_receive_overrun(struct tty_struct *tty)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -1264,7 +1242,6 @@ n_tty_receive_signal_char(struct tty_struct *tty, int signal, unsigned char c)
  *
  * Returns 1 if LNEXT was received, else returns 0
  */
-
 static int
 n_tty_receive_char_special(struct tty_struct *tty, unsigned char c)
 {
@@ -1788,7 +1765,6 @@ static int n_tty_receive_buf2(struct tty_struct *tty, const unsigned char *cp,
  *
  * Locking: Caller holds tty->termios_rwsem
  */
-
 static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -1882,7 +1858,6 @@ static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
  * discipline change. The function will not be called while other
  * ldisc methods are in progress.
  */
-
 static void n_tty_close(struct tty_struct *tty)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -1903,7 +1878,6 @@ static void n_tty_close(struct tty_struct *tty)
  * other events will occur in parallel. No further open will occur
  * until a close.
  */
-
 static int n_tty_open(struct tty_struct *tty)
 {
 	struct n_tty_data *ldata;
@@ -1956,7 +1930,6 @@ static inline int input_available_p(struct tty_struct *tty, int poll)
  *     caller holds non-exclusive termios_rwsem
  *     read_tail published
  */
-
 static int copy_from_read_buf(struct tty_struct *tty,
 				      unsigned char __user **b,
 				      size_t *nr)
@@ -2012,7 +1985,6 @@ static int copy_from_read_buf(struct tty_struct *tty,
  *     caller holds non-exclusive termios_rwsem
  *     read_tail published
  */
-
 static int canon_copy_from_read_buf(struct tty_struct *tty,
 				    unsigned char __user **b,
 				    size_t *nr)
@@ -2093,7 +2065,6 @@ extern ssize_t redirected_tty_write(struct file *, const char __user *,
  *          current->signal->tty check is safe
  *          ctrl_lock to safely reference tty->pgrp
  */
-
 static int job_control(struct tty_struct *tty, struct file *file)
 {
 	/* Job control check -- must be done at start and after
@@ -2126,7 +2097,6 @@ static int job_control(struct tty_struct *tty, struct file *file)
  *     claims non-exclusive termios_rwsem
  *     publishes read_tail
  */
-
 static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
 			 unsigned char __user *buf, size_t nr)
 {
@@ -2295,7 +2265,6 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
  *          (note that the process_output*() functions take this
  *          lock themselves)
  */
-
 static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
 			   const unsigned char *buf, size_t nr)
 {
@@ -2396,7 +2365,6 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
  * This code must be sure never to sleep through a hangup.
  * Called without the kernel lock held - fine
  */
-
 static __poll_t n_tty_poll(struct tty_struct *tty, struct file *file,
 							poll_table *wait)
 {
@@ -2487,7 +2455,6 @@ static struct tty_ldisc_ops n_tty_ops = {
  *
  * Enables a 'subclass' line discipline to 'inherit' N_TTY methods.
  */
-
 void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
 {
 	*ops = n_tty_ops;
drivers/tty/pty.c +0 -7
index a8ec902fd9be..35cb13995c1c 100644
@@ -106,7 +106,6 @@ static void pty_unthrottle(struct tty_struct *tty)
  * end of the link as if we were an IRQ handler receiving stuff for
  * the other side of the pty/tty pair.
  */
-
 static int pty_write(struct tty_struct *tty, const unsigned char *buf, int c)
 {
 	struct tty_struct *to = tty->link;
@@ -134,7 +133,6 @@ static int pty_write(struct tty_struct *tty, const unsigned char *buf, int c)
  * Report how many bytes the ldisc can send into the queue for
  * the other device.
  */
-
 static int pty_write_room(struct tty_struct *tty)
 {
 	if (tty->stopped)
@@ -149,7 +147,6 @@ static int pty_write_room(struct tty_struct *tty)
  * Report how much we have in the transmit queue. As everything is
  * instantly at the other end this is easy to implement.
  */
-
 static int pty_chars_in_buffer(struct tty_struct *tty)
 {
 	return 0;
@@ -298,7 +295,6 @@ static void pty_set_termios(struct tty_struct *tty,
  * Update the termios variables and send the necessary signals to
  * peform a terminal resize correctly
  */
-
 static int pty_resize(struct tty_struct *tty,  struct winsize *ws)
 {
 	struct pid *pgrp, *rpgrp;
@@ -694,7 +690,6 @@ static long pty_unix98_compat_ioctl(struct tty_struct *tty,
  * Look up a pty master device. Called under the tty_mutex for now.
  * This provides our locking.
  */
-
 static struct tty_struct *ptm_unix98_lookup(struct tty_driver *driver,
 		struct file *file, int idx)
 {
@@ -710,7 +705,6 @@ static struct tty_struct *ptm_unix98_lookup(struct tty_driver *driver,
  * Look up a pty master device. Called under the tty_mutex for now.
  * This provides our locking for the tty pointer.
  */
-
 static struct tty_struct *pts_unix98_lookup(struct tty_driver *driver,
 		struct file *file, int idx)
 {
@@ -797,7 +791,6 @@ static const struct tty_operations pty_unix98_ops = {
  *          protect the rest.
  *          allocated_ptys_lock handles the list of free pty numbers
  */
-
 static int ptmx_open(struct inode *inode, struct file *filp)
 {
 	struct pts_fs_info *fsi;
drivers/tty/serial/ifx6x60.c +0 -5
index 3ddd320162c0..63c8b9f8c7b7 100644
@@ -985,7 +985,6 @@ static int ifx_spi_reset(struct ifx_spi_device *ifx_dev)
  * -	Support for multiple devices
  * -	Split out MID specific GPIO handling eventually
  */
-
 static int ifx_spi_spi_probe(struct spi_device *spi)
 {
 	int ret;
@@ -1224,7 +1223,6 @@ static int ifx_spi_spi_probe(struct spi_device *spi)
  * FIXME: We should be shutting the device down here not in
  * the module unload path.
  */
-
 static int ifx_spi_spi_remove(struct spi_device *spi)
 {
 	struct ifx_spi_device *ifx_dev = spi_get_drvdata(spi);
@@ -1253,7 +1251,6 @@ static int ifx_spi_spi_remove(struct spi_device *spi)
  *
  * No action needs to be taken here
  */
-
 static void ifx_spi_spi_shutdown(struct spi_device *spi)
 {
 	struct ifx_spi_device *ifx_dev = spi_get_drvdata(spi);
@@ -1363,7 +1360,6 @@ static struct spi_driver ifx_spi_driver = {
  *
  * Unload the module.
  */
-
 static void __exit ifx_spi_exit(void)
 {
 	/* unregister */
@@ -1380,7 +1376,6 @@ static void __exit ifx_spi_exit(void)
  * We need to initialize upper-edge spi driver after the tty
  * driver because otherwise the spi probe will race
  */
-
 static int __init ifx_spi_init(void)
 {
 	int result;
drivers/tty/serial/ioc3_serial.c +0 -5
index f0f76ea6f8ea..08c2206f4378 100644
@@ -1110,7 +1110,6 @@ static void ioc3_cb_post_ncs(struct uart_port *the_port, int ncs)
  * @buf: place to put the stuff we read
  * @len: how big 'buf' is
  */
-
 static inline int do_read(struct uart_port *the_port, char *buf, int len)
 {
 	int prod_ptr, cons_ptr, total;
@@ -1426,7 +1425,6 @@ static int receive_chars(struct uart_port *the_port)
  * @idd: driver data
  * @pending: interrupts to handle
  */
-
 static inline int
 ioc3uart_intr_one(struct ioc3_submodule *is,
 			struct ioc3_driver_data *idd,
@@ -1626,7 +1624,6 @@ ioc3uart_intr_one(struct ioc3_submodule *is,
  * @pending: interrupts to handle
  *
  */
-
 static int ioc3uart_intr(struct ioc3_submodule *is,
 			struct ioc3_driver_data *idd,
 			unsigned int pending)
@@ -1964,7 +1961,6 @@ static inline int ioc3_serial_core_attach( struct ioc3_submodule *is,
  * @is: submodule struct for this submodule
  * @idd: ioc3 driver data for this submodule
  */
-
 static int ioc3uart_remove(struct ioc3_submodule *is,
 			struct ioc3_driver_data *idd)
 {
@@ -2002,7 +1998,6 @@ static int ioc3uart_remove(struct ioc3_submodule *is,
  * @is: submodule struct for this submodule
  * @idd: ioc3 driver data for this card
  */
-
 static int
 ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd)
 {
drivers/tty/serial/ioc4_serial.c +0 -3
index 804002fae0ee..e2073a0e48d4 100644
@@ -986,7 +986,6 @@ intr_connect(struct ioc4_soft *soft, int type,
  * @irq: irq value
  * @arg: handler arg
  */
-
 static irqreturn_t ioc4_intr(int irq, void *arg)
 {
 	struct ioc4_soft *soft;
@@ -2064,7 +2063,6 @@ static void ioc4_cb_post_ncs(struct uart_port *the_port, int ncs)
  * @buf: place to put the stuff we read
  * @len: how big 'buf' is
  */
-
 static inline int do_read(struct uart_port *the_port, unsigned char *buf,
 				int len)
 {
@@ -2637,7 +2635,6 @@ static struct uart_driver ioc4_uart_rs422 = {
  *
  * @idd: IOC4 master module data for this IOC4
  */
-
 static int ioc4_serial_remove_one(struct ioc4_driver_data *idd)
 {
 	int port_num, port_type;
drivers/tty/serial/men_z135_uart.c +0 -1
index 784756139935..59aee786820c 100644
@@ -860,7 +860,6 @@ static int men_z135_probe(struct mcb_device *mdev,
 
 /**
  * men_z135_remove() - Remove a z135 instance from the system
- *
  * @mdev: The MCB device
  */
 static void men_z135_remove(struct mcb_device *mdev)
drivers/tty/serial/sn_console.c +0 -1
index 2c01168319db..f78aabce3f0d 100644
@@ -835,7 +835,6 @@ device_initcall(sn_sal_init);
  * ia64_sn_console_putb (what sal_puts_raw below actually does).
  *
  */
-
 static void puts_raw_fixed(int (*puts_raw) (const char *s, int len),
 			   const char *s, int count)
 {
drivers/tty/tty_baudrate.c +0 -4
index a3c4969d4265..fac79ff29fb1 100644
@@ -57,7 +57,6 @@ static int n_baud_table = ARRAY_SIZE(baud_table);
  *
  * Locking: none
  */
-
 speed_t tty_termios_baud_rate(struct ktermios *termios)
 {
 	unsigned int cbaud;
@@ -92,7 +91,6 @@ EXPORT_SYMBOL(tty_termios_baud_rate);
  *
  * Locking: none
  */
-
 speed_t tty_termios_input_baud_rate(struct ktermios *termios)
 {
 #ifdef IBSHIFT
@@ -141,7 +139,6 @@ EXPORT_SYMBOL(tty_termios_input_baud_rate);
  * The ifdefs deal with platforms whose owners have yet to update them
  * and will all go away once this is done.
  */
-
 void tty_termios_encode_baud_rate(struct ktermios *termios,
 				  speed_t ibaud, speed_t obaud)
 {
@@ -233,7 +230,6 @@ EXPORT_SYMBOL_GPL(tty_termios_encode_baud_rate);
  * settings. The caller must hold the termios_rwsem for the tty in
  * question.
  */
-
 void tty_encode_baud_rate(struct tty_struct *tty, speed_t ibaud, speed_t obaud)
 {
 	tty_termios_encode_baud_rate(&tty->termios, ibaud, obaud);
drivers/tty/tty_buffer.c +0 -14
index 5f05500ee4d0..447f235eeb0c 100644
@@ -52,7 +52,6 @@
  * On release, the buffer work is restarted if there is data in the
  * flip buffer
  */
-
 void tty_buffer_lock_exclusive(struct tty_port *port)
 {
 	struct tty_bufhead *buf = &port->buf;
@@ -87,7 +86,6 @@ EXPORT_SYMBOL_GPL(tty_buffer_unlock_exclusive);
  * the returned # of bytes (use tty_prepare_flip_string_xxx() to
  * pre-allocate if memory guarantee is required).
  */
-
 int tty_buffer_space_avail(struct tty_port *port)
 {
 	int space = port->buf.mem_limit - atomic_read(&port->buf.mem_used);
@@ -112,7 +110,6 @@ static void tty_buffer_reset(struct tty_buffer *p, size_t size)
  * Remove all the buffers pending on a tty whether queued with data
  * or in the free ring. Must be called when the tty is no longer in use
  */
-
 void tty_buffer_free_all(struct tty_port *port)
 {
 	struct tty_bufhead *buf = &port->buf;
@@ -152,7 +149,6 @@ void tty_buffer_free_all(struct tty_port *port)
  * Return NULL if out of memory or the allocation would exceed the
  * per device queue
  */
-
 static struct tty_buffer *tty_buffer_alloc(struct tty_port *port, size_t size)
 {
 	struct llist_node *free;
@@ -191,7 +187,6 @@ static struct tty_buffer *tty_buffer_alloc(struct tty_port *port, size_t size)
  * Free a tty buffer, or add it to the free list according to our
  * internal strategy
  */
-
 static void tty_buffer_free(struct tty_port *port, struct tty_buffer *b)
 {
 	struct tty_bufhead *buf = &port->buf;
@@ -216,7 +211,6 @@ static void tty_buffer_free(struct tty_port *port, struct tty_buffer *b)
  * Locking: takes buffer lock to ensure single-threaded flip buffer
  *          'consumer'
  */
-
 void tty_buffer_flush(struct tty_struct *tty, struct tty_ldisc *ld)
 {
 	struct tty_port *port = tty->port;
@@ -308,7 +302,6 @@ EXPORT_SYMBOL_GPL(tty_buffer_request_room);
  * Queue a series of bytes to the tty buffering. All the characters
  * passed are marked with the supplied flag. Returns the number added.
  */
-
 int tty_insert_flip_string_fixed_flag(struct tty_port *port,
 		const unsigned char *chars, char flag, size_t size)
 {
@@ -344,7 +337,6 @@ EXPORT_SYMBOL(tty_insert_flip_string_fixed_flag);
  * the flags array indicates the status of the character. Returns the
  * number added.
  */
-
 int tty_insert_flip_string_flags(struct tty_port *port,
 		const unsigned char *chars, const char *flags, size_t size)
 {
@@ -402,7 +394,6 @@ EXPORT_SYMBOL(__tty_insert_flip_char);
  * ldisc side of the queue. It then schedules those characters for
  * processing by the line discipline.
  */
-
 void tty_schedule_flip(struct tty_port *port)
 {
 	struct tty_bufhead *buf = &port->buf;
@@ -427,7 +418,6 @@ EXPORT_SYMBOL(tty_schedule_flip);
  * that need their own block copy routines into the buffer. There is no
  * guarantee the buffer is a DMA target!
  */
-
 int tty_prepare_flip_string(struct tty_port *port, unsigned char **chars,
 		size_t size)
 {
@@ -497,7 +487,6 @@ receive_buf(struct tty_port *port, struct tty_buffer *head, int count)
  * Locking: takes buffer lock to ensure single-threaded flip buffer
  *          'consumer'
  */
-
 static void flush_to_ldisc(struct work_struct *work)
 {
 	struct tty_port *port = container_of(work, struct tty_port, buf.work);
@@ -551,7 +540,6 @@ static void flush_to_ldisc(struct work_struct *work)
  * In the event of the queue being busy for flipping the work will be
  * held off and retried later.
  */
-
 void tty_flip_buffer_push(struct tty_port *port)
 {
 	tty_schedule_flip(port);
@@ -565,7 +553,6 @@ EXPORT_SYMBOL(tty_flip_buffer_push);
  * Set up the initial state of the buffer management for a tty device.
  * Must be called before the other tty buffer functions are used.
  */
-
 void tty_buffer_init(struct tty_port *port)
 {
 	struct tty_bufhead *buf = &port->buf;
@@ -588,7 +575,6 @@ void tty_buffer_init(struct tty_port *port)
  * Change the tty buffer memory limit.
  * Must be called before the other tty buffer functions are used.
  */
-
 int tty_buffer_set_limit(struct tty_port *port, int limit)
 {
 	if (limit < MIN_TTYB_SIZE)
drivers/tty/tty_io.c +0 -36
index 695d80c7a030..938c9966c459 100644
@@ -165,7 +165,6 @@ static void release_tty(struct tty_struct *tty, int idx);
  *
  * Locking: none. Must be called after tty is definitely unused
  */
-
 static void free_tty_struct(struct tty_struct *tty)
 {
 	tty_ldisc_deinit(tty);
@@ -241,7 +240,6 @@ static void tty_del_file(struct file *file)
  *
  * Locking: none
  */
-
 const char *tty_name(const struct tty_struct *tty)
 {
 	if (!tty) /* Hmm.  NULL pointer.  That's fun. */
@@ -313,7 +311,6 @@ static int check_tty_count(struct tty_struct *tty, const char *routine)
  *
  * Locking: caller must hold tty_mutex
  */
-
 static struct tty_driver *get_tty_driver(dev_t device, int *index)
 {
 	struct tty_driver *p;
@@ -520,7 +517,6 @@ static struct file *redirect;
  * informs the line discipline if present that the driver is ready
  * to receive more output data.
  */
-
 void tty_wakeup(struct tty_struct *tty)
 {
 	struct tty_ldisc *ld;
@@ -670,7 +666,6 @@ static void do_tty_hangup(struct work_struct *work)
  * A carrier loss (virtual or otherwise) has occurred on this like
  * schedule a hangup sequence to run after this event.
  */
-
 void tty_hangup(struct tty_struct *tty)
 {
 	tty_debug_hangup(tty, "hangup\n");
@@ -687,7 +682,6 @@ EXPORT_SYMBOL(tty_hangup);
  * We do this synchronously so that when the syscall returns the process
  * is complete. That guarantee is necessary for security reasons.
  */
-
 void tty_vhangup(struct tty_struct *tty)
 {
 	tty_debug_hangup(tty, "vhangup\n");
@@ -702,7 +696,6 @@ EXPORT_SYMBOL(tty_vhangup);
  *
  * Perform a vhangup on the current controlling tty
  */
-
 void tty_vhangup_self(void)
 {
 	struct tty_struct *tty;
@@ -724,7 +717,6 @@ void tty_vhangup_self(void)
  * We do this synchronously so that when the syscall returns the process
  * is complete. That guarantee is necessary for security reasons.
  */
-
 void tty_vhangup_session(struct tty_struct *tty)
 {
 	tty_debug_hangup(tty, "session hangup\n");
@@ -738,7 +730,6 @@ void tty_vhangup_session(struct tty_struct *tty)
  * Return true if the tty has been subject to a vhangup or a carrier
  * loss
  */
-
 int tty_hung_up_p(struct file *filp)
 {
 	return (filp && filp->f_op == &hung_up_tty_fops);
@@ -762,7 +753,6 @@ EXPORT_SYMBOL(tty_hung_up_p);
  * Locking:
  *         flow_lock
  */
-
 void __stop_tty(struct tty_struct *tty)
 {
 	if (tty->stopped)
@@ -793,7 +783,6 @@ EXPORT_SYMBOL(stop_tty);
  * Locking:
  *         flow_lock
  */
-
 void __start_tty(struct tty_struct *tty)
 {
 	if (!tty->stopped || tty->flow_stopped)
@@ -842,7 +831,6 @@ static void tty_update_time(struct timespec64 *time)
  *         Locks the line discipline internally while needed. Multiple
  * read calls may be outstanding in parallel.
  */
-
 static ssize_t tty_read(struct file *file, char __user *buf, size_t count,
 			loff_t *ppos)
 {
@@ -988,7 +976,6 @@ static inline ssize_t do_tty_write(
  *
  * We must still hold the BTM and test the CLOSING flag for the moment.
  */
-
 void tty_write_message(struct tty_struct *tty, char *msg)
 {
 	if (tty) {
@@ -1018,7 +1005,6 @@ void tty_write_message(struct tty_struct *tty, char *msg)
  * and are then processed in chunks to the device. The line discipline
  * write method will not be invoked in parallel for each device.
  */
-
 static ssize_t tty_write(struct file *file, const char __user *buf,
 						size_t count, loff_t *ppos)
 {
@@ -1070,7 +1056,6 @@ ssize_t redirected_tty_write(struct file *file, const char __user *buf,
  *
  * Locking: none for xchar method, write ordering for write method.
  */
-
 int tty_send_xchar(struct tty_struct *tty, char ch)
 {
 	int	was_stopped = tty->stopped;
@@ -1173,7 +1158,6 @@ static struct tty_struct *tty_driver_lookup_tty(struct tty_driver *driver,
  * Initialise the termios structures for this tty. Thus runs under
  * the tty_mutex currently so we can be relaxed about ordering.
  */
-
 void tty_init_termios(struct tty_struct *tty)
 {
 	struct ktermios *tp;
@@ -1302,7 +1286,6 @@ static int tty_reopen(struct tty_struct *tty)
  * really quite straightforward.  The mutex locking can probably be
  * relaxed for the (most common) case of reopening a tty.
  */
-
 struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx)
 {
 	struct tty_struct *tty;
@@ -1463,7 +1446,6 @@ static void queue_release_one_tty(struct kref *kref)
  * Release a reference to a tty device and if need be let the kref
  * layer destruct the object for us
  */
-
 void tty_kref_put(struct tty_struct *tty)
 {
 	if (tty)
@@ -1627,7 +1609,6 @@ EXPORT_SYMBOL_GPL(tty_release_struct);
  * WSH 09/09/97: rewritten to avoid some nasty race conditions that could
  * lead to double frees or releasing memory still in use.
  */
-
 int tty_release(struct inode *inode, struct file *filp)
 {
 	struct tty_struct *tty = file_tty(filp);
@@ -1992,7 +1973,6 @@ static struct tty_struct *tty_open_by_driver(dev_t device, struct inode *inode,
  * Note: the tty_unlock/lock cases without a ref are only safe due to
  * tty_mutex
  */
-
 static int tty_open(struct inode *inode, struct file *filp)
 {
 	struct tty_struct *tty;
@@ -2076,7 +2056,6 @@ static int tty_open(struct inode *inode, struct file *filp)
  * Locking: locks called line discipline but ldisc poll method
  * may be re-entered freely by other callers.
  */
-
 static __poll_t tty_poll(struct file *filp, poll_table *wait)
 {
 	struct tty_struct *tty = file_tty(filp);
@@ -2159,7 +2138,6 @@ static int tty_fasync(int fd, struct file *filp, int on)
  *
  * FIXME: may race normal receive processing
  */
-
 static int tiocsti(struct tty_struct *tty, char __user *p)
 {
 	char ch, mbz = 0;
@@ -2188,7 +2166,6 @@ static int tiocsti(struct tty_struct *tty, char __user *p)
  * Locking: tty->winsize_mutex is taken to ensure the winsize data
  *          is consistent.
  */
-
 static int tiocgwinsz(struct tty_struct *tty, struct winsize __user *arg)
 {
 	int err;
@@ -2209,7 +2186,6 @@ static int tiocgwinsz(struct tty_struct *tty, struct winsize __user *arg)
  * Update the termios variables and send the necessary signals to
  * peform a terminal resize correctly
  */
-
 int tty_do_resize(struct tty_struct *tty, struct winsize *ws)
 {
 	struct pid *pgrp;
@@ -2246,7 +2222,6 @@ EXPORT_SYMBOL(tty_do_resize);
  * tty termios mutex and ctrl_lock. The console takes its own lock
  * then calls into the default method.
  */
-
 static int tiocswinsz(struct tty_struct *tty, struct winsize __user *arg)
 {
 	struct winsize tmp_ws;
@@ -2267,7 +2242,6 @@ static int tiocswinsz(struct tty_struct *tty, struct winsize __user *arg)
  *
  * Locking: uses redirect_lock to guard the redirect information
  */
-
 static int tioccons(struct file *file)
 {
 	if (!capable(CAP_SYS_ADMIN))
@@ -2303,7 +2277,6 @@ static int tioccons(struct file *file)
  *
  * Locking: none, the open file handle ensures it won't go away.
  */
-
 static int fionbio(struct file *file, int __user *p)
 {
 	int nonblock;
@@ -2329,7 +2302,6 @@ static int fionbio(struct file *file, int __user *p)
  *
  * Locking: see tty_set_ldisc, this function is just a helper
  */
-
 static int tiocsetd(struct tty_struct *tty, int __user *p)
 {
 	int disc;
@@ -2353,7 +2325,6 @@ static int tiocsetd(struct tty_struct *tty, int __user *p)
  * Locking: waits for ldisc reference (in case the line discipline
  *          is changing or the tty is being hungup)
  */
-
 static int tiocgetd(struct tty_struct *tty, int __user *p)
 {
 	struct tty_ldisc *ld;
@@ -2379,7 +2350,6 @@ static int tiocgetd(struct tty_struct *tty, int __user *p)
  *         atomic_write_lock serializes
  *
  */
-
 static int send_break(struct tty_struct *tty, unsigned int duration)
 {
 	int retval;
@@ -2418,7 +2388,6 @@ static int send_break(struct tty_struct *tty, unsigned int duration)
  *
  * Locking: none (up to the driver)
  */
-
 static int tty_tiocmget(struct tty_struct *tty, int __user *p)
 {
 	int retval = -EINVAL;
@@ -2443,7 +2412,6 @@ static int tty_tiocmget(struct tty_struct *tty, int __user *p)
  *
  * Locking: none (up to the driver)
  */
-
 static int tty_tiocmset(struct tty_struct *tty, unsigned int cmd,
 	     unsigned __user *p)
 {
@@ -2810,7 +2778,6 @@ static struct device *tty_get_device(struct tty_struct *tty)
  *
  * Locking: none - tty in question is not exposed at this point
  */
-
 struct tty_struct *alloc_tty_struct(struct tty_driver *driver, int idx)
 {
 	struct tty_struct *tty;
@@ -2862,7 +2829,6 @@ struct tty_struct *alloc_tty_struct(struct tty_driver *driver, int idx)
  * Note: the specific put_char operation in the driver layer may go
  * away soon. Don't call it directly, use this method
  */
-
 int tty_put_char(struct tty_struct *tty, unsigned char ch)
 {
 	if (tty->ops->put_char)
@@ -2908,7 +2874,6 @@ static int tty_cdev_add(struct tty_driver *driver, dev_t dev,
  *
  * Locking: ??
  */
-
 struct device *tty_register_device(struct tty_driver *driver, unsigned index,
 				   struct device *device)
 {
@@ -3022,7 +2987,6 @@ EXPORT_SYMBOL_GPL(tty_register_device_attr);
  *
  * Locking: ??
  */
-
 void tty_unregister_device(struct tty_driver *driver, unsigned index)
 {
 	device_destroy(tty_class,
drivers/tty/tty_ioctl.c +0 -13
index cb72dc6085d8..ca5d3923342d 100644
@@ -52,7 +52,6 @@
  * output queue. If no private method is supplied there is assumed
  * to be no queue on the device.
  */
-
 int tty_chars_in_buffer(struct tty_struct *tty)
 {
 	if (tty->ops->chars_in_buffer)
@@ -72,7 +71,6 @@ EXPORT_SYMBOL(tty_chars_in_buffer);
  * the number of bytes written. If no method is provided 2K is always
  * returned and data may be lost as there will be no flow control.
  */
-
 int tty_write_room(struct tty_struct *tty)
 {
 	if (tty->ops->write_room)
@@ -105,7 +103,6 @@ EXPORT_SYMBOL(tty_driver_flush_buffer);
  * and also to ensure the driver can consistently reference its own
  * termios data at this point when implementing software flow control.
  */
-
 void tty_throttle(struct tty_struct *tty)
 {
 	down_write(&tty->termios_rwsem);
@@ -130,7 +127,6 @@ EXPORT_SYMBOL(tty_throttle);
  * Drivers should however remember that the stack can issue a throttle,
  * then change flow control method, then unthrottle.
  */
-
 void tty_unthrottle(struct tty_struct *tty)
 {
 	down_write(&tty->termios_rwsem);
@@ -153,7 +149,6 @@ EXPORT_SYMBOL(tty_unthrottle);
  *
  * Returns 0 if tty is throttled (or was already throttled)
  */
-
 int tty_throttle_safe(struct tty_struct *tty)
 {
 	int ret = 0;
@@ -184,7 +179,6 @@ int tty_throttle_safe(struct tty_struct *tty)
  *
  * Returns 0 if tty is unthrottled (or was already unthrottled)
  */
-
 int tty_unthrottle_safe(struct tty_struct *tty)
 {
 	int ret = 0;
@@ -214,7 +208,6 @@ int tty_unthrottle_safe(struct tty_struct *tty)
  *
  * Locking: none
  */
-
 void tty_wait_until_sent(struct tty_struct *tty, long timeout)
 {
 	tty_debug_wait_until_sent(tty, "wait until sent, timeout=%ld\n", timeout);
@@ -310,7 +303,6 @@ EXPORT_SYMBOL(tty_termios_hw_change);
  *
  * Locking: termios_rwsem
  */
-
 int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)
 {
 	struct ktermios old_termios;
@@ -358,7 +350,6 @@ EXPORT_SYMBOL_GPL(tty_set_termios);
  * Locking:
  *         Called functions take ldisc and termios_rwsem locks
  */
-
 static int set_termios(struct tty_struct *tty, void __user *arg, int opt)
 {
 	struct ktermios tmp_termios;
@@ -455,7 +446,6 @@ static int get_termio(struct tty_struct *tty, struct termio __user *termio)
  * Implement the device calling points for the SYS5 termiox ioctl
  * interface in Linux
  */
-
 static int set_termiox(struct tty_struct *tty, void __user *arg, int opt)
 {
 	struct termiox tnew;
@@ -563,7 +553,6 @@ static void set_sgflags(struct ktermios *termios, int flags)
  *
  * Locking: termios_rwsem
  */
-
 static int set_sgttyb(struct tty_struct *tty, struct sgttyb __user *sgttyb)
 {
 	int retval;
@@ -674,7 +663,6 @@ static int set_ltchars(struct tty_struct *tty, struct ltchars __user *ltchars)
  * Perform a change to the CLOCAL state and call into the driver
  * layer to make it visible. All done with the termios rwsem
  */
-
 static int tty_change_softcar(struct tty_struct *tty, int arg)
 {
 	int ret = 0;
@@ -704,7 +692,6 @@ static int tty_change_softcar(struct tty_struct *tty, int arg)
  * is designed to be called by line disciplines to ensure they provide
  * consistent mode setting.
  */
-
 int tty_mode_ioctl(struct tty_struct *tty, struct file *file,
 			unsigned int cmd, unsigned long arg)
 {
drivers/tty/tty_ldisc.c +0 -19
index d86c4c516f25..d54985ea6088 100644
@@ -57,7 +57,6 @@ static struct tty_ldisc_ops *tty_ldiscs[NR_LDISCS];
  * Locking:
  *         takes tty_ldiscs_lock to guard against ldisc races
  */
-
 int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc)
 {
 	unsigned long flags;
@@ -87,7 +86,6 @@ EXPORT_SYMBOL(tty_register_ldisc);
  * Locking:
  *         takes tty_ldiscs_lock to guard against ldisc races
  */
-
 int tty_unregister_ldisc(int disc)
 {
 	unsigned long flags;
@@ -155,7 +153,6 @@ static void put_ldops(struct tty_ldisc_ops *ldops)
  * Locking:
  *         takes tty_ldiscs_lock to guard against ldisc races
  */
-
 static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc)
 {
 	struct tty_ldisc *ld;
@@ -255,7 +252,6 @@ const struct seq_operations tty_ldiscs_seq_ops = {
  * Note: a file_operations routine (read/poll/write) should use this
  * function to wait for any ldisc lifetime events to finish.
  */
-
 struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *tty)
 {
 	struct tty_ldisc *ld;
@@ -276,7 +272,6 @@ EXPORT_SYMBOL_GPL(tty_ldisc_ref_wait);
  * reference to it. If the line discipline is in flux then
  * return NULL. Can be called from IRQ and timer functions.
  */
-
 struct tty_ldisc *tty_ldisc_ref(struct tty_struct *tty)
 {
 	struct tty_ldisc *ld = NULL;
@@ -297,7 +292,6 @@ EXPORT_SYMBOL_GPL(tty_ldisc_ref);
  * Undoes the effect of tty_ldisc_ref or tty_ldisc_ref_wait. May
  * be called in IRQ context.
  */
-
 void tty_ldisc_deref(struct tty_ldisc *ld)
 {
 	ldsem_up_read(&ld->tty->ldisc_sem);
@@ -396,7 +390,6 @@ static void tty_ldisc_unlock_pair(struct tty_struct *tty,
  * Flush the line discipline queue (if any) and the tty flip buffers
  * for this tty.
  */
-
 void tty_ldisc_flush(struct tty_struct *tty)
 {
 	struct tty_ldisc *ld = tty_ldisc_ref(tty);
@@ -422,7 +415,6 @@ EXPORT_SYMBOL_GPL(tty_ldisc_flush);
  *
  * Locking: takes termios_rwsem
  */
-
 static void tty_set_termios_ldisc(struct tty_struct *tty, int disc)
 {
 	down_write(&tty->termios_rwsem);
@@ -443,7 +435,6 @@ static void tty_set_termios_ldisc(struct tty_struct *tty, int disc)
  *
  * Locking: always called with BTM already held.
  */
-
 static int tty_ldisc_open(struct tty_struct *tty, struct tty_ldisc *ld)
 {
 	WARN_ON(test_and_set_bit(TTY_LDISC_OPEN, &tty->flags));
@@ -468,7 +459,6 @@ static int tty_ldisc_open(struct tty_struct *tty, struct tty_ldisc *ld)
  * A helper close method. Also a convenient debugging and check
  * point.
  */
-
 static void tty_ldisc_close(struct tty_struct *tty, struct tty_ldisc *ld)
 {
 	WARN_ON(!test_bit(TTY_LDISC_OPEN, &tty->flags));
@@ -486,7 +476,6 @@ static void tty_ldisc_close(struct tty_struct *tty, struct tty_ldisc *ld)
  * Helper to try and recover a tty when switching back to the old
  * ldisc fails and we need something attached.
  */
-
 static int tty_ldisc_failto(struct tty_struct *tty, int ld)
 {
 	struct tty_ldisc *disc = tty_ldisc_get(tty, ld);
@@ -509,7 +498,6 @@ static int tty_ldisc_failto(struct tty_struct *tty, int ld)
  * Restore the previous line discipline or N_TTY when a line discipline
  * change fails due to an open error
  */
-
 static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old)
 {
 	/* There is an outstanding reference here so this is safe */
@@ -536,7 +524,6 @@ static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old)
  * overlapping ldisc change (including on the other end of pty pairs),
  * the close of one side of a tty/pty pair, and eventually hangup.
  */
-
 int tty_set_ldisc(struct tty_struct *tty, int disc)
 {
 	int retval;
@@ -632,7 +619,6 @@ static void tty_ldisc_kill(struct tty_struct *tty)
  *
  * Restore a terminal to the driver default state.
  */
-
 static void tty_reset_termios(struct tty_struct *tty)
 {
 	down_write(&tty->termios_rwsem);
@@ -656,7 +642,6 @@ static void tty_reset_termios(struct tty_struct *tty)
  *
  * Returns 0 if successful, otherwise error code < 0
  */
-
 int tty_ldisc_reinit(struct tty_struct *tty, int disc)
 {
 	struct tty_ldisc *ld;
@@ -698,7 +683,6 @@ int tty_ldisc_reinit(struct tty_struct *tty, int disc)
  * In the pty pair case this occurs in the close() path of the
  * tty itself so we must be careful about locking rules.
  */
-
 void tty_ldisc_hangup(struct tty_struct *tty, bool reinit)
 {
 	struct tty_ldisc *ld;
@@ -752,7 +736,6 @@ void tty_ldisc_hangup(struct tty_struct *tty, bool reinit)
  * line disciplines and bind them to the tty. This has no locking issues
  * as the device isn't yet active.
  */
-
 int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty)
 {
 	int retval = tty_ldisc_open(tty, tty->ldisc);
@@ -776,7 +759,6 @@ int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty)
  * Called during the final close of a tty or a pty pair in order to shut
  * down the line discpline layer. On exit, each tty's ldisc is NULL.
  */
-
 void tty_ldisc_release(struct tty_struct *tty)
 {
 	struct tty_struct *o_tty = tty->link;
@@ -806,7 +788,6 @@ EXPORT_SYMBOL_GPL(tty_ldisc_release);
  * Set up the line discipline objects for a newly allocated tty. Note that
  * the tty structure is not completely set up when this call is made.
  */
-
 int tty_ldisc_init(struct tty_struct *tty)
 {
 	struct tty_ldisc *ld = tty_ldisc_get(tty, N_TTY);
drivers/tty/vt/vt_ioctl.c +0 -3
index 0d1b232cb5fd..46062e984daa 100644
@@ -86,7 +86,6 @@ static DECLARE_WAIT_QUEUE_HEAD(vt_event_waitqueue);
  *
  * Post an VT event to interested VT handlers
  */
-
 void vt_event_post(unsigned int event, unsigned int old, unsigned int new)
 {
 	struct list_head *pos, *head;
@@ -163,7 +162,6 @@ static void vt_event_wait(struct vt_event_wait *vw)
  *
  * Implement the VT_WAITEVENT ioctl using the VT event interface
  */
-
 static int vt_event_wait_ioctl(struct vt_event __user *event)
 {
 	struct vt_event_wait vw;
@@ -192,7 +190,6 @@ static int vt_event_wait_ioctl(struct vt_event __user *event)
  * Helper for event waits. Used to implement the legacy
  * event waiting ioctls in terms of events
  */
-
 int vt_waitactive(int n)
 {
 	struct vt_event_wait vw;
Signature · 1 line
2.17.1
#8 lore raw

PATCH v2 7/7 tty: Fix section format

In reply to Tobin C. Harding

Currently sections (specifically 'Return:' and 'Context:') are non-uniform and/or incorrectly labelled. We should use the format outlined in Documentation/doc-guide/kernel-doc.rst. This patch is a bit of a mash up because text is on occasions mixed up in the current comments.

- Use 'Context:' (Replaces 'Locking')

* Context: Describes whether the function can sleep, what locks it
* takes, releases, or expects to be held. It can extend over
* multiple lines.

- Use 'Return:'

* Return: Describe the return value of foobar.
*
* The return value description can also have multiple paragraphs, and
* should be placed at the end of the comment block.

- If brief description is too long spilt it up into brief and longer.

* A longer description, with more discussion of the function
* function_name() that might be useful to those using or modifying
* it. Begins with an empty comment line, and may include additional
* embedded empty comment lines.

Fix brief description if missing and long description present.

This patch leaves some instances of 'Locking:' still in the code (if I was not _sure_ of the documented locking or if changing it would make the comment less legible).

---
 drivers/tty/hvc/hvc_console.c       |   4 +-
 drivers/tty/hvc/hvc_iucv.c          |  14 +--
 drivers/tty/mips_ejtag_fdc.c        |   4 +-
 drivers/tty/n_gsm.c                 |  37 ++++----
 drivers/tty/n_hdlc.c                |  14 +--
 drivers/tty/n_tracerouter.c         |  14 ++-
 drivers/tty/n_tracesink.c           |  20 ++---
 drivers/tty/n_tty.c                 | 117 ++++++++++++-------------
 drivers/tty/pty.c                   |  19 ++--
 drivers/tty/serial/8250/8250_core.c |  14 +--
 drivers/tty/serial/amba-pl011.c     |   2 +-
 drivers/tty/serial/earlycon.c       |   4 +-
 drivers/tty/serial/ifx6x60.c        |  12 +--
 drivers/tty/serial/serial_txx9.c    |   5 +-
 drivers/tty/serial/xilinx_uartps.c  |  21 +++--
 drivers/tty/tty_audit.c             |   9 +-
 drivers/tty/tty_baudrate.c          |  31 +++----
 drivers/tty/tty_buffer.c            |  26 +++---
 drivers/tty/tty_io.c                | 129 +++++++++++++---------------
 drivers/tty/tty_ioctl.c             |  15 ++--
 drivers/tty/tty_jobctrl.c           |  20 ++---
 drivers/tty/tty_ldisc.c             |  43 +++++-----
 drivers/tty/tty_port.c              |   8 +-
 drivers/tty/vt/consolemap.c         |   4 +-
 drivers/tty/vt/keyboard.c           |   6 +-
 drivers/tty/vt/selection.c          |  10 ++-
 drivers/tty/vt/vt.c                 |  26 +++---
 27 files changed, 310 insertions(+), 318 deletions(-)
drivers/tty/hvc/hvc_console.c +2 -2
index 6d57d0bfff5d..9379de272995 100644
@@ -569,7 +569,7 @@ static int hvc_write(struct tty_struct *tty, const unsigned char *buf, int count
  * The routine shall not be called within an atomic context because it
  * might sleep.
  *
- * Locking:	hp->lock
+ * Context: Take hp->lock
  */
 static void hvc_set_winsz(struct work_struct *work)
 {
@@ -784,7 +784,7 @@ EXPORT_SYMBOL_GPL(hvc_poll);
  * Stores the specified window size information in the hvc structure of @hp.
  * The function schedule the tty resize update.
  *
- * Locking:	Locking free; the function MUST be called holding hp->lock
+ * Context: Locking free; the function MUST be called holding hp->lock
  */
 void __hvc_resize(struct hvc_struct *hp, struct winsize ws)
 {
drivers/tty/hvc/hvc_iucv.c +7 -7
index 2af1e5751bd6..0de673b29b31 100644
@@ -147,7 +147,8 @@ static struct hvc_iucv_private *hvc_iucv_get_private(uint32_t num)
  * required for receiving and sending data with IUCV.
  * Note: The total message size arises from the internal buffer size and the
  *	 members of the iucv_tty_msg structure.
- * The function returns NULL if memory allocation has failed.
+ *
+ * Return: NULL if memory allocation has failed.
  */
 static struct iucv_tty_buffer *alloc_tty_buffer(size_t size, gfp_t flags)
 {
@@ -210,9 +211,9 @@ static void destroy_tty_buffer_list(struct list_head *list)
  * If all message data has been written, the message is removed from
  * the input queue.
  *
- * The function returns the number of bytes written to the terminal, zero if
- * there are no pending data messages available or if there is no established
- * IUCV path.
+ * Return: The number of bytes written to the terminal, zero if there are no
+ * pending data messages available or if there is no established IUCV path.
+ *
  * If the IUCV path has been severed, then -EPIPE is returned to cause a
  * hang up (that is issued by the HVC layer).
  */
@@ -309,9 +310,8 @@ static int hvc_iucv_write(struct hvc_iucv_private *priv,
  * If an IUCV communication path has been established, pending IUCV messages
  * are received and data is copied into buffer @buf up to @count bytes.
  *
- * Locking:	The routine gets called under an irqsave() spinlock; and
- *		the routine locks the struct hvc_iucv_private->lock to call
- *		helper functions.
+ * Context: The routine gets called under an irqsave() spinlock; locks
+ *          the struct hvc_iucv_private->lock to call helper functions.
  */
 static int hvc_iucv_get_chars(uint32_t vtermno, char *buf, int count)
 {
drivers/tty/mips_ejtag_fdc.c +2 -2
index 4c1cd49ae95b..6d2e9e145770 100644
@@ -409,7 +409,7 @@ static struct mips_ejtag_fdc_console mips_ejtag_fdc_con = {
  * Write a single block of data out to the debug adapter. If the circular buffer
  * is wrapped then only the first block is written.
  *
- * Returns:	The number of bytes that were written.
+ * Return: The number of bytes that were written.
  */
 static unsigned int mips_ejtag_fdc_put_chan(struct mips_ejtag_fdc_tty *priv,
 					    unsigned int chan)
@@ -643,7 +643,7 @@ static void mips_ejtag_fdc_handle(struct mips_ejtag_fdc_tty *priv)
  *
  * It simply triggers the common FDC handler code.
  *
- * Returns:	IRQ_HANDLED if an FDC interrupt was pending.
+ * Return:	IRQ_HANDLED if an FDC interrupt was pending.
  *		IRQ_NONE otherwise.
  */
 static irqreturn_t mips_ejtag_fdc_isr(int irq, void *dev_id)
drivers/tty/n_gsm.c +22 -15
index c65a9afb7cc4..fbc8d0a15676 100644
@@ -393,7 +393,8 @@ static inline u8 gsm_fcs_add_block(u8 fcs, u8 *c, int len)
  * @c: byte going into the EA
  *
  * Processes one byte of an EA. Updates the passed variable
- * and returns 1 if the EA is now completely read
+ *
+ * Return: 1 if the EA is now completely read.
  */
 static int gsm_read_ea(unsigned int *val, u8 c)
 {
@@ -701,8 +702,9 @@ static void gsm_data_kick(struct gsm_mux *gsm)
  * @msg: message queued
  *
  * Add data to the transmit queue and try and get stuff moving
- * out of the mux tty if not already doing so. The Caller must hold
- * the gsm tx lock.
+ * out of the mux tty if not already doing so.
+ *
+ * Context: The Caller must hold the gsm tx lock.
  */
 static void __gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
 {
@@ -751,8 +753,9 @@ static void __gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
  * @msg: message queued
  *
  * Add data to the transmit queue and try and get stuff moving
- * out of the mux tty if not already doing so. Take the
- * the gsm tx lock and dlci lock.
+ * out of the mux tty if not already doing so.
+ *
+ * Context: Take the gsm tx lock and dlci lock.
  */
 static void gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
 {
@@ -771,7 +774,7 @@ static void gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
  * is data. Keep to the MRU of the mux. This path handles the usual tty
  * interface which is a byte stream with optional modem data.
  *
- * Caller must hold the tx_lock of the mux.
+ * Context: Caller must hold the tx_lock of the mux.
  */
 static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci)
 {
@@ -823,7 +826,7 @@ static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci)
  * is data. Keep to the MRU of the mux. This path handles framed data
  * queued as skbuffs to the DLCI.
  *
- * Caller must hold the tx_lock of the mux.
+ * Context: Caller must hold the tx_lock of the mux.
  */
 static int gsm_dlci_data_output_framed(struct gsm_mux *gsm,
 						struct gsm_dlci *dlci)
@@ -1266,7 +1269,9 @@ static void gsm_control_response(struct gsm_mux *gsm, unsigned int command,
  * @gsm: gsm mux
  * @ctrl: frame to send
  *
- * Send out a pending control command (called under control lock)
+ * Send out a pending control command.
+
+ * Context: Called under control lock.
  */
 static void gsm_control_transmit(struct gsm_mux *gsm, struct gsm_control *ctrl)
 {
@@ -1360,8 +1365,10 @@ static struct gsm_control *gsm_control_send(struct gsm_mux *gsm,
  * @control: control we are waiting on
  *
  * Waits for the control to complete or time out. Frees any used
- * resources and returns 0 for success, or an error if the remote
- * rejected or ignored the request.
+ * resources.
+ *
+ * Return: 0 for success, or an error if the remote rejected or
+ *         ignored the request.
  */
 static int gsm_control_wait(struct gsm_mux *gsm, struct gsm_control *control)
 {
@@ -1641,7 +1648,7 @@ static struct gsm_dlci *gsm_dlci_alloc(struct gsm_mux *gsm, int addr)
  *
  * Free up a DLCI.
  *
- * Can sleep.
+ * Context: Can sleep.
  */
 static void gsm_dlci_free(struct tty_port *port)
 {
@@ -1674,7 +1681,7 @@ static void gsm_destroy_network(struct gsm_dlci *dlci);
  * Release a DLCI. Actual free is deferred until either
  * mux is closed or tty is closed - whichever is last.
  *
- * Can sleep.
+ * Context: Can sleep.
  */
 static void gsm_dlci_release(struct gsm_dlci *dlci)
 {
@@ -2381,7 +2388,7 @@ static void gsmld_write_wakeup(struct tty_struct *tty)
  * parallel readers and must handle this ourselves. We may also get
  * a hangup. Always called in user context, may sleep.
  *
- * This code must be sure never to sleep through a hangup.
+ * Context: This code must be sure never to sleep through a hangup.
  */
 static ssize_t gsmld_read(struct tty_struct *tty, struct file *file,
 			 unsigned char __user *buf, size_t nr)
@@ -2422,8 +2429,8 @@ static ssize_t gsmld_write(struct tty_struct *tty, struct file *file,
  * for special events. This code is not serialized with respect to
  * other events save open/close.
  *
- * This code must be sure never to sleep through a hangup.
- * Called without the kernel lock held - fine
+ * Context: This code must be sure never to sleep through a hangup.
+ *          Called without the kernel lock held - fine.
  */
 static __poll_t gsmld_poll(struct tty_struct *tty, struct file *file,
 							poll_table *wait)
drivers/tty/n_hdlc.c +7 -7
index 5b0c776a43a2..af134fd20838 100644
@@ -321,7 +321,7 @@ static void n_hdlc_tty_close(struct tty_struct *tty)
  * n_hdlc_tty_open() - called when line discipline changed to n_hdlc
  * @tty - pointer to tty info structure
  *
- * Returns 0 if success, otherwise error code
+ * Return: 0 if success, otherwise error code.
  */
 static int n_hdlc_tty_open (struct tty_struct *tty)
 {
@@ -555,7 +555,7 @@ static void n_hdlc_tty_receive(struct tty_struct *tty, const __u8 *data,
  * @buf - pointer to returned data buffer
  * @nr - size of returned data buffer
  *
- * Returns the number of bytes returned or error code.
+ * Return: The number of bytes returned or error code.
  */
 static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
 			   __u8 __user *buf, size_t nr)
@@ -639,7 +639,7 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
  * @data - pointer to transmit data (one frame)
  * @count - size of transmit frame in bytes
  *
- * Returns the number of bytes written (or error code).
+ * Return: The number of bytes written or error code.
  */
 static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
 			    const unsigned char *data, size_t count)
@@ -723,7 +723,7 @@ static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
  * @cmd - IOCTL command code
  * @arg - argument for IOCTL call (cmd dependent)
  *
- * Returns command dependent result.
+ * Return: Command dependent result.
  */
 static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file,
 			    unsigned int cmd, unsigned long arg)
@@ -795,7 +795,7 @@ static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file,
  * Determine which operations (read/write) will not block and return info
  * to caller.
  *
- * Returns a bit mask containing info on which ops will not block.
+ * Return: A bit mask containing info on which ops will not block.
  */
 static __poll_t n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp,
 				    poll_table *wait)
@@ -830,7 +830,7 @@ static __poll_t n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp,
 /**
  * n_hdlc_alloc() - allocate an n_hdlc instance data structure
  *
- * Returns a pointer to newly created structure if success, otherwise %NULL
+ * Return: A pointer to newly created structure if success, otherwise %NULL.
  */
 static struct n_hdlc *n_hdlc_alloc(void)
 {
@@ -920,7 +920,7 @@ static void n_hdlc_buf_put(struct n_hdlc_buf_list *buf_list,
  * Remove and return an HDLC buffer from the head of the specified HDLC buffer
  * list.
  *
- * Returns a pointer to HDLC buffer if available, otherwise %NULL.
+ * Return: A pointer to HDLC buffer if available, otherwise %NULL.
  */
 static struct n_hdlc_buf *n_hdlc_buf_get(struct n_hdlc_buf_list *buf_list)
 {
drivers/tty/n_tracerouter.c +5 -9
index f7a2616145cf..a54e1aed019f 100644
@@ -53,10 +53,9 @@ static DEFINE_MUTEX(routelock);
  * n_tracerouter_open() - Called when a tty is opened by a SW entity.
  * @tty: terminal device to the ldisc.
  *
- * Return:
- *      0 for success.
- *
  * Caveats: This should only be opened one time per SW entity.
+ *
+ * Return: 0 for success.
  */
 static int n_tracerouter_open(struct tty_struct *tty)
 {
@@ -114,8 +113,7 @@ static void n_tracerouter_close(struct tty_struct *tty)
  * -EIO should be used just to show that there was an intent not to have
  * this function implemented.  Return value based on read() man pages.
  *
- * Return:
- *	 -EINVAL
+ * Return: -EINVAL
  */
 static ssize_t n_tracerouter_read(struct tty_struct *tty, struct file *file,
 				  unsigned char __user *buf, size_t nr) {
@@ -138,8 +136,7 @@ static ssize_t n_tracerouter_read(struct tty_struct *tty, struct file *file,
  * just to show that there was an intent not to have this function
  * implemented.  Return value based on write() man pages.
  *
- * Return:
- *	-EINVAL
+ * Return: -EINVAL
  */
 static ssize_t n_tracerouter_write(struct tty_struct *tty, struct file *file,
 				   const unsigned char *buf, size_t nr) {
@@ -188,8 +185,7 @@ static struct tty_ldisc_ops tty_ptirouter_ldisc = {
  *
  * Registers this module as a line discipline driver.
  *
- * Return:
- *	0 for success, any other value error.
+ * Return: 0 for success, any other value error.
  */
 static int __init n_tracerouter_init(void)
 {
drivers/tty/n_tracesink.c +7 -13
index 8feeea7d33b6..fc5013f34d51 100644
@@ -51,15 +51,12 @@ static DEFINE_MUTEX(writelock);
  * n_tracesink_open() - Called when a tty is opened by a SW entity.
  * @tty: terminal device to the ldisc.
  *
- * Return:
- *      0 for success,
- *      -EFAULT = couldn't get a tty kref n_tracesink will sit
- *       on top of
- *      -EEXIST = open() called successfully once and it cannot
- *      be called again.
- *
  * Caveats: open() should only be successful the first time a
  * SW entity calls it.
+ *
+ * Return: 0 for success. -EFAULT = couldn't get a tty kref n_tracesink
+ *         will sit on top of. -EEXIST = open() called successfully once
+ *         and it cannot be called again.
  */
 static int n_tracesink_open(struct tty_struct *tty)
 {
@@ -111,8 +108,7 @@ static void n_tracesink_close(struct tty_struct *tty)
  * -EIO should be used just to show that there was an intent not to have
  * this function implemented.  Return value based on read() man pages.
  *
- * Return:
- *	 -EINVAL
+ * Return: -EINVAL
  */
 static ssize_t n_tracesink_read(struct tty_struct *tty, struct file *file,
 				unsigned char __user *buf, size_t nr) {
@@ -135,8 +131,7 @@ static ssize_t n_tracesink_read(struct tty_struct *tty, struct file *file,
  * just to show that there was an intent not to have this function
  * implemented.  Return value based on write() man pages.
  *
- * Return:
- *	-EINVAL
+ * Return: -EINVAL
  */
 static ssize_t n_tracesink_write(struct tty_struct *tty, struct file *file,
 				 const unsigned char *buf, size_t nr) {
@@ -192,8 +187,7 @@ static struct tty_ldisc_ops tty_n_tracesink = {
  *
  * Registers this module as a line discipline driver.
  *
- * Return:
- *	0 for success, any other value error.
+ * Return: 0 for success, any other value error.
  */
 static int __init n_tracesink_init(void)
 {
drivers/tty/n_tty.c +56 -61

269 lines not on this page · raw message

drivers/tty/pty.c +11 -8
index 35cb13995c1c..c3db7d6d7b5b 100644
@@ -369,7 +369,7 @@ static void pty_stop(struct tty_struct *tty)
  * Perform the initial set up for the tty/pty pair. Called from the
  * tty layer when the port is first opened.
  *
- * Locking: the caller must hold the tty_mutex
+ * Context: The caller must hold the tty_mutex.
  */
 static int pty_common_install(struct tty_driver *driver, struct tty_struct *tty,
 		bool legacy)
@@ -687,8 +687,9 @@ static long pty_unix98_compat_ioctl(struct tty_struct *tty,
  * @driver: ptm driver
  * @idx: tty index
  *
- * Look up a pty master device. Called under the tty_mutex for now.
- * This provides our locking.
+ * Look up a pty master device.
+ *
+ * Context: Called under the tty_mutex for now. This provides our locking.
  */
 static struct tty_struct *ptm_unix98_lookup(struct tty_driver *driver,
 		struct file *file, int idx)
@@ -702,8 +703,10 @@ static struct tty_struct *ptm_unix98_lookup(struct tty_driver *driver,
  * @driver: pts driver
  * @idx: tty index
  *
- * Look up a pty master device. Called under the tty_mutex for now.
- * This provides our locking for the tty pointer.
+ * Look up a pty master device.
+ *
+ * Context: Called under the tty_mutex for now.  This provides our
+ *          locking for the tty pointer.
  */
 static struct tty_struct *pts_unix98_lookup(struct tty_driver *driver,
 		struct file *file, int idx)
@@ -787,9 +790,9 @@ static const struct tty_operations pty_unix98_ops = {
  *
  * Allocate a unix98 pty master device from the ptmx driver.
  *
- * Locking: tty_mutex protects the init_dev work. tty->count should
- *          protect the rest.
- *          allocated_ptys_lock handles the list of free pty numbers
+ * Context: tty_mutex protects the init_dev work. tty->count should
+ *          protect the rest.  allocated_ptys_lock handles the list
+ *          of free pty numbers.
  */
 static int ptmx_open(struct inode *inode, struct file *filp)
 {
drivers/tty/serial/8250/8250_core.c +8 -6
index 63d7537a1db1..e5157e0679de 100644
@@ -404,9 +404,10 @@ static struct uart_8250_port serial8250_ports[UART_NR];
  * This struct *must* *not* be used to perform a 8250 or serial core operation
  * which is not accessible otherwise. Its only purpose is to make the struct
  * accessible to the runtime-pm callbacks for context suspend/restore.
- * The lock assumption made here is none because runtime-pm suspend/resume
- * callbacks should not be invoked if there is any operation performed on the
- * port.
+ *
+ * Context: The lock assumption made here is none because runtime-pm
+ *          suspend/resume callbacks should not be invoked if there is any
+ *          operation performed on the port.
  */
 struct uart_8250_port *serial8250_get_port(int line)
 {
@@ -624,7 +625,7 @@ static int univ8250_console_setup(struct console *co, char *options)
  * Performs console setup for a match (as required by interface)
  * If no <options> are specified, then assume the h/w is already setup.
  *
- * Returns 0 if console matches; otherwise non-zero to use default matching
+ * Return: 0 if console matches; otherwise non-zero to use default matching.
  */
 static int univ8250_console_match(struct console *co, char *name, int idx,
 				  char *options)
@@ -1066,8 +1067,9 @@ EXPORT_SYMBOL(serial8250_register_8250_port);
  * serial8250_unregister_port() - remove a 16x50 serial port at runtime
  * @line: serial line number
  *
- * Remove one serial port.  This may not be called from interrupt
- * context.  We hand the port back to the our control.
+ * Remove one serial port.  We hand the port back to the our control.
+ *
+ * Context: This may not be called from interrupt context.
  */
 void serial8250_unregister_port(int line)
 {
drivers/tty/serial/amba-pl011.c +1 -1
index 589adc597923..73fd98fd13e4 100644
@@ -2355,7 +2355,7 @@ static int __init pl011_console_setup(struct console *co, char *options)
  * Performs console setup for a match (as required by interface)
  * If no <options> are specified, then assume the h/w is already setup.
  *
- * Returns 0 if console matches; otherwise non-zero to use default matching
+ * Return: 0 if console matches; otherwise non-zero to use default matching.
  */
 static int __init pl011_console_match(struct console *co, char *name, int idx,
 				      char *options)
drivers/tty/serial/earlycon.c +2 -2
index 85bd5a5d7f39..f56703c10ac6 100644
@@ -164,8 +164,8 @@ static int __init register_earlycon(char *buf, const struct earlycon_id *match)
  * <options> string in the 'options' parameter; all other forms set
  * the parameter to NULL.
  *
- * Returns 0 if an attempt to register the earlycon was made,
- * otherwise negative error code
+ * Return: 0 if an attempt to register the earlycon was made,
+ *         otherwise negative error code.
  */
 int __init setup_earlycon(char *buf)
 {
drivers/tty/serial/ifx6x60.c +3 -9
index 63c8b9f8c7b7..6d3a9cfaad34 100644
@@ -169,12 +169,10 @@ ifx_spi_power_state_clear(struct ifx_spi_device *ifx_dev, unsigned char val)
 }
 
 /**
- * swap_buf_8()
+ * swap_buf_8() - Swap the contents of a buffer into big endian format.
  * @buf: our buffer
  * @len: number of bytes (not words) in the buffer
  * @end: end of buffer
- *
- * Swap the contents of a buffer into big endian format
  */
 static inline void swap_buf_8(unsigned char *buf, int len, void *end)
 {
@@ -183,12 +181,10 @@ static inline void swap_buf_8(unsigned char *buf, int len, void *end)
 }
 
 /**
- * swap_buf_16()
+ * swap_buf_16() - Swap the contents of a buffer into big endian format.
  * @buf: our buffer
  * @len: number of bytes (not words) in the buffer
  * @end: end of buffer
- *
- * Swap the contents of a buffer into big endian format
  */
 static inline void swap_buf_16(unsigned char *buf, int len, void *end)
 {
@@ -208,12 +204,10 @@ static inline void swap_buf_16(unsigned char *buf, int len, void *end)
 }
 
 /**
- * swap_buf_32()
+ * swap_buf_32() - Swap the contents of a buffer into big endian format.
  * @buf: our buffer
  * @len: number of bytes (not words) in the buffer
  * @end: end of buffer
- *
- * Swap the contents of a buffer into big endian format
  */
 static inline void swap_buf_32(unsigned char *buf, int len, void *end)
 {
drivers/tty/serial/serial_txx9.c +3 -2
index b6b17d5005f6..621217e4ee27 100644
@@ -1059,8 +1059,9 @@ static int serial_txx9_register_port(struct uart_port *port)
  * serial_txx9_unregister_port() - remove a txx9 serial port at runtime
  * @line: serial line number
  *
- * Remove one serial port.  This may not be called from interrupt
- * context.  We hand the port back to the our control.
+ * Remove one serial port.  We hand the port back to the our control.
+ *
+ * Context: This may not be called from interrupt context.
  */
 static void serial_txx9_unregister_port(int line)
 {
drivers/tty/serial/xilinx_uartps.c +12 -9
index 5ed85c49bbce..527dd273fccb 100644
@@ -204,7 +204,6 @@ struct cdns_platform_data {
  * cdns_uart_handle_rx() - Handle the received bytes along with Rx errors.
  * @dev_id: Id of the UART port
  * @isrstatus: The interrupt status register value as read
- * Return: None
  */
 static void cdns_uart_handle_rx(void *dev_id, unsigned int isrstatus)
 {
@@ -299,7 +298,6 @@ static void cdns_uart_handle_rx(void *dev_id, unsigned int isrstatus)
 /**
  * cdns_uart_handle_tx() - Handle the bytes to be Txed.
  * @dev_id: Id of the UART port
- * Return: None
  */
 static void cdns_uart_handle_tx(void *dev_id)
 {
@@ -378,8 +376,6 @@ static irqreturn_t cdns_uart_isr(int irq, void *dev_id)
  * @rbdiv: BDIV value (return value)
  * @rcd: CD value (return value)
  * @div8: Value for clk_sel bit in mod (return value)
- * Return: baud rate, requested baud when possible, or actual baud when there
- *	was too much error, zero if no valid divisors are found.
  *
  * Formula to obtain baud rate is
  *	baud_tx/rx rate = clk/CD * (BDIV + 1)
@@ -390,6 +386,9 @@ static irqreturn_t cdns_uart_isr(int irq, void *dev_id)
  *	CD and BDIV depends on values in
  *			baud rate generate register
  *			baud rate clock divisor register
+ *
+ * Return: Baud rate, requested baud when possible, or actual baud when
+ *         there was too much error, zero if no valid divisors are found.
  */
 static unsigned int cdns_uart_calc_baud_divs(unsigned int clk,
 		unsigned int baud, u32 *rbdiv, u32 *rcd, int *div8)
@@ -437,6 +436,7 @@ static unsigned int cdns_uart_calc_baud_divs(unsigned int clk,
  * cdns_uart_set_baud_rate() - Calculate and set the baud rate
  * @port: Handle to the uart port structure
  * @baud: Baud rate to set
+ *
  * Return: baud rate, requested baud when possible, or actual baud when there
  *	   was too much error, zero if no valid divisors are found.
  */
@@ -472,6 +472,7 @@ static unsigned int cdns_uart_set_baud_rate(struct uart_port *port,
  * @nb:		Notifier block
  * @event:	Notify event
  * @data:	Notifier data
+ *
  * Return:	NOTIFY_OK or NOTIFY_DONE on success, NOTIFY_BAD on error.
  */
 static int cdns_uart_clk_notifier_cb(struct notifier_block *nb,
@@ -665,11 +666,13 @@ static void cdns_uart_break_ctl(struct uart_port *port, int ctl)
 }
 
 /**
- * cdns_uart_set_termios() - termios operations, handling data length, parity,
- *				stop bits, flow control, baud rate
+ * cdns_uart_set_termios() - termios operations
  * @port: Handle to the uart port structure
  * @termios: Handle to the input termios structure
  * @old: Values of the previously saved termios structure
+ *
+ * Termios operations, handling data length, parity, stop bits,
+ * flow control, baud rate.
  */
 static void cdns_uart_set_termios(struct uart_port *port,
 				struct ktermios *termios, struct ktermios *old)
@@ -938,11 +941,11 @@ static int cdns_uart_verify_port(struct uart_port *port,
 }
 
 /**
- * cdns_uart_request_port() - Claim the memory region attached to cdns_uart port,
- *				called when the driver adds a cdns_uart port via
- *				uart_add_one_port()
+ * cdns_uart_request_port() - Claim the memory region attached to cdns_uart port.
  * @port: Handle to the uart port structure
  *
+ * Called when the driver adds a cdns_uart port via uart_add_one_port().
+ *
  * Return: 0 on success, negative errno otherwise.
  */
 static int cdns_uart_request_port(struct uart_port *port)
drivers/tty/tty_audit.c +5 -4
index 54574c8d677e..34d1b09b69a1 100644
@@ -149,7 +149,7 @@ void tty_audit_tiocsti(struct tty_struct *tty, char ch)
 /**
  * tty_audit_push() - Flush current's pending audit data
  *
- * Returns 0 if success, -EPERM if tty audit is disabled
+ * Return: 0 if success, -EPERM if tty audit is disabled.
  */
 int tty_audit_push(void)
 {
@@ -170,9 +170,10 @@ int tty_audit_push(void)
 /**
  * tty_audit_buf_get() - Get an audit buffer.
  *
- * Get an audit buffer, allocate it if necessary.  Return %NULL
- * if out of memory or ERR_PTR(-ESRCH) if tty_audit_exit() has already
- * occurred.  Otherwise, return a new reference to the buffer.
+ * Get an audit buffer, allocate it if necessary.
+ *
+ * Return: %NULL if out of memory or ERR_PTR(-ESRCH) if tty_audit_exit()
+ * has already occurred.  Otherwise, return a new reference to the buffer.
  */
 static struct tty_audit_buf *tty_audit_buf_get(void)
 {
drivers/tty/tty_baudrate.c +16 -15
index fac79ff29fb1..1bb4c3fb61b2 100644
@@ -50,12 +50,12 @@ static int n_baud_table = ARRAY_SIZE(baud_table);
  * tty_termios_baud_rate()
  * @termios: termios structure
  *
- * Convert termios baud rate data into a speed. This should be called
- * with the termios lock held if this termios is a terminal termios
- * structure. May change the termios data. Device drivers can call this
- * function but should use ->c_[io]speed directly as they are updated.
+ * Convert termios baud rate data into a speed.
  *
- * Locking: none
+ * Context: This should be called with the termios lock held if this termios
+ *          is a terminal termios structure. May change the termios data.
+ *          Device drivers can call this function but should use ->c_[io]speed
+ *          directly as they are updated.
  */
 speed_t tty_termios_baud_rate(struct ktermios *termios)
 {
@@ -84,12 +84,12 @@ EXPORT_SYMBOL(tty_termios_baud_rate);
  * tty_termios_input_baud_rate()
  * @termios: termios structure
  *
- * Convert termios baud rate data into a speed. This should be called
- * with the termios lock held if this termios is a terminal termios
- * structure. May change the termios data. Device drivers can call this
- * function but should use ->c_[io]speed directly as they are updated.
+ * Convert termios baud rate data into a speed.
  *
- * Locking: none
+ * Context: This should be called with the termios lock held if this termios
+ *          is a terminal termios structure. May change the termios data.
+ *          Device drivers can call this function but should use ->c_[io]speed
+ *          directly as they are updated.
  */
 speed_t tty_termios_input_baud_rate(struct ktermios *termios)
 {
@@ -133,11 +133,11 @@ EXPORT_SYMBOL(tty_termios_input_baud_rate);
  * desired speed. We allow small margins and preserve as much of possible
  * of the input intent to keep compatibility.
  *
- * Locking: Caller should hold termios lock. This is already held
- * when calling this function from the driver termios handler.
- *
  * The ifdefs deal with platforms whose owners have yet to update them
  * and will all go away once this is done.
+ *
+ * Context: Caller should hold termios lock. This is already held
+ *          when calling this function from the driver termios handler.
  */
 void tty_termios_encode_baud_rate(struct ktermios *termios,
 				  speed_t ibaud, speed_t obaud)
@@ -227,8 +227,9 @@ EXPORT_SYMBOL_GPL(tty_termios_encode_baud_rate);
  * @obad: output baud rate
  *
  * Update the current termios data for the tty with the new speed
- * settings. The caller must hold the termios_rwsem for the tty in
- * question.
+ * settings.
+ *
+ * Context: The caller must hold the termios_rwsem for the tty in question.
  */
 void tty_encode_baud_rate(struct tty_struct *tty, speed_t ibaud, speed_t obaud)
 {
drivers/tty/tty_buffer.c +15 -11
index 447f235eeb0c..46eee0e3b285 100644
@@ -146,8 +146,8 @@ void tty_buffer_free_all(struct tty_port *port)
  * We round our buffers off in 256 character chunks to get better
  * allocation behaviour.
  *
- * Return NULL if out of memory or the allocation would exceed the
- * per device queue
+ * Return: NULL if out of memory or the allocation would exceed the
+ *         per device queue.
  */
 static struct tty_buffer *tty_buffer_alloc(struct tty_port *port, size_t size)
 {
@@ -208,8 +208,8 @@ static void tty_buffer_free(struct tty_port *port, struct tty_buffer *b)
  * flush all the buffers containing receive data. If ld != NULL,
  * flush the ldisc input buffer.
  *
- * Locking: takes buffer lock to ensure single-threaded flip buffer
- *          'consumer'
+ * Context: Takes buffer lock to ensure single-threaded flip buffer
+ *          'consumer'.
  */
 void tty_buffer_flush(struct tty_struct *tty, struct tty_ldisc *ld)
 {
@@ -300,7 +300,9 @@ EXPORT_SYMBOL_GPL(tty_buffer_request_room);
  * @size: size
  *
  * Queue a series of bytes to the tty buffering. All the characters
- * passed are marked with the supplied flag. Returns the number added.
+ * passed are marked with the supplied flag.
+ *
+ * Return: The number of bytes added.
  */
 int tty_insert_flip_string_fixed_flag(struct tty_port *port,
 		const unsigned char *chars, char flag, size_t size)
@@ -334,8 +336,9 @@ EXPORT_SYMBOL(tty_insert_flip_string_fixed_flag);
  * @size: size
  *
  * Queue a series of bytes to the tty buffering. For each character
- * the flags array indicates the status of the character. Returns the
- * number added.
+ * the flags array indicates the status of the character.
+ *
+ * Return: The number of bytes added.
  */
 int tty_insert_flip_string_flags(struct tty_port *port,
 		const unsigned char *chars, const char *flags, size_t size)
@@ -443,7 +446,7 @@ EXPORT_SYMBOL_GPL(tty_prepare_flip_string);
  * Callers other than flush_to_ldisc() need to exclude the kworker
  * from concurrent use of the line discipline, see paste_selection().
  *
- * Returns the number of bytes processed
+ * Return: The number of bytes processed.
  */
 int tty_ldisc_receive_buf(struct tty_ldisc *ld, const unsigned char *p,
 			  char *f, int count)
@@ -484,8 +487,8 @@ receive_buf(struct tty_port *port, struct tty_buffer *head, int count)
  *
  * The receive_buf method is single threaded for each tty instance.
  *
- * Locking: takes buffer lock to ensure single-threaded flip buffer
- *          'consumer'
+ * Context: Takes buffer lock to ensure single-threaded flip buffer
+ *          'consumer'.
  */
 static void flush_to_ldisc(struct work_struct *work)
 {
@@ -535,10 +538,11 @@ static void flush_to_ldisc(struct work_struct *work)
  * @port: tty port to push
  *
  * Queue a push of the terminal flip buffers to the line discipline.
- * Can be called from IRQ/atomic context.
  *
  * In the event of the queue being busy for flipping the work will be
  * held off and retried later.
+ *
+ * Context: Can be called from IRQ/atomic context.
  */
 void tty_flip_buffer_push(struct tty_port *port)
 {
drivers/tty/tty_io.c +60 -69

376 lines not on this page · raw message

drivers/tty/tty_ioctl.c +8 -7
index ca5d3923342d..d23872fb2ad8 100644
@@ -147,7 +147,7 @@ EXPORT_SYMBOL(tty_unthrottle);
  * throttle due to race conditions when throttling is conditional
  * on factors evaluated prior to throttling.
  *
- * Returns 0 if tty is throttled (or was already throttled)
+ * Return: 0 if tty is throttled (or was already throttled).
  */
 int tty_throttle_safe(struct tty_struct *tty)
 {
@@ -177,7 +177,7 @@ int tty_throttle_safe(struct tty_struct *tty)
  * unthrottle due to race conditions when unthrottling is conditional
  * on factors evaluated prior to unthrottling.
  *
- * Returns 0 if tty is unthrottled (or was already unthrottled)
+ * Return: 0 if tty is unthrottled (or was already unthrottled).
  */
 int tty_unthrottle_safe(struct tty_struct *tty)
 {
@@ -206,7 +206,7 @@ int tty_unthrottle_safe(struct tty_struct *tty)
  * Wait for characters pending in a tty driver to hit the wire, or
  * for a timeout to occur (eg due to flow control)
  *
- * Locking: none
+ * Context: No locks taken.
  */
 void tty_wait_until_sent(struct tty_struct *tty, long timeout)
 {
@@ -301,7 +301,7 @@ EXPORT_SYMBOL(tty_termios_hw_change);
  * Perform updates to the termios values set on this terminal.
  * A master pty's termios should never be set.
  *
- * Locking: termios_rwsem
+ * Context: Takes termios_rwsem.
  */
 int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)
 {
@@ -347,8 +347,7 @@ EXPORT_SYMBOL_GPL(tty_set_termios);
  * Helper function to prepare termios data and run necessary other
  * functions before using tty_set_termios to do the actual changes.
  *
- * Locking:
- *         Called functions take ldisc and termios_rwsem locks
+ * Context: Takes termios_rwsem.  Called functions take ldisc.
  */
 static int set_termios(struct tty_struct *tty, void __user *arg, int opt)
 {
@@ -551,7 +550,7 @@ static void set_sgflags(struct ktermios *termios, int flags)
  * Updates a terminal from the legacy BSD style terminal information
  * structure.
  *
- * Locking: termios_rwsem
+ * Context: Takes termios_rwsem.
  */
 static int set_sgttyb(struct tty_struct *tty, struct sgttyb __user *sgttyb)
 {
@@ -662,6 +661,8 @@ static int set_ltchars(struct tty_struct *tty, struct ltchars __user *ltchars)
  *
  * Perform a change to the CLOCAL state and call into the driver
  * layer to make it visible. All done with the termios rwsem
+ *
+ * Context: Takes termios_rwsem.
  */
 static int tty_change_softcar(struct tty_struct *tty, int arg)
 {
drivers/tty/tty_jobctrl.c +9 -11
index 3b5c822d360d..629452b9fe08 100644
@@ -26,7 +26,7 @@ static int is_ignored(int sig)
  * not in the foreground, send a SIGTTOU.  If the signal is blocked or
  * ignored, go ahead and perform the operation.  (POSIX 7.2)
  *
- * Locking: ctrl_lock
+ * Context: Takes ctrl_lock.
  */
 int __tty_check_change(struct tty_struct *tty, int sig)
 {
@@ -87,9 +87,8 @@ void proc_clear_tty(struct task_struct *p)
  * Only callable by the session leader and only if it does not already have
  * a controlling terminal.
  *
- * Caller must hold:  tty_lock()
- *                    a readlock on tasklist_lock
- *                    sighand lock
+ * Context: Caller must hold tty_lock(), a readlock on tasklist_lock, and
+ *          sighand lock.
  */
 static void __proc_set_tty(struct tty_struct *tty)
 {
@@ -335,10 +334,9 @@ void no_tty(void)
  * This ioctl is used to manage job control. It permits a session
  * leader to set this tty as the controlling tty for the session.
  *
- * Locking:
- *         Takes tty_lock() to serialize proc_set_tty() for this tty
- *         Takes tasklist_lock internally to walk sessions
- *         Takes ->siglock() when updating signal->tty
+ * Context: Takes tty_lock() to serialize proc_set_tty() for this tty
+ *          Takes tasklist_lock internally to walk sessions
+ *          Takes ->siglock() when updating signal->tty
  */
 static int tiocsctty(struct tty_struct *tty, struct file *file, int arg)
 {
@@ -438,7 +436,7 @@ static struct pid *session_of_pgrp(struct pid *pgrp)
  * Obtain the process group of the tty. If there is no process group
  * return an error.
  *
- * Locking: none. Reference to current->signal->tty is safe.
+ * Context: No Locks taken. Reference to current->signal->tty is safe.
  */
 static int tiocgpgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p)
 {
@@ -465,7 +463,7 @@ static int tiocgpgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t
  * Set the process group of the tty to the session passed. Only
  * permitted where the tty session is our session.
  *
- * Locking: RCU, ctrl lock
+ * Context: RCU, ctrl lock
  */
 static int tiocspgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p)
 {
@@ -512,7 +510,7 @@ static int tiocspgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t
  * Obtain the session id of the tty. If there is no session
  * return an error.
  *
- * Locking: none. Reference to current->signal->tty is safe.
+ * Context: No locks taken. Reference to current->signal->tty is safe.
  */
 static int tiocgsid(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p)
 {
drivers/tty/tty_ldisc.c +20 -23

105 lines not on this page · raw message

drivers/tty/tty_port.c +4 -4
index d4dfe29a6348..c5770682ee7a 100644
@@ -339,7 +339,7 @@ static void tty_port_shutdown(struct tty_port *port, struct tty_struct *tty)
  * Perform port level tty hangup flag and count changes. Drop the tty
  * reference.
  *
- * Caller holds tty lock.
+ * Context: Caller holds tty lock.
  */
 void tty_port_hangup(struct tty_port *port)
 {
@@ -451,7 +451,7 @@ EXPORT_SYMBOL(tty_port_lower_dtr_rts);
  * management of these lines. Note that the dtr/rts raise is done each
  * iteration as a hangup may have previously dropped them while we wait.
  *
- * Caller holds tty lock.
+ * Context: Caller holds tty lock.
  *
  * NB: May drop and reacquire tty lock when blocking, so tty and tty_port
  * may have changed state (eg., may have been hung up).
@@ -623,7 +623,7 @@ EXPORT_SYMBOL(tty_port_close_end);
 /**
  * tty_port_close()
  *
- * Caller holds tty lock
+ * Context: Caller holds tty lock.
  */
 void tty_port_close(struct tty_port *port, struct tty_struct *tty,
 							struct file *filp)
@@ -658,7 +658,7 @@ EXPORT_SYMBOL_GPL(tty_port_install);
 /**
  * tty_port_open()
  *
- * Caller holds tty lock.
+ * Context: Caller holds tty lock.
  *
  * NB: may drop and reacquire tty lock (in tty_port_block_til_ready()) so
  * tty and tty_port may have changed state (eg., may be hung up now)
drivers/tty/vt/consolemap.c +2 -2
index 74f4ef98aa7d..45bc49229fe5 100644
@@ -654,7 +654,7 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list)
  * with.  This routine is executed at video setup, and when the
  * PIO_FONTRESET ioctl is called.
  *
- * The caller must hold the console lock
+ * Context: The caller must hold the console lock.
  */
 int con_set_default_unimap(struct vc_data *vc)
 {
@@ -710,7 +710,7 @@ EXPORT_SYMBOL(con_set_default_unimap);
  * @dst_vc: target
  * @src_vt: source
  *
- * The caller must hold the console lock when invoking this method
+ * Context: The caller must hold the console lock.
  */
 int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc)
 {
drivers/tty/vt/keyboard.c +4 -2
index 3c3eb14e1565..487e5af87173 100644
@@ -1789,7 +1789,8 @@ int vt_do_diacrit(unsigned int cmd, void __user *udp, int perm)
  * @arg: the requested mode
  *
  * Update the keyboard mode bits while holding the correct locks.
- * Return 0 for success or an error code.
+ *
+ * Return: 0 for success or an error code.
  */
 int vt_do_kdskbmode(int console, unsigned int arg)
 {
@@ -1829,7 +1830,8 @@ int vt_do_kdskbmode(int console, unsigned int arg)
  * @arg: the requested meta state
  *
  * Update the keyboard meta bits while holding the correct locks.
- * Return 0 for success or an error code.
+ *
+ * Return: 0 for success or an error code.
  */
 int vt_do_kdskbmeta(int console, unsigned int arg)
 {
drivers/tty/vt/selection.c +7 -3
index 473015beb0f2..309b3f043710 100644
@@ -70,7 +70,9 @@ sel_pos(int n)
  * clear_selection() - remove current selection
  *
  * Remove the current selection highlight, if any from the console
- * holding the selection. The caller must hold the console lock.
+ * holding the selection.
+ *
+ * Context: The caller must hold the console lock.
  */
 void clear_selection(void)
 {
@@ -101,8 +103,10 @@ static inline int inword(const u32 c)
  * sel_loadlut() - load the LUT table
  * @p: user table
  *
- * Load the LUT table from user space. The caller must hold the console
- * lock. Make a temporary copy so a partial update doesn't make a mess.
+ * Load the LUT table from user space.  Make a temporary copy so a
+ * partial update doesn't make a mess.
+ *
+ * Context: The caller must hold the console lock.
  */
 int sel_loadlut(char __user *p)
 {
drivers/tty/vt/vt.c +12 -14
index dae5a7a82aee..e0c989647d7e 100644
@@ -1140,8 +1140,8 @@ static inline int resize_screen(struct vc_data *vc, int width, int height,
  * If the caller passes a tty structure then update the termios winsize
  * information and perform any necessary signal handling.
  *
- * Caller must hold the console semaphore. Takes the termios rwsem and
- * ctrl_lock of the tty IFF a tty is passed.
+ * Context: Caller must hold the console semaphore. Takes the termios_rwsem
+ *          and ctrl_lock of the tty IFF a tty is passed.
  */
 
 static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,
@@ -3797,10 +3797,10 @@ static void vtconsole_deinit_device(struct con_driver *con)
  * con_is_bound() - checks if driver is bound to the console
  * @csw: console driver
  *
- * RETURNS: zero if unbound, nonzero if bound
- *
  * Drivers can call this and if zero, they should release
  * all resources allocated on con_startup()
+ *
+ * Return: zero if unbound, nonzero if bound.
  */
 int con_is_bound(const struct consw *csw)
 {
@@ -3825,9 +3825,8 @@ EXPORT_SYMBOL(con_is_bound);
  * function needs to save the current console state, then put the console
  * into a state suitable for the kernel debugger.
  *
- * RETURNS:
- * Zero on success, nonzero if a failure occurred when trying to prepare
- * the console for the debugger.
+ * Return: Zero on success, nonzero if a failure occurred when trying to
+ *         prepare the console for the debugger.
  */
 int con_debug_enter(struct vc_data *vc)
 {
@@ -3882,9 +3881,8 @@ EXPORT_SYMBOL_GPL(con_debug_enter);
  * Restore the console state to what it was before the kernel debugger
  * was invoked.
  *
- * RETURNS:
- * Zero on success, nonzero if a failure occurred when trying to restore
- * the console.
+ * Return: Zero on success, nonzero if a failure occurred when trying
+ *         to restore the console.
  */
 int con_debug_leave(void)
 {
@@ -3977,10 +3975,10 @@ static int do_register_con_driver(const struct consw *csw, int first, int last)
  * do_unregister_con_driver() - unregister console driver from console layer
  * @csw: console driver
  *
- * DESCRIPTION: All drivers that registers to the console layer must
- * call this function upon exit, or if the console driver is in a state
- * where it won't be able to handle console services, such as the
- * framebuffer console without loaded framebuffer drivers.
+ * All drivers that registers to the console layer must call this function
+ * upon exit, or if the console driver is in a state where it won't be able
+ * to handle console services, such as the framebuffer console without
+ * loaded framebuffer drivers.
  *
  * The driver must unbind first prior to unregistration.
  */
Signature · 1 line
2.17.1
#2 lore raw

Re: [PATCH v2 1/7] tty: Fix whitespace before tab warnings

In reply to Tobin C. Harding
Quoted 58 lines · Tobin C. Harding

This patch is whitespace only.

Checkpatch emits a BUNCH of warnings of type

WARNING: please, no spaces at the start of a line
WARNING: please, no space before tabs

While these may seem trivial they hinder further cleanup efforts because there are so many that later cleanup touches many of the same lines, this makes the cleanup patches super noisy when parsed with checkpatch (although checkpatching this series is prohibitively noisy even with this patch).

In preparation for doing kernel-docs cleanup fix all the whitespace before tab and whitespace at start of line warnings. We do not fix any that are obviously there for extra-ordinary formatting reasons.

Any line in the diff with obvious other formatting errors is fixed also excluding kernel-docs lines.

---

Actually, checkpatch is only noisy on a couple of patches from this set. I ran checkpatch individually (instead of on the whole set) on each patch and fixed things within scope of this set while working on version 2 of the set.

 drivers/tty/amiserial.c                     |  43 ++++---
 drivers/tty/hvc/hvc_console.c               |   2 +-
 drivers/tty/ipwireless/tty.c                |   2 +-
 drivers/tty/isicom.c                        |   4 +-
 drivers/tty/moxa.c                          |  30 +++--
 drivers/tty/mxser.c                         |  10 +-
 drivers/tty/n_hdlc.c                        |  10 +-
 drivers/tty/rocket.c                        |   8 +-
 drivers/tty/serdev/core.c                   |   2 +-
 drivers/tty/serial/8250/8250_dw.c           |   4 +-
 drivers/tty/serial/amba-pl011.c             |   8 +-
 drivers/tty/serial/cpm_uart/cpm_uart_core.c |   8 +-
 drivers/tty/serial/icom.c                   |   5 +-
 drivers/tty/serial/ip22zilog.c              |   2 +-
 drivers/tty/serial/jsm/jsm_neo.c            |   2 +-
 drivers/tty/serial/mux.c                    |   6 +-
 drivers/tty/serial/mxs-auart.c              |   2 +-
 drivers/tty/serial/pmac_zilog.c             |   4 +-
 drivers/tty/serial/pxa.c                    |  20 +--
 drivers/tty/serial/serial_txx9.c            |   2 +-
 drivers/tty/serial/sn_console.c             |  38 +++---
 drivers/tty/serial/sunsab.c                 |   2 +-
 drivers/tty/serial/sunsu.c                  |   4 +-
 drivers/tty/serial/sunzilog.c               |   2 +-
 drivers/tty/serial/ucc_uart.c               | 134 ++++++++++----------
 drivers/tty/serial/vr41xx_siu.c             |   2 +-
 drivers/tty/serial/zs.c                     |  12 +-
 drivers/tty/sysrq.c                         |  34 ++---
 drivers/tty/tty_baudrate.c                  |   2 +-
 drivers/tty/tty_io.c                        |  22 ++--
Quoted 8 lines
 drivers/tty/tty_ioctl.c                     |   2 +-
 drivers/tty/tty_jobctrl.c                   |   8 +-
 drivers/tty/vt/consolemap.c                 |   6 +-
 drivers/tty/vt/keyboard.c                   |  29 +++--
 drivers/tty/vt/selection.c                  |  12 +-
 drivers/tty/vt/vt.c                         |  40 +++---
 drivers/tty/vt/vt_ioctl.c                   |  14 +-
 37 files changed, 271 insertions(+), 266 deletions(-)

The hard part about doing large patches like this that cross lots of files is that it usually does not end up applying. This patch currently fails against 4.20-rc1 :(

But, if it were divided up into "one patch per driver" then I could have applied the majority of them, as only a few drivers changed to require this series to be rebased and reworked.

I really want to apply this patch series, but as-is, it just can't even apply... Can you rebase/break up the patches into smaller ones so that we have a chance to get them merged eventually?

thanks,

greg k-h