lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230418162836.GG1764573-robh@kernel.org>
Date:   Tue, 18 Apr 2023 11:28:36 -0500
From:   Rob Herring <robh@...nel.org>
To:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Amit Kucheria <amitk@...nel.org>,
        Zhang Rui <rui.zhang@...el.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>
Cc:     linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH] thermal: mediatek: Use of_address_to_resource()

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@...nel.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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ