kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tty: moxa: use semi-colons instead of commas
@ 2021-08-25  7:24 Dan Carpenter
  2021-08-25 12:58 ` Jiri Slaby
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2021-08-25  7:24 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Jiri Slaby, linux-kernel, kernel-janitors

This code works but it's cleaner to use a semi-colon to end a statement
instead of a comma.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/tty/moxa.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
index 776f78de0f82..bf17e90858b8 100644
--- a/drivers/tty/moxa.c
+++ b/drivers/tty/moxa.c
@@ -2034,10 +2034,10 @@ static int moxa_get_serial_info(struct tty_struct *tty,
 	if (!info)
 		return -ENODEV;
 	mutex_lock(&info->port.mutex);
-	ss->type = info->type,
-	ss->line = info->port.tty->index,
-	ss->flags = info->port.flags,
-	ss->baud_base = 921600,
+	ss->type = info->type;
+	ss->line = info->port.tty->index;
+	ss->flags = info->port.flags;
+	ss->baud_base = 921600;
 	ss->close_delay = jiffies_to_msecs(info->port.close_delay) / 10;
 	mutex_unlock(&info->port.mutex);
 	return 0;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tty: moxa: use semi-colons instead of commas
  2021-08-25  7:24 [PATCH] tty: moxa: use semi-colons instead of commas Dan Carpenter
@ 2021-08-25 12:58 ` Jiri Slaby
  2021-08-25 13:22   ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby @ 2021-08-25 12:58 UTC (permalink / raw)
  To: Dan Carpenter, Greg Kroah-Hartman; +Cc: linux-kernel, kernel-janitors

On 25. 08. 21, 9:24, Dan Carpenter wrote:
> This code works but it's cleaner to use a semi-colon to end a statement
> instead of a comma.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Jiri Slaby <jirislaby@kernel.org>

I just wonder why:
   tty: moxa:
vs
   mxser:
with no "tty: "
...

> ---
>   drivers/tty/moxa.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
> index 776f78de0f82..bf17e90858b8 100644
> --- a/drivers/tty/moxa.c
> +++ b/drivers/tty/moxa.c
> @@ -2034,10 +2034,10 @@ static int moxa_get_serial_info(struct tty_struct *tty,
>   	if (!info)
>   		return -ENODEV;
>   	mutex_lock(&info->port.mutex);
> -	ss->type = info->type,
> -	ss->line = info->port.tty->index,
> -	ss->flags = info->port.flags,
> -	ss->baud_base = 921600,
> +	ss->type = info->type;
> +	ss->line = info->port.tty->index;
> +	ss->flags = info->port.flags;
> +	ss->baud_base = 921600;
>   	ss->close_delay = jiffies_to_msecs(info->port.close_delay) / 10;
>   	mutex_unlock(&info->port.mutex);
>   	return 0;
> 


-- 
js
suse labs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] tty: moxa: use semi-colons instead of commas
  2021-08-25 12:58 ` Jiri Slaby
@ 2021-08-25 13:22   ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2021-08-25 13:22 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: Greg Kroah-Hartman, linux-kernel, kernel-janitors

On Wed, Aug 25, 2021 at 02:58:19PM +0200, Jiri Slaby wrote:
> On 25. 08. 21, 9:24, Dan Carpenter wrote:
> > This code works but it's cleaner to use a semi-colon to end a statement
> > instead of a comma.
> > 
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> Acked-by: Jiri Slaby <jirislaby@kernel.org>
> 
> I just wonder why:
>   tty: moxa:
> vs
>   mxser:
> with no "tty: "
> ...

Now I'm confused.  There is a different mxser driver, but this is
modifying moxa?  I just copied from git log --oneline drivers/tty/moxa.c.

regards,
dan carpenter


> 
> > ---
> >   drivers/tty/moxa.c | 8 ++++----
> >   1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
> > index 776f78de0f82..bf17e90858b8 100644
> > --- a/drivers/tty/moxa.c
> > +++ b/drivers/tty/moxa.c
> > @@ -2034,10 +2034,10 @@ static int moxa_get_serial_info(struct tty_struct *tty,
> >   	if (!info)
> >   		return -ENODEV;
> >   	mutex_lock(&info->port.mutex);
> > -	ss->type = info->type,
> > -	ss->line = info->port.tty->index,
> > -	ss->flags = info->port.flags,
> > -	ss->baud_base = 921600,
> > +	ss->type = info->type;
> > +	ss->line = info->port.tty->index;
> > +	ss->flags = info->port.flags;
> > +	ss->baud_base = 921600;
> >   	ss->close_delay = jiffies_to_msecs(info->port.close_delay) / 10;
> >   	mutex_unlock(&info->port.mutex);
> >   	return 0;
> > 
> 
> 
> -- 
> js
> suse labs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-25 13:22 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] tty: moxa: use semi-colons instead of commas Dan Carpenter
2021-08-25 12:58 ` Jiri Slaby
2021-08-25 13:22   ` Dan Carpenter

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).