LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] mxser: use semi-colons instead of commas
@ 2021-08-25 7:24 Dan Carpenter
2021-08-25 10:30 ` Joe Perches
2021-08-25 12:57 ` Jiri Slaby
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2021-08-25 7:24 UTC (permalink / raw)
To: Jiri Slaby
Cc: Greg Kroah-Hartman, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
linux-arm-kernel, linux-kernel, kernel-janitors
This code works, but it's cleaner to use semi-colons at the end of
a statement instead of a comma.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/tty/mxser.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index 335e4e50d679..1216f3985e18 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -1039,12 +1039,12 @@ static int mxser_get_serial_info(struct tty_struct *tty,
if (closing_wait != ASYNC_CLOSING_WAIT_NONE)
closing_wait = jiffies_to_msecs(closing_wait) / 10;
- ss->type = info->type,
- ss->line = tty->index,
- ss->port = info->ioaddr,
- ss->irq = info->board->irq,
- ss->flags = info->port.flags,
- ss->baud_base = MXSER_BAUD_BASE,
+ ss->type = info->type;
+ ss->line = tty->index;
+ ss->port = info->ioaddr;
+ ss->irq = info->board->irq;
+ ss->flags = info->port.flags;
+ ss->baud_base = MXSER_BAUD_BASE;
ss->close_delay = close_delay;
ss->closing_wait = closing_wait;
ss->custom_divisor = MXSER_CUSTOM_DIVISOR,
--
2.20.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mxser: use semi-colons instead of commas
2021-08-25 7:24 [PATCH] mxser: use semi-colons instead of commas Dan Carpenter
@ 2021-08-25 10:30 ` Joe Perches
2021-08-25 12:57 ` Jiri Slaby
1 sibling, 0 replies; 3+ messages in thread
From: Joe Perches @ 2021-08-25 10:30 UTC (permalink / raw)
To: Dan Carpenter, Jiri Slaby, Julia Lawall
Cc: Greg Kroah-Hartman, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
linux-arm-kernel, linux-kernel, kernel-janitors
On Wed, 2021-08-25 at 10:24 +0300, Dan Carpenter wrote:
> This code works, but it's cleaner to use semi-colons at the end of
> a statement instead of a comma.
There are still multiple dozens of this type of comma use
in the kernel.
Julia Lawall created a cocci script to convert the commas
to semicolons that worked pretty well.
https://lore.kernel.org/lkml/alpine.DEB.2.22.394.2008201856110.2524@hadrien/
> diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
[]
> @@ -1039,12 +1039,12 @@ static int mxser_get_serial_info(struct tty_struct *tty,
> if (closing_wait != ASYNC_CLOSING_WAIT_NONE)
> closing_wait = jiffies_to_msecs(closing_wait) / 10;
>
>
> - ss->type = info->type,
> - ss->line = tty->index,
> - ss->port = info->ioaddr,
> - ss->irq = info->board->irq,
> - ss->flags = info->port.flags,
> - ss->baud_base = MXSER_BAUD_BASE,
> + ss->type = info->type;
> + ss->line = tty->index;
> + ss->port = info->ioaddr;
> + ss->irq = info->board->irq;
> + ss->flags = info->port.flags;
> + ss->baud_base = MXSER_BAUD_BASE;
> ss->close_delay = close_delay;
> ss->closing_wait = closing_wait;
> ss->custom_divisor = MXSER_CUSTOM_DIVISOR,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mxser: use semi-colons instead of commas
2021-08-25 7:24 [PATCH] mxser: use semi-colons instead of commas Dan Carpenter
2021-08-25 10:30 ` Joe Perches
@ 2021-08-25 12:57 ` Jiri Slaby
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Slaby @ 2021-08-25 12:57 UTC (permalink / raw)
To: Dan Carpenter
Cc: Greg Kroah-Hartman, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
linux-arm-kernel, linux-kernel, kernel-janitors
On 25. 08. 21, 9:24, Dan Carpenter wrote:
> This code works, but it's cleaner to use semi-colons at the end of
> a statement instead of a comma.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jiri Slaby <jirislaby@kernel.org>
> ---
> drivers/tty/mxser.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
> index 335e4e50d679..1216f3985e18 100644
> --- a/drivers/tty/mxser.c
> +++ b/drivers/tty/mxser.c
> @@ -1039,12 +1039,12 @@ static int mxser_get_serial_info(struct tty_struct *tty,
> if (closing_wait != ASYNC_CLOSING_WAIT_NONE)
> closing_wait = jiffies_to_msecs(closing_wait) / 10;
>
> - ss->type = info->type,
> - ss->line = tty->index,
> - ss->port = info->ioaddr,
> - ss->irq = info->board->irq,
> - ss->flags = info->port.flags,
> - ss->baud_base = MXSER_BAUD_BASE,
> + ss->type = info->type;
> + ss->line = tty->index;
> + ss->port = info->ioaddr;
> + ss->irq = info->board->irq;
> + ss->flags = info->port.flags;
> + ss->baud_base = MXSER_BAUD_BASE;
> ss->close_delay = close_delay;
> ss->closing_wait = closing_wait;
> ss->custom_divisor = MXSER_CUSTOM_DIVISOR,
>
--
js
suse labs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-25 12:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25 7:24 [PATCH] mxser: use semi-colons instead of commas Dan Carpenter
2021-08-25 10:30 ` Joe Perches
2021-08-25 12:57 ` Jiri Slaby
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).