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: <20260204095141.0000479a@huawei.com>
Date: Wed, 4 Feb 2026 09:51:41 +0000
From: Jonathan Cameron <jonathan.cameron@...wei.com>
To: Abdurrahman Hussain via B4 Relay
	<devnull+abdurrahman.nexthop.ai@...nel.org>
CC: <abdurrahman@...thop.ai>, Mark Brown <broonie@...nel.org>, Michal Simek
	<michal.simek@....com>, <linux-spi@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4] spi: xilinx: use device property accessors.

On Tue, 03 Feb 2026 01:55:12 +0000
Abdurrahman Hussain via B4 Relay <devnull+abdurrahman.nexthop.ai@...nel.org> wrote:

> From: Abdurrahman Hussain <abdurrahman@...thop.ai>
> 
> Switch to device property accessors.
> 
> Signed-off-by: Abdurrahman Hussain <abdurrahman@...thop.ai>
> ---
> Switch to generic device property accessors.
> 
> 2.52.0
> 
> base-commit: 944aacb68baf7624ab8d277d0ebf07f025ca137c
> ---
> Changes in v4:
> - Removed patches making the irq optional.
> - Link to v3: https://lore.kernel.org/r/20260122-spi-xilinx-v3-1-8cea20e82f0b@nexthop.ai
> ---
>  drivers/spi/spi-xilinx.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
> index c86dc56f38b4..c4b70e95b695 100644
> --- a/drivers/spi/spi-xilinx.c
> +++ b/drivers/spi/spi-xilinx.c
> @@ -405,11 +405,11 @@ static int xilinx_spi_probe(struct platform_device *pdev)
>  		bits_per_word = pdata->bits_per_word;
>  		force_irq = pdata->force_irq;
>  	} else {
> -		of_property_read_u32(pdev->dev.of_node, "xlnx,num-ss-bits",
> -					  &num_cs);
> -		ret = of_property_read_u32(pdev->dev.of_node,
> -					   "xlnx,num-transfer-bits",
> -					   &bits_per_word);
> +		device_property_read_u32(&pdev->dev, "xlnx,num-ss-bits",
> +					 &num_cs);
> +		ret = device_property_read_u32(&pdev->dev,

Nothing useful is done with ret after this point, so could simplify to
the pattern of setting the default then overriding it if the property
can be successfully read.

		bits_per_word = 8;
		device_property_read_u32(&pdev->dev,
					 "xlnx,num-transfer-bits",
					 &bits_per_word);

> +					       "xlnx,num-transfer-bits",
> +					       &bits_per_word);
>  		if (ret)
>  			bits_per_word = 8;
>  	}
> 
> ---
> base-commit: 944aacb68baf7624ab8d277d0ebf07f025ca137c
> change-id: 20260118-spi-xilinx-1b884d5b6519
> 
> Best regards,


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ