From: sashiko-bot@kernel.org
To: "Svyatoslav Ryhel" <clamor95@gmail.com>
Cc: linux-leds@vger.kernel.org, lee@kernel.org, conor+dt@kernel.org,
devicetree@vger.kernel.org, robh@kernel.org,
dmitry.torokhov@gmail.com, linux-input@vger.kernel.org
Subject: Re: [PATCH v7 5/6] mfd: motorola-cpcap: diverge configuration per-board
Date: Tue, 21 Jul 2026 10:23:02 +0000 [thread overview]
Message-ID: <20260721102303.50AB81F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260721095654.429346-6-clamor95@gmail.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] Removal of the 'st,6556002' compatible string breaks device tree backward compatibility.
- [Medium] Casting const void * to enum triggers a -Wpointer-to-int-cast warning on 64-bit architectures.
- [Low] The commit message description violates MFD subsystem capitalization rules.
--
--- Patch [5]: [PATCH v7 5/6] mfd: motorola-cpcap: diverge configuration per-board ---
commit f5cc3529b5d7a3c2c11043bd5543be65ebce6656
Author: Svyatoslav Ryhel <clamor95@gmail.com>
mfd: motorola-cpcap: diverge configuration per-board
This commit modifies the CPCAP driver to support board-specific subdevice
configurations. It splits the MFD cells into common, default, and
mapphone-specific arrays. It also removes the legacy st,6556002 compatible
string.
> mfd: motorola-cpcap: diverge configuration per-board
[Severity: Low]
This isn't a bug, but the MFD subsystem guidelines request that the
description after the subsystem prefix be capitalized. Should "diverge" be
"Diverge"?
> diff --git a/drivers/mfd/motorola-cpcap.c b/drivers/mfd/motorola-cpcap.c
> --- a/drivers/mfd/motorola-cpcap.c
> +++ b/drivers/mfd/motorola-cpcap.c
> @@ -194,20 +196,6 @@ static int cpcap_init_irq(struct cpcap_ddata *cpcap)
> return 0;
> }
>
> -static const struct of_device_id cpcap_of_match[] = {
> - { .compatible = "motorola,cpcap", },
> - { .compatible = "st,6556002", },
> - {},
> -};
[Severity: High]
Does removing the "st,6556002" compatible string break backwards
compatibility for systems booting with older device tree blobs?
Device tree bindings are generally considered a stable ABI, so newer kernels
are expected to still probe devices using older DTBs.
[ ... ]
> static int cpcap_probe(struct spi_device *spi)
> {
> struct cpcap_ddata *cpcap;
> + const struct mfd_cell *cells;
> + unsigned int num_cells;
> int ret;
>
> cpcap = devm_kzalloc(&spi->dev, sizeof(*cpcap), GFP_KERNEL);
> if (!cpcap)
> return -ENOMEM;
>
> + cpcap->variant = (enum cpcap_variant)spi_get_device_match_data(spi);
[Severity: Medium]
Can this direct cast from a pointer to an enum cause a -Wpointer-to-int-cast
build warning on 64-bit architectures?
spi_get_device_match_data() returns a const void *, which is 64-bit on
platforms like arm64. Casting it directly to a 32-bit enum might drop
the upper 32 bits. Should this be cast to a uintptr_t first?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260721095654.429346-1-clamor95@gmail.com?part=5
next prev parent reply other threads:[~2026-07-21 10:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 9:56 [PATCH v7 0/6] mfd: cpcap: convert documentation to schema and add Mot board support Svyatoslav Ryhel
2026-07-21 9:56 ` [PATCH v7 1/6] dt-bindings: leds: leds-cpcap: convert to DT schema Svyatoslav Ryhel
2026-07-21 10:06 ` sashiko-bot
2026-07-21 12:01 ` Rob Herring (Arm)
2026-07-21 9:56 ` [PATCH v7 2/6] dt-bindings: input: cpcap-pwrbutton: " Svyatoslav Ryhel
2026-07-21 10:08 ` sashiko-bot
2026-07-21 9:56 ` [PATCH v7 3/6] dt-bindings: mfd: motorola-cpcap: " Svyatoslav Ryhel
2026-07-21 10:15 ` sashiko-bot
2026-07-21 9:56 ` [PATCH v7 4/6] dt-bindings: mfd: motorola-cpcap: document Mapphone and Mot CPCAP Svyatoslav Ryhel
2026-07-21 10:16 ` sashiko-bot
2026-07-21 9:56 ` [PATCH v7 5/6] mfd: motorola-cpcap: diverge configuration per-board Svyatoslav Ryhel
2026-07-21 10:23 ` sashiko-bot [this message]
2026-07-21 9:56 ` [PATCH v7 6/6] mfd: motorola-cpcap: add support for Mot CPCAP composition Svyatoslav Ryhel
2026-07-21 10:20 ` 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=20260721102303.50AB81F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=clamor95@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=lee@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--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