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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 22 Mar 2017 13:00:27 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Arushi Singhal <arushisinghal19971997@...il.com>
Cc:     gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
        outreachy-kernel@...glegroups.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: rts5208: Replace a bit shift by a use of BIT.

On Wed, Mar 22, 2017 at 08:04:47AM +0530, Arushi Singhal wrote:
> This patch replaces bit shifting on 1 with the BIT(x) macro.
> This was done with coccinelle:
> @@
> constant c;
> @@
> 
> -1 << c
> +BIT(c)
> 
> Signed-off-by: Arushi Singhal <arushisinghal19971997@...il.com>
> ---
>  drivers/staging/rts5208/rtsx_chip.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rts5208/rtsx_chip.c b/drivers/staging/rts5208/rtsx_chip.c
> index 3511157a2c78..06a61800b71a 100644
> --- a/drivers/staging/rts5208/rtsx_chip.c
> +++ b/drivers/staging/rts5208/rtsx_chip.c
> @@ -1490,7 +1490,7 @@ int rtsx_write_register(struct rtsx_chip *chip, u16 addr, u8 mask, u8 data)
>  
>  	for (i = 0; i < MAX_RW_REG_CNT; i++) {
>  		val = rtsx_readl(chip, RTSX_HAIMR);
> -		if ((val & (1 << 31)) == 0) {
> +		if ((val & (BIT(31))) == 0) {

Extra parens.  Please check all your patches again.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ