[PATCH 2/2] pmdomain: rockchip: Don't log when of_clk_get() fails with -EPROBE_DEFER
Sergey Shtylyov
s.shtylyov at auroraos.dev
Fri Nov 6 12:37:34 PST 2026
On 11/6/26 11:50 AM, Yao Zi wrote:
[...]
>>> Current error handling code considers -EPROBE_DEFER as hard errors,
>>> logs misleading dmesg like,
>>>
>>> rockchip-pm-domain ff600000.power-management:power-controller: power-domain: failed to get clk at index 0: -517
>>> rockchip-pm-domain ff600000.power-management:power-controller: failed to handle node power-domain: -517
>>>
>>> Use dev_err_probe() at the callsite of of_clk_get(), and check for -EPROBE_DEFER in places
>>> where its return value could propagate to.
>>
>> To where?
>
> rockchip_pm_add_one_domain, rockchip_pm_add_subdomain, and
> rockchip_pm_domain_probe. I think it's obvious in the diff and too
> detailed to the commit message, so didn't add them here.
Ah, I was too hasty and misread the patch, sorry about that!
>> And I didn't understand why you couldn't just call dev_err_probe() everywhere --
>> the error code seems to always be propagated...
>
> This was what I originally wanted to do, but dev_err_probe() sets the
> deferred probe reason, and if we call it several times, the earlier and
> more specific messagess ("failed to get clk at index %d") get overridden
> by the later and less descriptive ones ("failed to handle subdomain node
> %pOFn"), which I think would make it harder to debug.
Seeing it now, sorry again! :-)
>>> Fixes: 7c696693a4f5 ("soc: rockchip: power-domain: Add power domain driver")
>>> Fixes: 6be05b5ec161 ("soc: rockchip: power-domain: add support for sub-power domains")
>>> Signed-off-by: Yao Zi <me at ziyao.cc>
>>> Cc: stable at vger.kernel.org
Not sure the patch qualifies for stable though...
[...]
MBR, Sergey
More information about the Linux-rockchip
mailing list