Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Geert Uytterhoeven" <geert+renesas@glider.be>
Cc: conor+dt@kernel.org, wsa+renesas@sang-engineering.com,
	devicetree@vger.kernel.org, robh@kernel.org,
	linux-clk@vger.kernel.org
Subject: Re: [PATCH v3 07/12] reset: Add reset_control_get_from_provider_exclusive()
Date: Wed, 02 Sep 2026 11:38:52 +0000	[thread overview]
Message-ID: <20260902113852.E75981F000E9@smtp.kernel.org> (raw)
In-Reply-To: <619a6e41495adfdae3e2e6c0fee97e0550a5c404.1788338320.git.geert+renesas@glider.be>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The dummy stub for `reset_control_get_from_provider_exclusive()` incorrectly returns `NULL` instead of `ERR_PTR(-ENOTSUPP)` when `CONFIG_RESET_CONTROLLER` is disabled.
--

commit b2e455f4dc1ad499526bd8cbd50a8edaddca9cff
Author: Geert Uytterhoeven <geert+renesas@glider.be>

reset: Add reset_control_get_from_provider_exclusive()

This commit adds a public helper reset_control_get_from_provider_exclusive()
to lookup and obtain an exclusive reference to a reset controller. The
implementation is based on the recently introduced
__reset_control_get_from_provider() helper.

> diff --git a/include/linux/reset.h b/include/linux/reset.h
> index 9c391cf0c8229..09ee47b27f88d 100644
> --- a/include/linux/reset.h
> +++ b/include/linux/reset.h
[ ... ]
> @@ -173,6 +175,12 @@ static inline struct reset_control *__reset_control_get(
>  	return optional ? NULL : ERR_PTR(-ENOTSUPP);
>  }
>  
> +static inline struct reset_control *reset_control_get_from_provider_exclusive(
> +				const struct fwnode_reference_args *args)
> +{
> +	return NULL;
> +}
> +

[Severity: Medium]
When CONFIG_RESET_CONTROLLER is disabled, should this stub return
ERR_PTR(-ENOTSUPP) instead of NULL?

In the reset framework, a NULL reset control is treated as a valid but
optional no-op. If a driver calls reset_control_get_from_provider_exclusive()
during probing on a kernel compiled without the reset framework, and the stub
returns NULL, IS_ERR() will evaluate to false. 

This would mislead the caller into believing it successfully acquired the
mandatory exclusive reset control. The driver would skip error handling and
proceed without actually performing the required hardware resets, potentially
causing hardware malfunctions.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1788338320.git.geert+renesas@glider.be?part=7

  reply	other threads:[~2026-09-02 11:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02 11:29 [PATCH v3 00/12] R-Car X5H Ironhide CPG/MDLC SCMI remapping support Geert Uytterhoeven
2026-09-02 11:29 ` [PATCH v3 01/12] dt-bindings: clock: renesas,r8a78000-cpg: Add renesas,scmi-firmware property Geert Uytterhoeven
2026-09-02 11:29 ` [PATCH v3 02/12] dt-bindings: power: renesas,r8a78000-mdlc: Add firmware property Geert Uytterhoeven
2026-09-02 11:29 ` [PATCH v3 03/12] firmware: arm_scmi: Add scmi_get_base_info() Geert Uytterhoeven
2026-09-02 11:29 ` [PATCH v3 04/12] of: property: fw_devlink: Add support for renesas,scmi-firmware Geert Uytterhoeven
2026-09-02 11:29 ` [PATCH v3 05/12] pmdomain: Make genpd_get_from_provider() public Geert Uytterhoeven
2026-09-02 11:40   ` sashiko-bot
2026-09-02 11:29 ` [PATCH v3 06/12] reset: Extract __reset_control_get_from_provider() Geert Uytterhoeven
2026-09-03  8:55   ` Philipp Zabel
2026-09-02 11:29 ` [PATCH v3 07/12] reset: Add reset_control_get_from_provider_exclusive() Geert Uytterhoeven
2026-09-02 11:38   ` sashiko-bot [this message]
2026-09-02 11:44   ` Geert Uytterhoeven
2026-09-03 10:03   ` Philipp Zabel
2026-09-02 11:29 ` [PATCH v3 08/12] clk: renesas: r8a78000: Add clk_hw to clk_map Geert Uytterhoeven
2026-09-02 11:29 ` [PATCH v3 09/12] clk: renesas: r8a78000: Add SCMI remapping support Geert Uytterhoeven
2026-09-02 11:41   ` sashiko-bot
2026-09-02 11:29 ` [PATCH v3 10/12] pmdomain: " Geert Uytterhoeven
2026-09-02 11:47   ` sashiko-bot
2026-09-02 11:29 ` [PATCH v3 11/12] arm64: dts: renesas: ironhide: Enable SCMI devpd, sys, clock, and reset Geert Uytterhoeven
2026-09-02 11:29 ` [PATCH v3 12/12] arm64: dts: renesas: ironhide: Add CPG/MDLC renesas,scmi-firmware properties Geert Uytterhoeven
2026-09-02 11:40   ` 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=20260902113852.E75981F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=linux-clk@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=wsa+renesas@sang-engineering.com \
    /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