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: <20240212052435.vpisjmqxoe4aff2f@dhruva>
Date: Mon, 12 Feb 2024 10:54:35 +0530
From: Dhruva Gole <d-gole@...com>
To: Théo Lebrun <theo.lebrun@...tlin.com>
CC: Mark Brown <broonie@...nel.org>, <linux-spi@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        Gregory CLEMENT
	<gregory.clement@...tlin.com>,
        Vladimir Kondratiev
	<vladimir.kondratiev@...ileye.com>,
        Thomas Petazzoni
	<thomas.petazzoni@...tlin.com>,
        Tawfik Bayouk <tawfik.bayouk@...ileye.com>
Subject: Re: [PATCH 1/4] spi: cadence-qspi: assert each subnode flash CS is
 valid

Hi,

On Feb 09, 2024 at 14:45:30 +0100, Théo Lebrun wrote:
> Check each flash CS against the num-cs property from devicetree.
> Fallback to the driver max supported value (CQSPI_MAX_CHIPSELECT) if
> num-cs isn't present.
> 
> cqspi->num_chipselect is set in cqspi_of_get_pdata() to the num-cs
> devicetree property, or to CQSPI_MAX_CHIPSELECT if num-cs is not set.

Makes sense,

> 
> Signed-off-by: Théo Lebrun <theo.lebrun@...tlin.com>
> ---
>  drivers/spi/spi-cadence-quadspi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
> index d44a0c501879..7ba4d5d16fd2 100644
> --- a/drivers/spi/spi-cadence-quadspi.c
> +++ b/drivers/spi/spi-cadence-quadspi.c
> @@ -1635,7 +1635,7 @@ static int cqspi_setup_flash(struct cqspi_st *cqspi)
>  			return ret;
>  		}
>  
> -		if (cs >= CQSPI_MAX_CHIPSELECT) {
> +		if (cs >= cqspi->num_chipselect) {

Reviewed-by: Dhruva Gole <d-gole@...com>


-- 
Best regards,
Dhruva Gole <d-gole@...com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ