From: Lee Jones <lee@kernel.org>
To: Loic Poulain <loic.poulain@linaro.org>
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mfd: syscon: Use of_io_request_and_map() for IO mapping
Date: Thu, 30 Mar 2023 12:42:42 +0100 [thread overview]
Message-ID: <20230330114242.GC434339@google.com> (raw)
In-Reply-To: <20230320152319.665592-1-loic.poulain@linaro.org>
On Mon, 20 Mar 2023, Loic Poulain wrote:
> Use of_io_request_and_map() instead of of_iomap() so that the
> region is reserved and protected, i.e reported in /proc/iomem
> and not accessible from user side (CONFIG_IO_STRICT_DEVMEM).
>
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
> ---
> drivers/mfd/syscon.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
> index bdb2ce7ff03b..7e6d4edda118 100644
> --- a/drivers/mfd/syscon.c
> +++ b/drivers/mfd/syscon.c
> @@ -60,7 +60,7 @@ static struct syscon *of_syscon_register(struct device_node *np, bool check_clk)
> goto err_map;
> }
>
> - base = of_iomap(np, 0);
> + base = of_io_request_and_map(np, 0, NULL);
> if (!base) {
> ret = -ENOMEM;
> goto err_map;
Looks sane though.
Arnd, do you have an opinion?
--
Lee Jones [李琼斯]
next prev parent reply other threads:[~2023-03-30 11:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 15:23 [PATCH] mfd: syscon: Use of_io_request_and_map() for IO mapping Loic Poulain
2023-03-30 11:42 ` Lee Jones [this message]
2023-03-30 12:45 ` Arnd Bergmann
2023-03-30 13:22 ` Loic Poulain
2023-03-31 13:06 ` Arnd Bergmann
2023-03-31 15:52 ` Loic Poulain
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=20230330114242.GC434339@google.com \
--to=lee@kernel.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=loic.poulain@linaro.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