Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1316966

Re: [PATCH 4/5] staging: media: lirc: place operator on previous line

From Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4/5] staging: media: lirc: place operator on previous line
Date 2016-01-25 17:30 +0100
Message-ID <qUSbF-6CP-43@gated-at.bofh.it> (permalink)
References <qH2Xf-64F-3@gated-at.bofh.it> <qH2Xf-64F-1@gated-at.bofh.it>
Organization Samsung

Show all headers | View raw


Em Fri, 18 Dec 2015 18:35:28 +0530
Sudip Mukherjee <sudipm.mukherjee@gmail.com> escreveu:

> checkpatch complains about the logical operator, which should be on the
> previous line.

IMHO, this is a matter of personal taste. I prefer to keep the operator
on the next line, as it makes clearer to see why the logic was broken.

Anyway, this patch doesn't apply.

> 
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
>  drivers/staging/media/lirc/lirc_parallel.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/media/lirc/lirc_parallel.c b/drivers/staging/media/lirc/lirc_parallel.c
> index e09894d..0156114 100644
> --- a/drivers/staging/media/lirc/lirc_parallel.c
> +++ b/drivers/staging/media/lirc/lirc_parallel.c
> @@ -157,9 +157,9 @@ static unsigned int init_lirc_timer(void)
>  			count++;
>  		level = newlevel;
>  		do_gettimeofday(&now);
> -	} while (count < 1000 && (now.tv_sec < tv.tv_sec
> -			     || (now.tv_sec == tv.tv_sec
> -				 && now.tv_usec < tv.tv_usec)));
> +	} while (count < 1000 && (now.tv_sec < tv.tv_sec ||
> +				  (now.tv_sec == tv.tv_sec &&
> +				   now.tv_usec < tv.tv_usec)));
>  
>  	timeelapsed = (now.tv_sec + 1 - tv.tv_sec) * 1000000
>  		     + (now.tv_usec - tv.tv_usec);
> @@ -279,8 +279,8 @@ static void lirc_lirc_irq_handler(void *blah)
>  		level = newlevel;
>  
>  		/* giving up */
> -		if (signal > timeout
> -		    || (check_pselecd && (in(1) & LP_PSELECD))) {
> +		if (signal > timeout ||
> +		    (check_pselecd && (in(1) & LP_PSELECD))) {
>  			signal = 0;
>  			pr_notice("timeout\n");
>  			break;

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH 4/5] staging: media: lirc: place operator on previous  line Mauro Carvalho Chehab <mchehab@osg.samsung.com> - 2016-01-25 17:30 +0100

csiph-web