Re: [PATCH v24 04/12] mfd: psci-mfd: Add PSCI MFD driver for cpuidle-psci-domain cell

Shivendra Pratap <[email protected]>
Newsgroups dev.linux.lists.sashiko-reviews,dev.linux.lists.mfd,org.kernel.vger.linux-devicetree
Message-ID <[email protected]>

On 8/12/2026 1:45 PM, Lee Jones wrote:
> On Mon, 03 Aug 2026, [email protected] wrote:
> 
>> Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
>> - [Medium] The new `psci-mfd` driver lacks a `.remove` callback and does not set `.suppress_bind_attrs = true`, allowing manual unbinding via sysfs which leads to resource leaks.
>> - [Low] The newly introduced MFD driver, its file, and its structures include the string 'mfd' in their names, violating subsystem conventions.
> 
> Please review, explain or fix the Sashiko review(s).
> 
> If this is a set, this request includes the other patches too.

Already replied to Sashiko's review comments on other patches.

> 
>> --
>>
>> --- Patch [4]: [PATCH v24 04/12] mfd: psci-mfd: Add PSCI MFD driver for cpuidle-psci-domain cell ---
>> commit 26907aee3ff3e0a5d7112a9be25ebbebb10e94c7
>> Author: Shivendra Pratap <[email protected]>
>>
>> mfd: psci-mfd: Add PSCI MFD driver for cpuidle-psci-domain cell
>>
>> This commit introduces a new PSCI MFD driver to manage multiple consumers of
>> the PSCI device node. It registers the cpuidle-psci-domain as a child cell
>> and updates the cpuidle driver to probe as an MFD child.
>>
>>> diff --git a/drivers/mfd/psci-mfd.c b/drivers/mfd/psci-mfd.c
>>> new file mode 100644
>>> index 0000000000000..7affd6bb09dd8
>>> --- /dev/null
>>> +++ b/drivers/mfd/psci-mfd.c
>> [ ... ]
>>> +static struct platform_driver psci_mfd_driver = {
>>> +	.probe = psci_mfd_probe,
>>> +	.driver = {
>>> +		.name = "psci-mfd",
>>
>> [Severity: Low]
>> This isn't a bug, but does naming the driver and struct with the "mfd"
>> string violate the MFD subsystem guidelines?

sure. will remove the string "mfd" as per guidelines.

>>
>> The MFD guidelines state not to hard-code implementation details in driver,
>> struct, or device names, and to specifically avoid including the string
>> "mfd" or the driver's own filename in names.
>>
>> [Severity: Medium]
>> Since there is no .remove callback provided in psci_mfd_driver, does this
>> allow manual sysfs unbinding that could leak resources?
>>
>> If a user unbinds the driver via sysfs, devres will destroy the child
>> devices. Because the child driver (psci-cpuidle-domain) lacks proper
>> cleanup for non-devm resources like generic PM domains, those resources
>> might leak or leave dangling pointers on this administrative path.
>>
>> Should .suppress_bind_attrs = true be set in the driver struct to prevent
>> unsupported sysfs unbinding?

Ack. will set .suppress_bind_attrs = true. for psci-mfd and 
cpuidle-psci-domain.

thanks,
Shivendra
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.