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] [thread-next>] [day] [month] [year] [list]
Message-ID: <f6df017094f9ebaa13e552a11584d33971f04b0f.camel@perches.com>
Date:   Thu, 31 May 2018 15:14:43 -0700
From:   Joe Perches <joe@...ches.com>
To:     Sankalp Negi <sankalpnegi2310@...il.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        NeilBrown <neil@...wn.name>
Subject: Re: [PATCH] staging: mt7621-spi: Fix Coding style issues reported
 by checkpatch.pl.

On Fri, 2018-06-01 at 00:25 +0530, Sankalp Negi wrote:
> diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c b/drivers/staging/mt7621-spi/spi-mt7621.c
[]
> @@ -164,9 +165,8 @@ static inline int mt7621_spi_wait_till_ready(struct spi_device *spi)
>  		u32 status;
>  
>  		status = mt7621_spi_read(rs, MT7621_SPI_TRANS);
> -		if ((status & SPITRANS_BUSY) == 0) {
> +		if ((status & SPITRANS_BUSY) == 0)
>  			return 0;
> -		}
>  		cpu_relax();
>  		udelay(1);
>  	}

It might also be more readable to avoid a status temporary
and use a direct compare instead:

	for (i = 0; i < RALINK_SPI_WAIT_MAX_LOOP; i++) {
		if (!(mt7621_spi_read(rs, MT7621_SPI_TRANS) & SPITRANS_BUSY))
			return 0;
		cpu_relax();
		udelay(1);
	}

	return -ETIMEDOUT;
}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ