From: sashiko-bot@kernel.org
To: "Jisheng Zhang" <jszhang@kernel.org>
Cc: devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
linux-gpio@vger.kernel.org, mfd@lists.linux.dev, robh@kernel.org,
conor+dt@kernel.org, lee@kernel.org
Subject: Re: [PATCH v4 07/13] reset: add Synaptics SL2610 reset controller support
Date: Fri, 04 Dec 2026 16:24:10 +0000 [thread overview]
Message-ID: <sashiko-outbox-250182@kernel.org> (raw)
In-Reply-To: <20261204140732.31223-8-jszhang@kernel.org>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] reset: sl2610_reset_reset() uses regmap_set_bits() RMW on
pulse reset bits
- [Medium] reset: sl2610_reset_probe() dereferences NULL
platform_get_device_id()
--
commit ce7199e60b6a12fd2ab39a73fe98cf4ce93b1945
Author: Jisheng Zhang <jszhang@kernel.org>
reset: add Synaptics SL2610 reset controller support
This commit adds a reset controller driver for the Synaptics SL2610 SoC and
MCU system controllers, handling both pulse and sticky reset lines via the
parent syscon regmap.
> diff --git a/drivers/reset/reset-sl2610.c b/drivers/reset/reset-sl2610.c
> new file mode 100644
> index 0000000000000..dc55a05d29d89
> --- /dev/null
> +++ b/drivers/reset/reset-sl2610.c
> @@ -0,0 +1,224 @@
[ ... ]
> +static int sl2610_reset_reset(struct reset_controller_dev *rcdev,
> + unsigned long id)
> +{
> + struct sl2610_reset_priv *priv = to_sl2610_reset_priv(rcdev);
> + const struct sl2610_reset_cfg *cfg = &priv->cfgs[id];
> +
> + if (cfg->sticky)
> + return -ENOTSUPP;
> +
> + return regmap_set_bits(priv->regmap, cfg->reg, cfg->bit);
> +}
[Severity: Medium]
Can regmap_set_bits() skip the pulse reset or reset sibling peripherals here?
regmap_set_bits() calls regmap_update_bits_base() with force = false, so
_regmap_update_bits() skips the write when cfg->bit already reads as 1 and
returns 0 without pulsing the reset.
It also writes back orig | cfg->bit, which re-triggers any sibling peripheral
bit in SL2610_GBL_PERIFRESET or SL2610_GBL_APBPERIFRESET that currently reads
as 1. Using regmap_write() with cfg->bit (as in berlin_reset_reset()), or
regmap_write_bits() if other bits must be preserved, avoids both issues.
[ ... ]
> +static int sl2610_reset_probe(struct platform_device *pdev)
> +{
> + struct device_node *parent_np = pdev->dev.parent->of_node;
> + struct sl2610_reset_priv *priv;
> + const struct sl2610_reset_data *data =
> + (void *)platform_get_device_id(pdev)->driver_data;
[Severity: Medium]
Could platform_get_device_id(pdev) return NULL here?
When a platform device is bound via sysfs driver_override, platform_match()
returns early via device_match_driver_override() without calling
platform_match_id(), leaving pdev->id_entry NULL and causing a NULL pointer
dereference. Check platform_get_device_id(pdev) for NULL and return -ENODEV.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204140732.31223-1-jszhang@kernel.org?part=7
next prev parent reply other threads:[~2026-12-04 16:24 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 14:07 [PATCH v4 00/13] arm64: add Synaptics SL2610 SoCs and RDK boards Jisheng Zhang
2026-12-04 14:07 ` [PATCH v4 01/13] arm64: kconfig: let ARCH_BERLIN cover Synaptics arm64 SoCs Jisheng Zhang
2026-12-04 14:07 ` [PATCH v4 02/13] pinctrl: berlin: use u16 instead of u8 for the offset Jisheng Zhang
2026-12-04 14:07 ` [PATCH v4 03/13] pinctrl: berlin: enable module build support Jisheng Zhang
2026-12-04 15:03 ` sashiko-bot
2026-12-04 14:07 ` [PATCH v4 04/13] pinctrl: berlin: add optional pinconf support Jisheng Zhang
2026-12-04 15:22 ` sashiko-bot
2026-12-04 14:07 ` [PATCH v4 05/13] dt-bindings: soc: synaptics: add SL2610 system controllers Jisheng Zhang
2026-12-04 15:41 ` sashiko-bot
2026-12-04 14:07 ` [PATCH v4 06/13] mfd: synaptics: add SL2610 system controller support Jisheng Zhang
2026-12-04 15:58 ` sashiko-bot
2026-12-04 14:07 ` [PATCH v4 07/13] reset: add Synaptics SL2610 reset " Jisheng Zhang
2026-12-04 16:24 ` sashiko-bot [this message]
2026-12-04 14:07 ` [PATCH v4 08/13] pinctrl: berlin: add Synaptics SL2610 pin " Jisheng Zhang
2026-12-04 16:51 ` sashiko-bot
2026-12-04 14:07 ` [PATCH v4 09/13] clk: berlin: add Synaptics clock controller helpers Jisheng Zhang
2026-12-04 17:13 ` sashiko-bot
2026-12-04 14:07 ` [PATCH v4 10/13] clk: berlin: add Synaptics SL2610 clocks and PLLs Jisheng Zhang
2026-12-04 17:39 ` sashiko-bot
2026-12-04 14:07 ` [PATCH v4 11/13] dt-bindings: arm: berlin: add Synaptics SL2610 SoCs and RDK boards Jisheng Zhang
2026-12-04 14:07 ` [PATCH v4 12/13] arm64: dts: synaptics: add SL2610 family SoCs Jisheng Zhang
2026-12-04 18:05 ` sashiko-bot
2026-12-04 14:07 ` [PATCH v4 13/13] arm64: dts: synaptics: add SL2610 family RDK boards Jisheng Zhang
2026-12-04 18:19 ` 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=sashiko-outbox-250182@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jszhang@kernel.org \
--cc=lee@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-gpio@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.