[PATCH v6 3/3] memory: mtk-smi: mt8188: Use devm_pm_runtime_enable

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Wed Apr 9 01:26:18 PDT 2025


Il 08/04/25 08:29, Krzysztof Kozlowski ha scritto:
> On Tue, Apr 08, 2025 at 11:31:56AM GMT, Friday Yang wrote:
>> Replace pm_runtime_enable with the devres-enabled version which
>> can trigger pm_runtime_disable.
>>
>> Signed-off-by: Friday Yang <friday.yang at mediatek.com>
>> ---
>>   drivers/memory/mtk-smi.c | 16 +++++++++-------
>>   1 file changed, 9 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c
>> index f25d46d2ef33..daef6d350419 100644
>> --- a/drivers/memory/mtk-smi.c
>> +++ b/drivers/memory/mtk-smi.c
>> @@ -713,16 +713,17 @@ static int mtk_smi_larb_probe(struct platform_device *pdev)
>>   	if (ret)
>>   		goto err_link_remove;
>>
>> -	pm_runtime_enable(dev);
>> +	ret = devm_pm_runtime_enable(dev);
>> +	if (ret)
>> +		goto err_link_remove;
>> +
>>   	platform_set_drvdata(pdev, larb);
>>   	ret = component_add(dev, &mtk_smi_larb_component_ops);
>>   	if (ret)
>> -		goto err_pm_disable;
>> +		goto err_link_remove;
>>
>>   	return 0;
>>
>> -err_pm_disable:
>> -	pm_runtime_disable(dev);
> 
> You now broke/changed the order of cleanup without any explanation.
> 
> Best regards,
> Krzysztof
> 

I agree some comment in the commit description saying that the cleanup reordering
doesn't matter in this specific case would've been nice to have, but anyway IMO
it's not a big deal - he didn't break anything, anyway :-)

Instead, the big deal is that Friday forgot to retain Reviewed-by and Acked-by tags
that were released to him on those patches....... :-)

Cheers,
Angelo



More information about the Linux-mediatek mailing list