Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jerome Brunet" <jbrunet@baylibre.com>
Cc: conor+dt@kernel.org, robh@kernel.org, mfd@lists.linux.dev,
	devicetree@vger.kernel.org, lee@kernel.org
Subject: Re: [PATCH RESEND v6 1/5] mfd: axp20x: Constify axp313 and axp717 cells
Date: Wed, 12 Aug 2026 21:37:11 +0000	[thread overview]
Message-ID: <20260812213712.1A8671F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260812-axp318-regulator-v6-1-d6b84b55c000@baylibre.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [Medium] Hard-coded cell IDs are used in `axp806_cells` and `axp809_cells` instead of leveraging `platform_device->id` or `PLATFORM_DEVID_AUTO`, violating MFD subsystem guidelines.
--

--- Patch [1]: [PATCH RESEND v6 1/5] mfd: axp20x: Constify axp313 and axp717 cells ---
commit d0271b0bfb6609a5dbfc9c713361a49994e56202
Author: Jerome Brunet <jbrunet@baylibre.com>

mfd: axp20x: Constify axp313 and axp717 cells

This commit constifies the mfd_cells arrays for the axp313 and axp717 chips.
It aligns their declarations with the rest of the supported chips where
the arrays are properly marked as const.

> diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
> index 679364189ea58..22baab6e10fa6 100644
> --- a/drivers/mfd/axp20x.c
> +++ b/drivers/mfd/axp20x.c

[ ... ]

> static const struct mfd_cell axp806_cells[] = {
> 	{
> 		.id		= 2,
> 		.name		= "axp20x-regulator",
> 	},
> };
> 
> static const struct mfd_cell axp809_cells[] = {
> 	{
> 		.name		= "axp20x-gpio",
> 		.of_compatible	= "x-powers,axp221-gpio",
> 	}, {
> 		.name		= "axp221-pek",
> 		.num_resources	= ARRAY_SIZE(axp809_pek_resources),
> 		.resources	= axp809_pek_resources,
> 	}, {
> 		.id		= 1,
> 		.name		= "axp20x-regulator",
> 	},
> };

[Severity: Medium]
This is a pre-existing issue, but is it safe to use hard-coded cell IDs
like 1 and 2 for the axp20x-regulator cells in the axp806_cells and
axp809_cells arrays?

The MFD subsystem guidelines require using PLATFORM_DEVID_AUTO for automatic
cell indexing, or platform_device->id if numbering is explicitly needed.

Can this hard-coded cell ID usage lead to device naming collisions in sysfs
or driver load failures?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260812-axp318-regulator-v6-0-d6b84b55c000@baylibre.com?part=1

  reply	other threads:[~2026-08-12 21:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12 21:30 [PATCH RESEND v6 0/5] regulator: Add X-Powers AXP318W PMIC support Jerome Brunet
2026-08-12 21:30 ` [PATCH RESEND v6 1/5] mfd: axp20x: Constify axp313 and axp717 cells Jerome Brunet
2026-08-12 21:37   ` sashiko-bot [this message]
2026-08-12 21:30 ` [PATCH RESEND v6 2/5] mfd: axp20x-i2c: Fix i2c instantiation Jerome Brunet
2026-08-12 21:41   ` sashiko-bot
2026-08-12 21:30 ` [PATCH RESEND v6 3/5] dt-bindings: mfd: x-powers,axp152: Document AXP318W Jerome Brunet
2026-08-12 21:37   ` sashiko-bot
2026-08-12 21:30 ` [PATCH RESEND v6 4/5] mfd: axp20x: Add support for AXP318W PMIC Jerome Brunet
2026-08-12 21:40   ` sashiko-bot
2026-08-12 21:30 ` [PATCH RESEND v6 5/5] regulator: axp20x: add support for the AXP318W Jerome Brunet
2026-08-12 21:37   ` sashiko-bot

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=20260812213712.1A8671F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=lee@kernel.org \
    --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