TTY/JSM coding style fixes
Subsystems (2)
cover TTY/JSM coding style fixes
This patch set fixes several warnings and errors reported by checkpatch.pl.
Gimcuan Hui (5):
tty: serial: jsm: change the type of local variable
tty: serial: jsm: add blank line after declarations
tty: serial: jsm: delete space between function name and '('
tty: serial: jsm: fix coding style
tty: serial: jsm: add space before the open parenthesis '('
drivers/tty/serial/jsm/jsm_tty.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.11.0
PATCH 1/5 tty: serial: jsm: change the type of local variable
The return type of jsm_get_mstat was int, and the local var result was for the return should be int, make the change.
This patch fixes the checkpatch.pl warning:
Prefer 'unsigned int' to bare use of 'unsigned'.
--- drivers/tty/serial/jsm/jsm_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/jsm/jsm_tty.c +1 -1
@@ -36,7 +36,7 @@ static void jsm_carrier(struct jsm_channel *ch);static inline int jsm_get_mstat (struct jsm_channel *ch) {unsigned char mstat; -unsigned result; +int result;jsm_dbg (IOCTL , &ch->ch_bd->pci_dev,"start\n" );
Signature · 1 line
2.11.0
PATCH 2/5 tty: serial: jsm: add blank line after declarations
In reply to Gimcuan HuiThis patch fixes checkpatch.pl warning:
Missing a blank line after declarations.
--- drivers/tty/serial/jsm/jsm_tty.c | 1 + 1 file changed, 1 insertion(+)
drivers/tty/serial/jsm/jsm_tty.c +1 -0
@@ -124,6 +124,7 @@ static void jsm_tty_set_mctrl(struct uart_port *port, unsigned int mctrl)static void jsm_tty_write (struct uart_port *port) {struct jsm_channel *channel; + channel = container_of(port, struct jsm_channel, uart_port); channel->ch_bd->bd_ops->copy_data_from_queue_to_uart (channel); }
Signature · 1 line
2.11.0
PATCH 3/5 tty: serial: jsm: delete space between function name and '('
In reply to Gimcuan HuiThis patch fixes checkpatch.pl warning:
space prohibited between function name and open parenthesis '('.
--- drivers/tty/serial/jsm/jsm_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/jsm/jsm_tty.c +1 -1
@@ -474,7 +474,7 @@ int jsm_uart_port_init(struct jsm_board *brd) }else set_bit (line, linemap); brd->channels[i]->uart_port.line = line; - rc =uart_add_one_port (&jsm_uart_driver, &brd->channels[i]->uart_port); + rc =uart_add_one_port (&jsm_uart_driver, &brd->channels[i]->uart_port);if (rc) {printk (KERN_INFO "jsm: Port %d failed. Aborting...\n" , i);return rc;
Signature · 1 line
2.11.0
PATCH 4/5 tty: serial: jsm: fix coding style
In reply to Gimcuan HuiThis patch fixes the checkpatch.pl complain:
ERROR: else should follow close brace '}'.
--- drivers/tty/serial/jsm/jsm_tty.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/tty/serial/jsm/jsm_tty.c +1 -2
@@ -478,8 +478,7 @@ int jsm_uart_port_init(struct jsm_board *brd)if (rc) {printk (KERN_INFO "jsm: Port %d failed. Aborting...\n" , i);return rc; - } -else + }else printk (KERN_INFO "jsm: Port %d added\n" , i); }
Signature · 1 line
2.11.0
PATCH 5/5 tty: serial: jsm: add space before the open parenthesis '('
In reply to Gimcuan HuiThis patch fixes the checkpatch.pl complains:
space required before the open parenthesis '('.
--- drivers/tty/serial/jsm/jsm_tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/jsm/jsm_tty.c +2 -2
@@ -541,7 +541,7 @@ void jsm_input(struct jsm_channel *ch) tp = port->tty; bd = ch->ch_bd; -if (!bd) +if (!bd)return ;spin_lock_irqsave (&ch->ch_lock, lock_flags);
@@ -781,7 +781,7 @@ void jsm_check_queue_flow_control(struct jsm_channel *ch)if (qleft <256 ) {/* HWFLOW */ if (ch->ch_c_cflag &CRTSCTS ) { -if (!(ch->ch_flags &CH_RECEIVER_OFF )) { +if (!(ch->ch_flags &CH_RECEIVER_OFF )) { bd_ops->disable_receiver (ch); ch->ch_flags |= (CH_RECEIVER_OFF ); jsm_dbg(READ, &ch->ch_bd->pci_dev,
Signature · 1 line
2.11.0
Quoted 10 lines · Gimcuan Hui
This patch set fixes several warnings and errors reported by checkpatch.pl.
Gimcuan Hui (5):
tty: serial: jsm: change the type of local variable
tty: serial: jsm: add blank line after declarations
tty: serial: jsm: delete space between function name and '('
tty: serial: jsm: fix coding style
tty: serial: jsm: add space before the open parenthesis '('
Quoted 3 lines
drivers/tty/serial/jsm/jsm_tty.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Thanks for the fixes Gimcuan!
For the entire series: