From: Jarkko Sakkinen <jarkko@kernel.org>
To: "Rob Herring (Arm)" <robh@kernel.org>
Cc: Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>,
linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tpm: Use of_reserved_mem_region_to_resource() for "memory-region"
Date: Fri, 4 Jul 2025 05:58:46 +0300 [thread overview]
Message-ID: <aGdDZodNndTfVEQ2@kernel.org> (raw)
In-Reply-To: <20250703183424.2073075-1-robh@kernel.org>
On Thu, Jul 03, 2025 at 01:34:24PM -0500, Rob Herring (Arm) wrote:
> Use the newly added of_reserved_mem_region_to_resource() function to
> handle "memory-region" properties.
>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
> drivers/char/tpm/eventlog/of.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/char/tpm/eventlog/of.c b/drivers/char/tpm/eventlog/of.c
> index 930fe43d5daf..92cec9722ee4 100644
> --- a/drivers/char/tpm/eventlog/of.c
> +++ b/drivers/char/tpm/eventlog/of.c
> @@ -24,16 +24,10 @@
>
> static int tpm_read_log_memory_region(struct tpm_chip *chip)
> {
> - struct device_node *node;
> struct resource res;
> int rc;
>
> - node = of_parse_phandle(chip->dev.parent->of_node, "memory-region", 0);
> - if (!node)
> - return -ENODEV;
> -
> - rc = of_address_to_resource(node, 0, &res);
> - of_node_put(node);
> + rc = of_reserved_mem_region_to_resource(chip->dev.parent->of_node, 0, &res);
> if (rc)
> return rc;
>
> --
> 2.47.2
>
Thanks. It is now applied to my master.
BR, Jarkko
prev parent reply other threads:[~2025-07-04 2:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-03 18:34 [PATCH] tpm: Use of_reserved_mem_region_to_resource() for "memory-region" Rob Herring (Arm)
2025-07-04 2:58 ` Jarkko Sakkinen [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=aGdDZodNndTfVEQ2@kernel.org \
--to=jarkko@kernel.org \
--cc=jgg@ziepe.ca \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=robh@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;
as well as URLs for NNTP newsgroup(s).