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

Lee Jones <[email protected]>
Newsgroups dev.linux.lists.mfd,dev.linux.lists.sashiko-reviews,org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
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.

> --
> 
> --- 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?
> 
> 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?
> 
> > +		.of_match_table = psci_mfd_of_match,
> > +	},
> > +};
> 
> -- 
> Sashiko AI review · https://sashiko.dev/#/patchset/20260803-arm-psci-system_reset2-vendor-reboots-v24-0-889281373870@oss.qualcomm.com?part=4

-- 
Lee Jones
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.