From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: "Ricardo Cañuelo" <ricardo.canuelo@collabora.com>,
matthias.bgg@gmail.com
Cc: void0red@hust.edu.cn, daniel.lezcano@linaro.org,
linux-mediatek@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org,
kernel@collabora.com
Subject: Re: [PATCH] Revert "thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe"
Date: Thu, 25 May 2023 13:18:29 +0200 [thread overview]
Message-ID: <915d83d3-0fe9-faa5-c7a4-db9a81374178@collabora.com> (raw)
In-Reply-To: <2bf27b63-2269-1e11-dd20-bf6a7691ee42@collabora.com>
Il 25/05/23 13:17, AngeloGioacchino Del Regno ha scritto:
> Il 25/05/23 13:14, Ricardo Cañuelo ha scritto:
>> This reverts commit f05c7b7d9ea9477fcc388476c6f4ade8c66d2d26.
>>
>> That change was causing a regression in the generic-adc-thermal-probed
>> bootrr test as reported in the kernelci-results list [1].
>> A proper rework will take longer, so revert it for now.
>>
>> [1] https://groups.io/g/kernelci-results/message/42660
>>
>> Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
>> Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>> ---
>
> Adding context: the rework would require us to "probably" change this
> iomap to getting regmap handle(s) and working with that, which is why
> that wouldn't be trivial.
>
> My apologies about initially misunderstanding the fact that
> devm_of_iomap() behaves in a different way compared to of_iomap().
>
> Ricardo, huge thanks for sending this revert.
>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>
>
Sorry for the double mail, you're missing the Fixes tag, as this should also
be scheduled for backporting; you can use the commit that you're reverting
as your Fixes tag.
>> drivers/thermal/mediatek/auxadc_thermal.c | 14 ++------------
>> 1 file changed, 2 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/thermal/mediatek/auxadc_thermal.c
>> b/drivers/thermal/mediatek/auxadc_thermal.c
>> index 0b5528804bbd..f59d36de20a0 100644
>> --- a/drivers/thermal/mediatek/auxadc_thermal.c
>> +++ b/drivers/thermal/mediatek/auxadc_thermal.c
>> @@ -1222,12 +1222,7 @@ static int mtk_thermal_probe(struct platform_device *pdev)
>> return -ENODEV;
>> }
>> - auxadc_base = devm_of_iomap(&pdev->dev, auxadc, 0, NULL);
>> - if (IS_ERR(auxadc_base)) {
>> - of_node_put(auxadc);
>> - return PTR_ERR(auxadc_base);
>> - }
>> -
>> + auxadc_base = of_iomap(auxadc, 0);
>> auxadc_phys_base = of_get_phys_base(auxadc);
>> of_node_put(auxadc);
>> @@ -1243,12 +1238,7 @@ static int mtk_thermal_probe(struct platform_device *pdev)
>> return -ENODEV;
>> }
>> - apmixed_base = devm_of_iomap(&pdev->dev, apmixedsys, 0, NULL);
>> - if (IS_ERR(apmixed_base)) {
>> - of_node_put(apmixedsys);
>> - return PTR_ERR(apmixed_base);
>> - }
>> -
>> + apmixed_base = of_iomap(apmixedsys, 0);
>> apmixed_phys_base = of_get_phys_base(apmixedsys);
>> of_node_put(apmixedsys);
>
>
prev parent reply other threads:[~2023-05-25 11:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-25 11:14 [PATCH] Revert "thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe" Ricardo Cañuelo
2023-05-25 11:17 ` AngeloGioacchino Del Regno
2023-05-25 11:18 ` AngeloGioacchino Del Regno [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=915d83d3-0fe9-faa5-c7a4-db9a81374178@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=daniel.lezcano@linaro.org \
--cc=kernel@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=ricardo.canuelo@collabora.com \
--cc=void0red@hust.edu.cn \
/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