From: Brian Masney <bmasney@redhat.com>
To: Rosen Penev <rosenp@gmail.com>
Cc: linux-clk@vger.kernel.org,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] clk: lan966x: use devm_platform_ioremap_resource()
Date: Thu, 7 May 2026 18:47:18 -0400 [thread overview]
Message-ID: <af0WdmaITTSzHA13@redhat.com> (raw)
In-Reply-To: <20260506233532.176285-1-rosenp@gmail.com>
Hi Rosen,
On Wed, May 06, 2026 at 04:35:32PM -0700, Rosen Penev wrote:
> Use it as another instance is used above. This one is optional so treat
> it as such.
The second sentence show go under the ---.
>
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
> drivers/clk/clk-lan966x.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/clk/clk-lan966x.c b/drivers/clk/clk-lan966x.c
> index 3c7a48c616bb..8c7b273eb756 100644
> --- a/drivers/clk/clk-lan966x.c
> +++ b/drivers/clk/clk-lan966x.c
> @@ -253,7 +253,6 @@ static int lan966x_clk_probe(struct platform_device *pdev)
> struct clk_hw_onecell_data *hw_data;
> struct device *dev = &pdev->dev;
> void __iomem *gate_base;
> - struct resource *res;
> int i, ret;
>
> data = device_get_match_data(dev);
> @@ -283,12 +282,8 @@ static int lan966x_clk_probe(struct platform_device *pdev)
> }
> }
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> - if (res) {
> - gate_base = devm_ioremap_resource(&pdev->dev, res);
> - if (IS_ERR(gate_base))
> - return PTR_ERR(gate_base);
> -
> + gate_base = devm_platform_ioremap_resource(pdev, 1);
> + if (!IS_ERR(gate_base)) {
The original code makes the gate clock as optional. With this change, if
the memory range is not specified, then a warning message will appear in
dmesg.
Brian
prev parent reply other threads:[~2026-05-07 22:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 23:35 [PATCH] clk: lan966x: use devm_platform_ioremap_resource() Rosen Penev
2026-05-07 22:47 ` Brian Masney [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=af0WdmaITTSzHA13@redhat.com \
--to=bmasney@redhat.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=rosenp@gmail.com \
--cc=sboyd@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