* [PATCH] staging: dgnc: dgnc_tty.c: Avoid '(' at the end of line
@ 2018-07-22 4:09 Nishad Kamdar
2018-07-22 7:50 ` Joe Perches
0 siblings, 1 reply; 3+ messages in thread
From: Nishad Kamdar @ 2018-07-22 4:09 UTC (permalink / raw)
To: Lidza Louina, Mark Hounschell, Greg Kroah-Hartman
Cc: driverdev-devel, devel, linux-kernel
Bring the first argument to the previous line and
align the other lines to match open parenthesis.
Issue found by checkpatch.
Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
---
drivers/staging/dgnc/dgnc_tty.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 9f9b9a5b4b27..2135bedc09db 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -883,10 +883,9 @@ static int dgnc_tty_open(struct tty_struct *tty, struct file *file)
* touched safely, the close routine will signal the
* ch_flags_wait to wake us back up.
*/
- rc = wait_event_interruptible(
- ch->ch_flags_wait,
- (((ch->ch_tun.un_flags |
- ch->ch_pun.un_flags) & UN_CLOSING) == 0));
+ rc = wait_event_interruptible(ch->ch_flags_wait,
+ (((ch->ch_tun.un_flags |
+ ch->ch_pun.un_flags) & UN_CLOSING) == 0));
/* If ret is non-zero, user ctrl-c'ed us */
if (rc)
return -EINTR;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: dgnc: dgnc_tty.c: Avoid '(' at the end of line
2018-07-22 4:09 [PATCH] staging: dgnc: dgnc_tty.c: Avoid '(' at the end of line Nishad Kamdar
@ 2018-07-22 7:50 ` Joe Perches
2018-07-22 17:16 ` Nishad Kamdar
0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2018-07-22 7:50 UTC (permalink / raw)
To: Nishad Kamdar, Lidza Louina, Mark Hounschell, Greg Kroah-Hartman
Cc: driverdev-devel, devel, linux-kernel
On Sun, 2018-07-22 at 09:39 +0530, Nishad Kamdar wrote:
> Bring the first argument to the previous line and
> align the other lines to match open parenthesis.
[]
> diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
[]
> @@ -883,10 +883,9 @@ static int dgnc_tty_open(struct tty_struct *tty, struct file *file)
> * touched safely, the close routine will signal the
> * ch_flags_wait to wake us back up.
> */
> - rc = wait_event_interruptible(
> - ch->ch_flags_wait,
> - (((ch->ch_tun.un_flags |
> - ch->ch_pun.un_flags) & UN_CLOSING) == 0));
> + rc = wait_event_interruptible(ch->ch_flags_wait,
> + (((ch->ch_tun.un_flags |
> + ch->ch_pun.un_flags) & UN_CLOSING) == 0));
This would be better without the superfluous () and perhaps use !
rc = wait_event_interruptible(ch->ch_flags_wait,
!((ch->ch_tun.un_flags |
ch->ch_pun.un_flags) & UN_CLOSING));
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: dgnc: dgnc_tty.c: Avoid '(' at the end of line
2018-07-22 7:50 ` Joe Perches
@ 2018-07-22 17:16 ` Nishad Kamdar
0 siblings, 0 replies; 3+ messages in thread
From: Nishad Kamdar @ 2018-07-22 17:16 UTC (permalink / raw)
To: Joe Perches, Lidza Louina, Mark Hounschell, Greg Kroah-Hartman
Cc: driverdev-devel, devel, linux-kernel
On Sun, Jul 22, 2018 at 12:50:25AM -0700, Joe Perches wrote:
> On Sun, 2018-07-22 at 09:39 +0530, Nishad Kamdar wrote:
> > Bring the first argument to the previous line and
> > align the other lines to match open parenthesis.
> []
> > diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
> []
> > @@ -883,10 +883,9 @@ static int dgnc_tty_open(struct tty_struct *tty, struct file *file)
> > * touched safely, the close routine will signal the
> > * ch_flags_wait to wake us back up.
> > */
> > - rc = wait_event_interruptible(
> > - ch->ch_flags_wait,
> > - (((ch->ch_tun.un_flags |
> > - ch->ch_pun.un_flags) & UN_CLOSING) == 0));
> > + rc = wait_event_interruptible(ch->ch_flags_wait,
> > + (((ch->ch_tun.un_flags |
> > + ch->ch_pun.un_flags) & UN_CLOSING) == 0));
>
>
> This would be better without the superfluous () and perhaps use !
>
> rc = wait_event_interruptible(ch->ch_flags_wait,
> !((ch->ch_tun.un_flags |
> ch->ch_pun.un_flags) & UN_CLOSING));
>
>
Ok, I will revise the patch.
Thanks for the review.
regards,
nishad kamdar
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-22 17:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-22 4:09 [PATCH] staging: dgnc: dgnc_tty.c: Avoid '(' at the end of line Nishad Kamdar
2018-07-22 7:50 ` Joe Perches
2018-07-22 17:16 ` Nishad Kamdar
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).