linux-csky.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guo Ren <guoren@kernel.org>
To: Rob Herring <robh@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Marc Zyngier <maz@kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-csky@vger.kernel.org
Subject: Re: [PATCH] irqchip: Use of_property_read_bool() for boolean properties
Date: Sun, 12 Mar 2023 20:42:09 +0800	[thread overview]
Message-ID: <CAJF2gTRmf6C0fZs6L4VoRtNivu9dm_6Nibej-oOhZ=69FzLhrA@mail.gmail.com> (raw)
In-Reply-To: <20230310144710.1543070-1-robh@kernel.org>

Acked-by: Guo Ren <guoren@kernel.org> (csky)

On Fri, Mar 10, 2023 at 10:48 PM Rob Herring <robh@kernel.org> 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/irqchip/irq-csky-apb-intc.c | 2 +-
>  drivers/irqchip/irq-gic-v2m.c       | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/irqchip/irq-csky-apb-intc.c b/drivers/irqchip/irq-csky-apb-intc.c
> index 42d8a2438ebc..6710691e4c25 100644
> --- a/drivers/irqchip/irq-csky-apb-intc.c
> +++ b/drivers/irqchip/irq-csky-apb-intc.c
> @@ -68,7 +68,7 @@ static void __init ck_set_gc(struct device_node *node, void __iomem *reg_base,
>         gc->chip_types[0].chip.irq_mask = irq_gc_mask_clr_bit;
>         gc->chip_types[0].chip.irq_unmask = irq_gc_mask_set_bit;
>
> -       if (of_find_property(node, "csky,support-pulse-signal", NULL))
> +       if (of_property_read_bool(node, "csky,support-pulse-signal"))
>                 gc->chip_types[0].chip.irq_unmask = irq_ck_mask_set_bit;
>  }
>
> diff --git a/drivers/irqchip/irq-gic-v2m.c b/drivers/irqchip/irq-gic-v2m.c
> index f1e75b35a52a..f2ff4387870d 100644
> --- a/drivers/irqchip/irq-gic-v2m.c
> +++ b/drivers/irqchip/irq-gic-v2m.c
> @@ -421,7 +421,7 @@ static int __init gicv2m_of_init(struct fwnode_handle *parent_handle,
>                 u32 spi_start = 0, nr_spis = 0;
>                 struct resource res;
>
> -               if (!of_find_property(child, "msi-controller", NULL))
> +               if (!of_property_read_bool(child, "msi-controller"))
>                         continue;
>
>                 ret = of_address_to_resource(child, 0, &res);
> --
> 2.39.2
>


-- 
Best Regards
 Guo Ren

      reply	other threads:[~2023-03-12 12:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 14:47 [PATCH] irqchip: Use of_property_read_bool() for boolean properties Rob Herring
2023-03-12 12:42 ` Guo Ren [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJF2gTRmf6C0fZs6L4VoRtNivu9dm_6Nibej-oOhZ=69FzLhrA@mail.gmail.com' \
    --to=guoren@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-csky@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=robh@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).