lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 30 Aug 2019 03:03:56 -0700
From:   Joe Perches <joe@...ches.com>
To:     Prakhar Sinha <prakharsinha2808@...il.com>,
        gregkh@...uxfoundation.org, kim.jamie.bradley@...il.com
Cc:     devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: rts5208: Fixed checkpath warning.

On Fri, 2019-08-30 at 12:41 +0530, Prakhar Sinha wrote:
> This patch solves the following checkpatch.pl's message in drivers/staging/rts5208/rtsx_transport.c:397.
> WARNING: line over 80 characters
> +                               option = RTSX_SG_VALID | RTSX_SG_END | RTSX_SG_TRANS_DATA;
[]
> diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c
[]
> @@ -394,7 +394,8 @@ static int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card,
>  			*index = *index + 1;
>  		}
>  		if ((i == (sg_cnt - 1)) || !resid)
> -			option = RTSX_SG_VALID | RTSX_SG_END | RTSX_SG_TRANS_DATA;
> +			option = RTSX_SG_VALID | RTSX_SG_END | 
> +				 RTSX_SG_TRANS_DATA;
>  		else
>  			option = RTSX_SG_VALID | RTSX_SG_TRANS_DATA;

probably more readable as:

		option = RTXS_SG_VALID | RTSX_SG_TRANS_DATA;
		if (i == sg_cnt - 1 || !resid)
			option |= RTXS_SG_END;

The compiler should produce the same object code.

Add parentheses in the if to suit, but they are not
necessary.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ