From: Rob Herring <robh@kernel.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Amit Kucheria <amitk@kernel.org>, Zhang Rui <rui.zhang@intel.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] thermal: mediatek: Use of_address_to_resource()
Date: Tue, 18 Apr 2023 11:28:36 -0500 [thread overview]
Message-ID: <20230418162836.GG1764573-robh@kernel.org> (raw)
In-Reply-To: <20230319163231.226738-1-robh@kernel.org>
On Sun, Mar 19, 2023 at 11:32:31AM -0500, Rob Herring wrote:
> Replace of_get_address() and of_translate_address() calls with single
> call to of_address_to_resource().
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> drivers/thermal/mediatek/auxadc_thermal.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
Ping!
>
> diff --git a/drivers/thermal/mediatek/auxadc_thermal.c b/drivers/thermal/mediatek/auxadc_thermal.c
> index ab730f9552d0..c8a3acaf56c1 100644
> --- a/drivers/thermal/mediatek/auxadc_thermal.c
> +++ b/drivers/thermal/mediatek/auxadc_thermal.c
> @@ -897,14 +897,12 @@ static void mtk_thermal_init_bank(struct mtk_thermal *mt, int num,
>
> static u64 of_get_phys_base(struct device_node *np)
> {
> - u64 size64;
> - const __be32 *regaddr_p;
> + struct resource res;
>
> - regaddr_p = of_get_address(np, 0, &size64, NULL);
> - if (!regaddr_p)
> + if (of_address_to_resource(np, 0, &res))
> return OF_BAD_ADDR;
>
> - return of_translate_address(np, regaddr_p);
> + return res.start;
> }
>
> static int mtk_thermal_extract_efuse_v1(struct mtk_thermal *mt, u32 *buf)
> --
> 2.39.2
>
next prev parent reply other threads:[~2023-04-18 16:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-19 16:32 [PATCH] thermal: mediatek: Use of_address_to_resource() Rob Herring
2023-03-20 9:19 ` AngeloGioacchino Del Regno
2023-04-18 16:28 ` Rob Herring [this message]
2023-04-19 7:40 ` Daniel Lezcano
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=20230418162836.GG1764573-robh@kernel.org \
--to=robh@kernel.org \
--cc=amitk@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
/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