public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mailbox: Use of_property_read_bool() for boolean properties
@ 2023-03-10 14:47 Rob Herring
  2023-04-18 16:25 ` Rob Herring
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2023-03-10 14:47 UTC (permalink / raw)
  To: Jassi Brar; +Cc: devicetree, linux-kernel

It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties.
Convert reading boolean properties to to of_property_read_bool().

Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/mailbox/hi6220-mailbox.c | 5 +----
 drivers/mailbox/omap-mailbox.c   | 3 +--
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/mailbox/hi6220-mailbox.c b/drivers/mailbox/hi6220-mailbox.c
index fca61f5312d9..1c73c63598f5 100644
--- a/drivers/mailbox/hi6220-mailbox.c
+++ b/drivers/mailbox/hi6220-mailbox.c
@@ -325,10 +325,7 @@ static int hi6220_mbox_probe(struct platform_device *pdev)
 	writel(~0x0, ACK_INT_CLR_REG(mbox->ipc));
 
 	/* use interrupt for tx's ack */
-	if (of_find_property(node, "hi6220,mbox-tx-noirq", NULL))
-		mbox->tx_irq_mode = false;
-	else
-		mbox->tx_irq_mode = true;
+	mbox->tx_irq_mode = !of_property_read_bool(node, "hi6220,mbox-tx-noirq");
 
 	if (mbox->tx_irq_mode)
 		mbox->controller.txdone_irq = true;
diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c
index 098c82d87137..fd28ac2120df 100644
--- a/drivers/mailbox/omap-mailbox.c
+++ b/drivers/mailbox/omap-mailbox.c
@@ -763,8 +763,7 @@ static int omap_mbox_probe(struct platform_device *pdev)
 
 		finfo->name = child->name;
 
-		if (of_find_property(child, "ti,mbox-send-noirq", NULL))
-			finfo->send_no_irq = true;
+		finfo->send_no_irq = of_property_read_bool(child, "ti,mbox-send-noirq");
 
 		if (finfo->tx_id >= num_fifos || finfo->rx_id >= num_fifos ||
 		    finfo->tx_usr >= num_users || finfo->rx_usr >= num_users)
-- 
2.39.2


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

* Re: [PATCH] mailbox: Use of_property_read_bool() for boolean properties
  2023-03-10 14:47 [PATCH] mailbox: Use of_property_read_bool() for boolean properties Rob Herring
@ 2023-04-18 16:25 ` Rob Herring
  2023-04-18 16:36   ` Jassi Brar
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2023-04-18 16:25 UTC (permalink / raw)
  To: Jassi Brar; +Cc: devicetree, linux-kernel

On Fri, Mar 10, 2023 at 08:47:10AM -0600, Rob Herring wrote:
> It is preferred to use typed property access functions (i.e.
> of_property_read_<type> functions) rather than low-level
> of_get_property/of_find_property functions for reading properties.
> Convert reading boolean properties to to of_property_read_bool().
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  drivers/mailbox/hi6220-mailbox.c | 5 +----
>  drivers/mailbox/omap-mailbox.c   | 3 +--
>  2 files changed, 2 insertions(+), 6 deletions(-)

Ping!

> 
> diff --git a/drivers/mailbox/hi6220-mailbox.c b/drivers/mailbox/hi6220-mailbox.c
> index fca61f5312d9..1c73c63598f5 100644
> --- a/drivers/mailbox/hi6220-mailbox.c
> +++ b/drivers/mailbox/hi6220-mailbox.c
> @@ -325,10 +325,7 @@ static int hi6220_mbox_probe(struct platform_device *pdev)
>  	writel(~0x0, ACK_INT_CLR_REG(mbox->ipc));
>  
>  	/* use interrupt for tx's ack */
> -	if (of_find_property(node, "hi6220,mbox-tx-noirq", NULL))
> -		mbox->tx_irq_mode = false;
> -	else
> -		mbox->tx_irq_mode = true;
> +	mbox->tx_irq_mode = !of_property_read_bool(node, "hi6220,mbox-tx-noirq");
>  
>  	if (mbox->tx_irq_mode)
>  		mbox->controller.txdone_irq = true;
> diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c
> index 098c82d87137..fd28ac2120df 100644
> --- a/drivers/mailbox/omap-mailbox.c
> +++ b/drivers/mailbox/omap-mailbox.c
> @@ -763,8 +763,7 @@ static int omap_mbox_probe(struct platform_device *pdev)
>  
>  		finfo->name = child->name;
>  
> -		if (of_find_property(child, "ti,mbox-send-noirq", NULL))
> -			finfo->send_no_irq = true;
> +		finfo->send_no_irq = of_property_read_bool(child, "ti,mbox-send-noirq");
>  
>  		if (finfo->tx_id >= num_fifos || finfo->rx_id >= num_fifos ||
>  		    finfo->tx_usr >= num_users || finfo->rx_usr >= num_users)
> -- 
> 2.39.2
> 

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

* Re: [PATCH] mailbox: Use of_property_read_bool() for boolean properties
  2023-04-18 16:25 ` Rob Herring
@ 2023-04-18 16:36   ` Jassi Brar
  2023-04-18 19:05     ` Rob Herring
  0 siblings, 1 reply; 5+ messages in thread
From: Jassi Brar @ 2023-04-18 16:36 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree, linux-kernel

On Tue, Apr 18, 2023 at 11:25 AM Rob Herring <robh@kernel.org> wrote:
>
> On Fri, Mar 10, 2023 at 08:47:10AM -0600, Rob Herring wrote:
> > It is preferred to use typed property access functions (i.e.
> > of_property_read_<type> functions) rather than low-level
> > of_get_property/of_find_property functions for reading properties.
> > Convert reading boolean properties to to of_property_read_bool().
> >
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> >  drivers/mailbox/hi6220-mailbox.c | 5 +----
> >  drivers/mailbox/omap-mailbox.c   | 3 +--
> >  2 files changed, 2 insertions(+), 6 deletions(-)
>
> Ping!
>
Pong :)

I don't usually reply back that it looks good and will pick for the
merge window. I just do that. So yes, it is not overlooked.

cheers

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

* Re: [PATCH] mailbox: Use of_property_read_bool() for boolean properties
  2023-04-18 16:36   ` Jassi Brar
@ 2023-04-18 19:05     ` Rob Herring
  2023-04-18 19:22       ` Jassi Brar
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2023-04-18 19:05 UTC (permalink / raw)
  To: Jassi Brar; +Cc: devicetree, linux-kernel

On Tue, Apr 18, 2023 at 11:36 AM Jassi Brar <jassisinghbrar@gmail.com> wrote:
>
> On Tue, Apr 18, 2023 at 11:25 AM Rob Herring <robh@kernel.org> wrote:
> >
> > On Fri, Mar 10, 2023 at 08:47:10AM -0600, Rob Herring wrote:
> > > It is preferred to use typed property access functions (i.e.
> > > of_property_read_<type> functions) rather than low-level
> > > of_get_property/of_find_property functions for reading properties.
> > > Convert reading boolean properties to to of_property_read_bool().
> > >
> > > Signed-off-by: Rob Herring <robh@kernel.org>
> > > ---
> > >  drivers/mailbox/hi6220-mailbox.c | 5 +----
> > >  drivers/mailbox/omap-mailbox.c   | 3 +--
> > >  2 files changed, 2 insertions(+), 6 deletions(-)
> >
> > Ping!
> >
> Pong :)
>
> I don't usually reply back that it looks good and will pick for the
> merge window. I just do that. So yes, it is not overlooked.

Okay. No reply nor applying it in over a month is not a great
experience for submitters.

Rob

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

* Re: [PATCH] mailbox: Use of_property_read_bool() for boolean properties
  2023-04-18 19:05     ` Rob Herring
@ 2023-04-18 19:22       ` Jassi Brar
  0 siblings, 0 replies; 5+ messages in thread
From: Jassi Brar @ 2023-04-18 19:22 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree, linux-kernel

On Tue, Apr 18, 2023 at 2:06 PM Rob Herring <robh@kernel.org> wrote:
>
> On Tue, Apr 18, 2023 at 11:36 AM Jassi Brar <jassisinghbrar@gmail.com> wrote:
> >
> > On Tue, Apr 18, 2023 at 11:25 AM Rob Herring <robh@kernel.org> wrote:
> > >
> > > On Fri, Mar 10, 2023 at 08:47:10AM -0600, Rob Herring wrote:
> > > > It is preferred to use typed property access functions (i.e.
> > > > of_property_read_<type> functions) rather than low-level
> > > > of_get_property/of_find_property functions for reading properties.
> > > > Convert reading boolean properties to to of_property_read_bool().
> > > >
> > > > Signed-off-by: Rob Herring <robh@kernel.org>
> > > > ---
> > > >  drivers/mailbox/hi6220-mailbox.c | 5 +----
> > > >  drivers/mailbox/omap-mailbox.c   | 3 +--
> > > >  2 files changed, 2 insertions(+), 6 deletions(-)
> > >
> > > Ping!
> > >
> > Pong :)
> >
> > I don't usually reply back that it looks good and will pick for the
> > merge window. I just do that. So yes, it is not overlooked.
>
> Okay. No reply nor applying it in over a month is not a great
> experience for submitters.
>
I sense that. I may be wrong, but I feel any form of ack from a
maintainer demotivates others from looking critically at the
submission. I have seen revisions asked after many weeks of
submission. So my idea is to let a patch roast in public glare.  Maybe
I should reply after 2-3weeks.

-j

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

end of thread, other threads:[~2023-04-18 19:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-10 14:47 [PATCH] mailbox: Use of_property_read_bool() for boolean properties Rob Herring
2023-04-18 16:25 ` Rob Herring
2023-04-18 16:36   ` Jassi Brar
2023-04-18 19:05     ` Rob Herring
2023-04-18 19:22       ` Jassi Brar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox