From: Sergey Shtylyov <s.shtylyov@auroraos.dev>
To: Ulf Hansson <ulf.hansson@oss.qualcomm.com>
Cc: Ulf Hansson <ulfh@kernel.org>, Heiko Stuebner <heiko@sntech.de>,
<linux-pm@vger.kernel.org>, <linux-rockchip@lists.infradead.org>,
Caesar Wang <wxt@rock-chips.com>,
Kevin Hilman <khilman@linaro.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] pmdomain: rockchip: fix domain check in rockchip_pm_add_one_domain()
Date: Fri, 25 Sep 2026 22:38:46 +0300 [thread overview]
Message-ID: <66a4cfe1-286c-4d63-9285-2445c48739ab@auroraos.dev> (raw)
In-Reply-To: <eae7ec74-5b90-4258-9576-159c700bd8f4@auroraos.dev>
On 9/23/26 11:44 PM, Sergey Shtylyov wrote:
[...]
>>> In rockchip_pm_add_one_domain(), there's the check (most probably for
>>> the case where the "reg" prop has an unexpected value?) which doesn't
By "unexpected value" I meant a domain that isn't controlled by this
driver and so have no explicit initializer in *_pm_domains[]. Looks like
for such domain #s rockchip_pm_add_one_domain() should fail with -EINVAL.
>>> make much sense as the variable pd_info will be NULL iff pmu->info->
>>> domain_info is NULL and the variable id is 0. What does make sense
>>> there is checking pd_info->pwr_mask and pd_info->req_mask which (as
>>> seems to follow from the code) can't both be 0 for a valid domain...
For the domains that have no matching initializer these fields should
be both 0. I had chosen checking these 2 fields instead of pd_info->name
as I intended this patch as a fix, easily backportable to the LTS kernels.
>>> Found by Linux Verification Center (linuxtesting.org) with the Svace
>>> static analysis tool.
>>>
>>> Fixes: 7c696693a4f5 ("soc: rockchip: power-domain: Add power domain driver")
>>> Signed-off-by: Sergey Shtylyov <s.shtylyov@auroraos.dev>
>>
>> Applied for next, but without the fixes tag, thanks!
>>
>> Note, that I am dropping the fixes tag because if there was a real
>> problem, we would require yet another fix on top to get the
If a defective DT is considered an issue then there's a problem. :-)
>> corresponding domain declaration to be correct. Yet, the patch is
>> useful as is!
Like I've already told, my aim was not detecting the bad declarations,
just bad DTs. I probably just wasn't elaborate/assertive enough...
> I was thinking of doing a more elaborate description but if you
> considered it good enough, OK... :-)
So what are you going to do with this, leave things as they are: the
patch merged to the next branch (in its current form) and not merged to
fixes? Perhaps a revert or an incremental patch?
>> Kind regards
>> Uffe
MBR, Sergey
prev parent reply other threads:[~2026-09-25 19:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-20 17:59 [PATCH] pmdomain: rockchip: fix domain check in rockchip_pm_add_one_domain() Sergey Shtylyov
2026-09-21 6:36 ` Shawn Lin
2026-09-21 16:13 ` Sergey Shtylyov
2026-09-22 0:47 ` Shawn Lin
2026-09-22 16:04 ` Sergey Shtylyov
2026-09-23 12:14 ` Ulf Hansson
2026-09-23 20:38 ` Sergey Shtylyov
2026-09-24 8:48 ` Ulf Hansson
2026-09-24 20:20 ` Sergey Shtylyov
2026-09-23 20:44 ` Sergey Shtylyov
2026-09-25 19:38 ` Sergey Shtylyov [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=66a4cfe1-286c-4d63-9285-2445c48739ab@auroraos.dev \
--to=s.shtylyov@auroraos.dev \
--cc=heiko@sntech.de \
--cc=khilman@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=ulf.hansson@oss.qualcomm.com \
--cc=ulfh@kernel.org \
--cc=wxt@rock-chips.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