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: <Yeh6x6U3tA7y5gvF@jack.zhora.eu>
Date:   Wed, 19 Jan 2022 22:55:35 +0200
From:   Andi Shyti <andi@...zian.org>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
Cc:     Lee Jones <lee.jones@...aro.org>, Rob Herring <robh+dt@...nel.org>,
        Benson Leung <bleung@...omium.org>,
        Guenter Roeck <groeck@...omium.org>,
        Andi Shyti <andi@...zian.org>, Mark Brown <broonie@...nel.org>,
        Balletbo i Serra <enric.balletbo@...labora.com>,
        Sam Protsenko <semen.protsenko@...aro.org>,
        Pratyush Yadav <p.yadav@...com>, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-samsung-soc@...r.kernel.org, linux-spi@...r.kernel.org,
        Alim Akhtar <alim.akhtar@...sung.com>,
        Rob Herring <robh@...nel.org>
Subject: Re: [PATCH v4 5/5] spi: s3c64xx: allow controller-data to be optional

Hi Krzysztof,

On Wed, Jan 19, 2022 at 09:10:05PM +0100, Krzysztof Kozlowski wrote:
> The Samsung SoC SPI driver requires to provide controller-data node
> for each of SPI peripheral device nodes.  Make this controller-data node
> optional, so DTS could be simpler.
> 
> Suggested-by: Rob Herring <robh@...nel.org>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
> Reviewed-by: Sam Protsenko <semen.protsenko@...aro.org>
> ---
>  drivers/spi/spi-s3c64xx.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
> index 8755cd85e83c..769d958a2f86 100644
> --- a/drivers/spi/spi-s3c64xx.c
> +++ b/drivers/spi/spi-s3c64xx.c
> @@ -796,16 +796,14 @@ static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_ctrldata(
>  		return ERR_PTR(-EINVAL);
>  	}
>  
> -	data_np = of_get_child_by_name(slave_np, "controller-data");
> -	if (!data_np) {
> -		dev_err(&spi->dev, "child node 'controller-data' not found\n");
> -		return ERR_PTR(-EINVAL);
> -	}
> -
>  	cs = kzalloc(sizeof(*cs), GFP_KERNEL);
> -	if (!cs) {
> -		of_node_put(data_np);
> +	if (!cs)
>  		return ERR_PTR(-ENOMEM);
> +
> +	data_np = of_get_child_by_name(slave_np, "controller-data");
> +	if (!data_np) {
> +		dev_info(&spi->dev, "child node 'controller-data' not found, using defaults\n");

"not found" sounds like an error; I would just write something
like "feedback delay set to '0' dfault", you also tell that the
default value is '0'.

In any case,

Reviewed-by: Andi Shyti <andi@...zian.org>

Andi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ