lkml.org 
[lkml]   [2018]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] staging: dgnc: dgnc_tty.c: Avoid '(' at the end of line
From
Date
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));


\
 
 \ /
  Last update: 2018-07-22 09:51    [W:0.049 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site