From: sashiko-bot@kernel.org
To: "James Hilliard" <james.hilliard1@gmail.com>
Cc: conor+dt@kernel.org, mfd@lists.linux.dev,
linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org,
lee@kernel.org, robh@kernel.org
Subject: Re: [PATCH v10 2/2] mfd: ac200: Add X-Powers AC200 support
Date: Sun, 06 Sep 2026 22:38:08 +0000 [thread overview]
Message-ID: <20260906223808.C13251F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260906-submit-ac200-mfd-v10-2-f522e8dc2bd4@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Creating a local stack copy of the mfd_cell array for dynamic amendments violates MFD subsystem guidelines.
--
commit 89b84971b8215b5790b042d0288d352785ec348e
Author: James Hilliard <james.hilliard1@gmail.com>
mfd: ac200: Add X-Powers AC200 support
This patch adds support for the X-Powers AC200 mixed-signal companion IC. It
provides shared regmap access, an IRQ controller for the INTB output, and
instantiates the individual function devices like the audio codec and TV
encoder.
> diff --git a/drivers/mfd/ac200.c b/drivers/mfd/ac200.c
> new file mode 100644
> index 0000000000000..30828e113c11b
> --- /dev/null
> +++ b/drivers/mfd/ac200.c
[ ... ]
> +static int ac200_add_devices(struct device *dev)
> +{
> + struct mfd_cell cells[ARRAY_SIZE(ac200_cells)];
> + unsigned int num_cells = 0;
> + unsigned int i;
> + int ret;
> +
> + for (i = 0; i < ARRAY_SIZE(ac200_cells); i++) {
> + const struct mfd_cell *cell = &ac200_cells[i];
> + struct device_node *child;
> +
> + child = of_get_compatible_child(dev->of_node,
> + cell->of_compatible);
> + if (!child)
> + continue;
> + if (of_device_is_available(child))
> + cells[num_cells++] = *cell;
> + of_node_put(child);
> + }
> +
> + if (!num_cells)
> + return 0;
> +
> + ret = devm_mfd_add_devices(dev, PLATFORM_DEVID_AUTO, cells, num_cells,
> + NULL, 0, NULL);
[Severity: Medium]
Does this pass a dynamically amended local stack copy of the mfd_cell array
to the MFD core?
The MFD subsystem guidelines advise against creating local copies of mfd_cell
arrays for dynamic amendments, as standard practice requires static const
references for these arrays.
Could this be updated so the static array is passed directly, leaving the
node availability checks to either the MFD core or the individual child
drivers during their own probe sequences?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260906-submit-ac200-mfd-v10-0-f522e8dc2bd4@gmail.com?part=2
prev parent reply other threads:[~2026-09-06 22:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-06 22:30 [PATCH v10 0/2] mfd: add X-Powers AC200 support James Hilliard
2026-09-06 22:30 ` [PATCH v10 1/2] dt-bindings: mfd: x-powers: Add AC200 James Hilliard
2026-09-06 22:36 ` sashiko-bot
2026-09-07 17:19 ` Conor Dooley
2026-09-07 17:34 ` James Hilliard
2026-09-07 17:56 ` Conor Dooley
2026-09-06 22:30 ` [PATCH v10 2/2] mfd: ac200: Add X-Powers AC200 support James Hilliard
2026-09-06 22:38 ` sashiko-bot [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=20260906223808.C13251F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=james.hilliard1@gmail.com \
--cc=lee@kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=mfd@lists.linux.dev \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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