Re: [PATCH 1/3] staging: dgnc: dgnc_tty.c: remove unnecessary parentheses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 16, 2017 at 10:15:59PM +0200, Kamal Heib wrote:
> Cleanup the "Unnecessary parentheses around <expr>" checkpatch.pl error.
> 
> Signed-off-by: Kamal Heib <kamalheib1@xxxxxxxxx>
> ---
>  drivers/staging/dgnc/dgnc_tty.c | 38 +++++++++++++++++++-------------------
>  1 file changed, 19 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
> index d3736daf8cf2..4bf2ae3bf3be 100644
> --- a/drivers/staging/dgnc/dgnc_tty.c
> +++ b/drivers/staging/dgnc/dgnc_tty.c
> @@ -525,7 +525,7 @@ void dgnc_carrier(struct channel_t *ch)
>  
>  	/* Test for a VIRTUAL carrier transition to HIGH. */
>  
> -	if (((ch->ch_flags & CH_FCAR) == 0) && (virt_carrier == 1)) {
> +	if (((ch->ch_flags & CH_FCAR) == 0) && virt_carrier == 1) {

Wait, now I need to go look up to see if && or == comes first in
precedence.  That's not good, horrible checkpatch warning, don't make it
harder to read :(

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux