From: sashiko-bot@kernel.org
To: "Oleksij Rempel" <o.rempel@pengutronix.de>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org,
linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v15 2/6] platform: misc: add NXP MC33978/MC34978 core driver
Date: Fri, 10 Jul 2026 10:24:09 +0000 [thread overview]
Message-ID: <20260710102409.DD25A1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260710101358.2606941-3-o.rempel@pengutronix.de>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Redundant initialization of `irq_lock` mutex.
--
--- Patch [2]: [PATCH v15 2/6] platform: misc: add NXP MC33978/MC34978 core driver ---
commit 7429a33c25a8a05d13819baad0143ee08fe7eb8c
Author: Oleksij Rempel <o.rempel@pengutronix.de>
platform: misc: add NXP MC33978/MC34978 core driver
This commit adds the core support module for the NXP MC33978 and MC34978
Multiple Switch Detection Interfaces. It handles SPI communications via a
custom regmap bus, interrupt demultiplexing, and event processing.
> --- /dev/null
> +++ b/drivers/platform/misc/mc33978-core.c
[ ... ]
> @@ -759,6 +759,8 @@ static int mc33978_irq_init(struct mc33978_core_data *cdata,
> struct fwnode_handle *fwnode)
> {
> struct device *dev = &cdata->spi->dev;
> int ret;
>
> mutex_init(&cdata->irq_lock);
>
> /*
[ ... ]
> @@ -1146,6 +1146,8 @@ int mc33978_core_init(struct device *dev, struct spi_device *spi,
> cdata->spi = spi;
>
> mutex_init(&cdata->event_lock);
> mutex_init(&cdata->irq_lock);
[Severity: Low]
This isn't a bug, but is it intentional to initialize irq_lock twice?
It is initialized here in mc33978_core_init() and also inside
mc33978_irq_init() which is called a few lines later. Doing so creates
two different static lockdep keys for the same lock.
> spin_lock_init(&cdata->state_lock);
> raw_spin_lock_init(&cdata->irq_state_lock);
>
> INIT_WORK(&cdata->event_work, mc33978_event_work);
>
> mc33978_prepare_messages(cdata);
>
> ret = mc33978_irq_init(cdata, fwnode);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260710101358.2606941-1-o.rempel@pengutronix.de?part=2
next prev parent reply other threads:[~2026-07-10 10:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 10:13 [PATCH v15 0/6] mfd: Add support for NXP MC33978/MC34978 MSDI Oleksij Rempel
2026-07-10 10:13 ` [PATCH v15 1/6] dt-bindings: pinctrl: add " Oleksij Rempel
2026-07-10 10:19 ` sashiko-bot
2026-07-10 10:13 ` [PATCH v15 2/6] platform: misc: add NXP MC33978/MC34978 core driver Oleksij Rempel
2026-07-10 10:24 ` sashiko-bot [this message]
2026-07-10 10:13 ` [PATCH v15 3/6] mfd: mc33978: Add NXP MC33978/MC34978 MSDI support Oleksij Rempel
2026-07-10 10:25 ` sashiko-bot
2026-07-10 10:13 ` [PATCH v15 4/6] pinctrl: add NXP MC33978/MC34978 pinctrl driver Oleksij Rempel
2026-07-10 10:27 ` sashiko-bot
2026-07-10 15:22 ` Alvin Šipraga
2026-07-11 5:21 ` Oleksij Rempel
2026-07-10 10:13 ` [PATCH v15 5/6] hwmon: add NXP MC33978/MC34978 driver Oleksij Rempel
2026-07-10 10:23 ` sashiko-bot
2026-07-12 22:20 ` Uwe Kleine-König
2026-07-10 10:13 ` [PATCH v15 6/6] mux: add NXP MC33978/MC34978 AMUX driver Oleksij Rempel
2026-07-10 10:25 ` sashiko-bot
2026-07-10 12:53 ` Alvin Šipraga
2026-07-12 22:18 ` Uwe Kleine-König
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=20260710102409.DD25A1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--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