linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: hyperbus: Use of_property_present() for non-boolean properties
@ 2025-01-09 18:21 Rob Herring (Arm)
  2025-01-10 13:13 ` Tudor Ambarus
  2025-01-15 18:14 ` Miquel Raynal
  0 siblings, 2 replies; 3+ messages in thread
From: Rob Herring (Arm) @ 2025-01-09 18:21 UTC (permalink / raw)
  To: Vignesh Raghavendra, Tudor Ambarus, Miquel Raynal,
	Richard Weinberger
  Cc: linux-mtd, linux-kernel

The use of of_property_read_bool() for non-boolean properties is
deprecated in favor of of_property_present() when testing for property
presence.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 drivers/mtd/hyperbus/hbmc-am654.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/hyperbus/hbmc-am654.c b/drivers/mtd/hyperbus/hbmc-am654.c
index 217f4e69233f..60bdce4391cd 100644
--- a/drivers/mtd/hyperbus/hbmc-am654.c
+++ b/drivers/mtd/hyperbus/hbmc-am654.c
@@ -176,7 +176,7 @@ static int am654_hbmc_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	if (of_property_read_bool(dev->of_node, "mux-controls")) {
+	if (of_property_present(dev->of_node, "mux-controls")) {
 		struct mux_control *control = devm_mux_control_get(dev, NULL);
 
 		if (IS_ERR(control))
-- 
2.45.2


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: hyperbus: Use of_property_present() for non-boolean properties
  2025-01-09 18:21 [PATCH] mtd: hyperbus: Use of_property_present() for non-boolean properties Rob Herring (Arm)
@ 2025-01-10 13:13 ` Tudor Ambarus
  2025-01-15 18:14 ` Miquel Raynal
  1 sibling, 0 replies; 3+ messages in thread
From: Tudor Ambarus @ 2025-01-10 13:13 UTC (permalink / raw)
  To: Rob Herring (Arm), Vignesh Raghavendra, Miquel Raynal,
	Richard Weinberger
  Cc: linux-mtd, linux-kernel



On 1/9/25 6:21 PM, Rob Herring (Arm) wrote:
> The use of of_property_read_bool() for non-boolean properties is
> deprecated in favor of of_property_present() when testing for property
> presence.
> 
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>

> ---
>  drivers/mtd/hyperbus/hbmc-am654.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/hyperbus/hbmc-am654.c b/drivers/mtd/hyperbus/hbmc-am654.c
> index 217f4e69233f..60bdce4391cd 100644
> --- a/drivers/mtd/hyperbus/hbmc-am654.c
> +++ b/drivers/mtd/hyperbus/hbmc-am654.c
> @@ -176,7 +176,7 @@ static int am654_hbmc_probe(struct platform_device *pdev)
>  	if (ret)
>  		return ret;
>  
> -	if (of_property_read_bool(dev->of_node, "mux-controls")) {
> +	if (of_property_present(dev->of_node, "mux-controls")) {
>  		struct mux_control *control = devm_mux_control_get(dev, NULL);
>  
>  		if (IS_ERR(control))

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: hyperbus: Use of_property_present() for non-boolean properties
  2025-01-09 18:21 [PATCH] mtd: hyperbus: Use of_property_present() for non-boolean properties Rob Herring (Arm)
  2025-01-10 13:13 ` Tudor Ambarus
@ 2025-01-15 18:14 ` Miquel Raynal
  1 sibling, 0 replies; 3+ messages in thread
From: Miquel Raynal @ 2025-01-15 18:14 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Vignesh Raghavendra, Tudor Ambarus, Richard Weinberger, linux-mtd,
	linux-kernel

Hi Rob,

On 09/01/2025 at 12:21:48 -06, "Rob Herring (Arm)" <robh@kernel.org> wrote:

> The use of of_property_read_bool() for non-boolean properties is
> deprecated in favor of of_property_present() when testing for property
> presence.

This patch did not apply because of another unrelated change in my tree
touching the return paths in this driver, I fixed it while applying.

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-15 18:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-09 18:21 [PATCH] mtd: hyperbus: Use of_property_present() for non-boolean properties Rob Herring (Arm)
2025-01-10 13:13 ` Tudor Ambarus
2025-01-15 18:14 ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).