From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Rob Herring <robh@kernel.org>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: devicetree@vger.kernel.org, linux-mips@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mips: Use of_property_read_bool() for boolean properties
Date: Mon, 13 Mar 2023 09:25:06 +0100 [thread overview]
Message-ID: <c2191745-714c-7cdc-ba2d-a254245bbdac@linaro.org> (raw)
In-Reply-To: <20230310144656.1540950-1-robh@kernel.org>
Hi Rob,
On 10/3/23 15:46, 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>
> ---
> arch/mips/pci/pci-lantiq.c | 2 +-
> arch/mips/pci/pci-rt3883.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c
> index d967e4c0cf24..79e29bf42a24 100644
> --- a/arch/mips/pci/pci-lantiq.c
> +++ b/arch/mips/pci/pci-lantiq.c
> @@ -118,7 +118,7 @@ static int ltq_pci_startup(struct platform_device *pdev)
>
> /* and enable the clocks */
> clk_enable(clk_pci);
> - if (of_find_property(node, "lantiq,external-clock", NULL))
> + if (of_property_read_bool(node, "lantiq,external-clock"))
Just curious, is this property correct? I can't find it and wonder if
this is dead code (always disabling the clock)... I'm probably missing
something obvious :/
> clk_enable(clk_external);
> else
> clk_disable(clk_external);
next prev parent reply other threads:[~2023-03-13 8:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 14:46 Rob Herring
2023-03-13 8:25 ` Philippe Mathieu-Daudé [this message]
2023-03-13 10:59 ` Jonas Gorski
2023-03-14 15:20 ` Rob Herring
2023-03-14 16:18 ` Thomas Bogendoerfer
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=c2191745-714c-7cdc-ba2d-a254245bbdac@linaro.org \
--to=philmd@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=robh@kernel.org \
--cc=tsbogend@alpha.franken.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
all inboxes | Powered by JetHome®