* [PATCH 0/5] TTY/JSM coding style fixes
@ 2017-11-05 5:06 Gimcuan Hui
2017-11-05 5:06 ` [PATCH 1/5] tty: serial: jsm: change the type of local variable Gimcuan Hui
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Gimcuan Hui @ 2017-11-05 5:06 UTC (permalink / raw)
To: Guilherme G. Piccoli, Greg Kroah-Hartman, Jiri Slaby
Cc: linux-serial, linux-kernel
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(-)
--
2.11.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/5] tty: serial: jsm: change the type of local variable
2017-11-05 5:06 [PATCH 0/5] TTY/JSM coding style fixes Gimcuan Hui
@ 2017-11-05 5:06 ` Gimcuan Hui
2017-11-05 5:06 ` [PATCH 2/5] tty: serial: jsm: add blank line after declarations Gimcuan Hui
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Gimcuan Hui @ 2017-11-05 5:06 UTC (permalink / raw)
To: Guilherme G. Piccoli, Greg Kroah-Hartman, Jiri Slaby
Cc: linux-serial, linux-kernel
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'.
Signed-off-by: Gimcuan Hui <gimcuan@gmail.com>
---
drivers/tty/serial/jsm/jsm_tty.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty.c
index e69227cc3827..729d2a083a74 100644
--- a/drivers/tty/serial/jsm/jsm_tty.c
+++ b/drivers/tty/serial/jsm/jsm_tty.c
@@ -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");
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/5] tty: serial: jsm: add blank line after declarations
2017-11-05 5:06 [PATCH 0/5] TTY/JSM coding style fixes Gimcuan Hui
2017-11-05 5:06 ` [PATCH 1/5] tty: serial: jsm: change the type of local variable Gimcuan Hui
@ 2017-11-05 5:06 ` Gimcuan Hui
2017-11-05 5:06 ` [PATCH 3/5] tty: serial: jsm: delete space between function name and '(' Gimcuan Hui
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Gimcuan Hui @ 2017-11-05 5:06 UTC (permalink / raw)
To: Guilherme G. Piccoli, Greg Kroah-Hartman, Jiri Slaby
Cc: linux-serial, linux-kernel
This patch fixes checkpatch.pl warning:
Missing a blank line after declarations.
Signed-off-by: Gimcuan Hui <gimcuan@gmail.com>
---
drivers/tty/serial/jsm/jsm_tty.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty.c
index 729d2a083a74..ed58dfc3d40e 100644
--- a/drivers/tty/serial/jsm/jsm_tty.c
+++ b/drivers/tty/serial/jsm/jsm_tty.c
@@ -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);
}
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/5] tty: serial: jsm: delete space between function name and '('
2017-11-05 5:06 [PATCH 0/5] TTY/JSM coding style fixes Gimcuan Hui
2017-11-05 5:06 ` [PATCH 1/5] tty: serial: jsm: change the type of local variable Gimcuan Hui
2017-11-05 5:06 ` [PATCH 2/5] tty: serial: jsm: add blank line after declarations Gimcuan Hui
@ 2017-11-05 5:06 ` Gimcuan Hui
2017-11-05 5:06 ` [PATCH 4/5] tty: serial: jsm: fix coding style Gimcuan Hui
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Gimcuan Hui @ 2017-11-05 5:06 UTC (permalink / raw)
To: Guilherme G. Piccoli, Greg Kroah-Hartman, Jiri Slaby
Cc: linux-serial, linux-kernel
This patch fixes checkpatch.pl warning:
space prohibited between function name and open parenthesis '('.
Signed-off-by: Gimcuan Hui <gimcuan@gmail.com>
---
drivers/tty/serial/jsm/jsm_tty.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty.c
index ed58dfc3d40e..53c3f53da241 100644
--- a/drivers/tty/serial/jsm/jsm_tty.c
+++ b/drivers/tty/serial/jsm/jsm_tty.c
@@ -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;
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/5] tty: serial: jsm: fix coding style
2017-11-05 5:06 [PATCH 0/5] TTY/JSM coding style fixes Gimcuan Hui
` (2 preceding siblings ...)
2017-11-05 5:06 ` [PATCH 3/5] tty: serial: jsm: delete space between function name and '(' Gimcuan Hui
@ 2017-11-05 5:06 ` Gimcuan Hui
2017-11-05 5:06 ` [PATCH 5/5] tty: serial: jsm: add space before the open parenthesis '(' Gimcuan Hui
2017-11-06 13:16 ` [PATCH 0/5] TTY/JSM coding style fixes Guilherme G. Piccoli
5 siblings, 0 replies; 7+ messages in thread
From: Gimcuan Hui @ 2017-11-05 5:06 UTC (permalink / raw)
To: Guilherme G. Piccoli, Greg Kroah-Hartman, Jiri Slaby
Cc: linux-serial, linux-kernel
This patch fixes the checkpatch.pl complain:
ERROR: else should follow close brace '}'.
Signed-off-by: Gimcuan Hui <gimcuan@gmail.com>
---
drivers/tty/serial/jsm/jsm_tty.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty.c
index 53c3f53da241..3853bfa5aa46 100644
--- a/drivers/tty/serial/jsm/jsm_tty.c
+++ b/drivers/tty/serial/jsm/jsm_tty.c
@@ -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);
}
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] tty: serial: jsm: add space before the open parenthesis '('
2017-11-05 5:06 [PATCH 0/5] TTY/JSM coding style fixes Gimcuan Hui
` (3 preceding siblings ...)
2017-11-05 5:06 ` [PATCH 4/5] tty: serial: jsm: fix coding style Gimcuan Hui
@ 2017-11-05 5:06 ` Gimcuan Hui
2017-11-06 13:16 ` [PATCH 0/5] TTY/JSM coding style fixes Guilherme G. Piccoli
5 siblings, 0 replies; 7+ messages in thread
From: Gimcuan Hui @ 2017-11-05 5:06 UTC (permalink / raw)
To: Guilherme G. Piccoli, Greg Kroah-Hartman, Jiri Slaby
Cc: linux-serial, linux-kernel
This patch fixes the checkpatch.pl complains:
space required before the open parenthesis '('.
Signed-off-by: Gimcuan Hui <gimcuan@gmail.com>
---
drivers/tty/serial/jsm/jsm_tty.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty.c
index 3853bfa5aa46..cbbadafe61fb 100644
--- a/drivers/tty/serial/jsm/jsm_tty.c
+++ b/drivers/tty/serial/jsm/jsm_tty.c
@@ -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,
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/5] TTY/JSM coding style fixes
2017-11-05 5:06 [PATCH 0/5] TTY/JSM coding style fixes Gimcuan Hui
` (4 preceding siblings ...)
2017-11-05 5:06 ` [PATCH 5/5] tty: serial: jsm: add space before the open parenthesis '(' Gimcuan Hui
@ 2017-11-06 13:16 ` Guilherme G. Piccoli
5 siblings, 0 replies; 7+ messages in thread
From: Guilherme G. Piccoli @ 2017-11-06 13:16 UTC (permalink / raw)
To: Gimcuan Hui; +Cc: Greg Kroah-Hartman, Jiri Slaby, linux-serial, linux-kernel
On 11/05/2017 03:06 AM, Gimcuan Hui wrote:
> 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(-)
>
Thanks for the fixes Gimcuan!
For the entire series:
Acked-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-11-06 13:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-05 5:06 [PATCH 0/5] TTY/JSM coding style fixes Gimcuan Hui
2017-11-05 5:06 ` [PATCH 1/5] tty: serial: jsm: change the type of local variable Gimcuan Hui
2017-11-05 5:06 ` [PATCH 2/5] tty: serial: jsm: add blank line after declarations Gimcuan Hui
2017-11-05 5:06 ` [PATCH 3/5] tty: serial: jsm: delete space between function name and '(' Gimcuan Hui
2017-11-05 5:06 ` [PATCH 4/5] tty: serial: jsm: fix coding style Gimcuan Hui
2017-11-05 5:06 ` [PATCH 5/5] tty: serial: jsm: add space before the open parenthesis '(' Gimcuan Hui
2017-11-06 13:16 ` [PATCH 0/5] TTY/JSM coding style fixes Guilherme G. Piccoli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).