From: Robin Murphy <robin.murphy@arm.com>
To: Rob Herring <robh@kernel.org>, Joerg Roedel <joro@8bytes.org>,
Will Deacon <will@kernel.org>
Cc: devicetree@vger.kernel.org, iommu@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu: omap: Use of_property_read_bool() for boolean properties
Date: Fri, 10 Mar 2023 16:18:13 +0000 [thread overview]
Message-ID: <dcc64433-f0ba-4cdb-b090-4bb81058ab3d@arm.com> (raw)
In-Reply-To: <20230310144709.1542980-1-robh@kernel.org>
On 2023-03-10 14:47, 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().
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> drivers/iommu/omap-iommu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
> index 3ab078112a7c..baafd6211ac4 100644
> --- a/drivers/iommu/omap-iommu.c
> +++ b/drivers/iommu/omap-iommu.c
> @@ -1191,7 +1191,7 @@ static int omap_iommu_probe(struct platform_device *pdev)
> return err;
> if (obj->nr_tlb_entries != 32 && obj->nr_tlb_entries != 8)
> return -EINVAL;
> - if (of_find_property(of, "ti,iommu-bus-err-back", NULL))
> + if (of_property_read_bool(of, "ti,iommu-bus-err-back"))
> obj->has_bus_err_back = MMU_GP_REG_BUS_ERR_BACK_EN;
>
> obj->dev = &pdev->dev;
next prev parent reply other threads:[~2023-03-10 16:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 14:47 Rob Herring
2023-03-10 16:18 ` Robin Murphy [this message]
2023-03-22 13:57 ` Joerg Roedel
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=dcc64433-f0ba-4cdb-b090-4bb81058ab3d@arm.com \
--to=robin.murphy@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=will@kernel.org \
/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®