Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Paul Elder" <paul.elder+renesas@ideasonboard.com>
Cc: linux-clk@vger.kernel.org, media-ci@linuxtv.org, robh@kernel.org,
	wsa+renesas@sang-engineering.com, conor+dt@kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 07/10] media: rcar-fcp: Handle resets
Date: Thu, 17 Sep 2026 12:13:47 +0000	[thread overview]
Message-ID: <20260917121348.3C60E1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260917-epaul-v7-3-rc1-x5h-vsp-fcp-v1-7-4c72d4e086dd@ideasonboard.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] media: rcar-fcp: ignored reset_control_deassert() return value in runtime PM
--

commit 35565c06b039b0484d84fa1dae3bc646e765ec43
Author: Paul Elder <paul.elder+renesas@ideasonboard.com>

media: rcar-fcp: Handle resets

On some versions of the FCP, such as the one on the X5H, reset control
is required to operate the FCP. Add support for handling resets
optionally, to continue supporting versions that do not require it.

> diff --git a/drivers/media/platform/renesas/rcar-fcp.c b/drivers/media/platform/renesas/rcar-fcp.c
> index d99b3ff976e80..15bcbbda3b853 100644
> --- a/drivers/media/platform/renesas/rcar-fcp.c
> +++ b/drivers/media/platform/renesas/rcar-fcp.c
[ ... ]
> @@ -305,11 +314,32 @@ static void rcar_fcp_remove(struct platform_device *pdev)
>  	pm_runtime_disable(&pdev->dev);
>  }
>  
> +static int fcp_pm_runtime_suspend(struct device *dev)
> +{
> +	struct rcar_fcp_device *fcp = dev_get_drvdata(dev);
> +
> +	reset_control_assert(fcp->rstc);
> +	return 0;
> +}

[Severity: Medium]
Is it safe to ignore the return value of reset_control_assert() in
fcp_pm_runtime_suspend()?

If the reset assertion fails, the error will be masked during suspend since
0 is always returned to the PM core.

> +
> +static int fcp_pm_runtime_resume(struct device *dev)
> +{
> +	struct rcar_fcp_device *fcp = dev_get_drvdata(dev);
> +
> +	reset_control_deassert(fcp->rstc);
> +	return 0;
> +}

[Severity: Medium]
Should the return value of reset_control_deassert() be checked and propagated
in fcp_pm_runtime_resume()?

If the deassertion fails during resume, the PM core and the driver will
wrongly assume the hardware is fully resumed. Subsequent register accesses
could target a device still in reset, which typically leads to invalid
data reads (0xffffffff) or bus faults.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260917-epaul-v7-3-rc1-x5h-vsp-fcp-v1-0-4c72d4e086dd@ideasonboard.com?part=7

  reply	other threads:[~2026-09-17 12:13 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 12:04 [PATCH 00/10] media: rcar-fcp, vsp1: Enable on R-Car X5H Paul Elder
2026-09-17 12:04 ` [PATCH 01/10] dt-bindings: clock: renesas,r8a78000-cpg: Add CPG_SGD4_VIO_DP_{TX,OTHER} Paul Elder
2026-09-17 12:09   ` sashiko-bot
2026-09-18  1:03   ` Laurent Pinchart
2026-09-18 11:38   ` Krzysztof Kozlowski
2026-09-17 12:04 ` [PATCH 02/10] clk: renesas: r8a78000: Add clock for FCPV and VSP for SCP FW SDKv4.36 Paul Elder
2026-09-17 12:20   ` sashiko-bot
2026-09-18  1:11   ` Laurent Pinchart
2026-09-18  7:35     ` Geert Uytterhoeven
2026-09-17 12:04 ` [PATCH 03/10] pmdomain: renesas: r8a78000: Add maps for VIO " Paul Elder
2026-09-18  1:15   ` Laurent Pinchart
2026-09-17 12:04 ` [PATCH 04/10] arm64: renesas: r8a78000: Add FCPV[BI] nodes Paul Elder
2026-09-18  1:18   ` Laurent Pinchart
2026-09-17 12:04 ` [PATCH 05/10] arm64: renesas: r8a78000: Add VSP[BI] nodes Paul Elder
2026-09-18  1:21   ` Laurent Pinchart
2026-09-17 12:04 ` [PATCH 06/10] media: rcar-fcp: Check device revision at probe time Paul Elder
2026-09-17 12:12   ` sashiko-bot
2026-09-18  1:23   ` Laurent Pinchart
2026-09-17 12:04 ` [PATCH 07/10] media: rcar-fcp: Handle resets Paul Elder
2026-09-17 12:13   ` sashiko-bot [this message]
2026-09-18  1:28   ` Laurent Pinchart
2026-09-18 11:03   ` Biju Das
2026-09-18 11:11     ` Laurent Pinchart
2026-09-18 11:47       ` Biju Das
2026-09-17 12:04 ` [PATCH 08/10] media: vsp1: Support full VSPB on R-Car M3-W, M3-N and E3 Paul Elder
2026-09-18  1:32   ` Laurent Pinchart
2026-09-17 12:04 ` [PATCH 09/10] media: vsp1: Document X5H SoC ID Paul Elder
2026-09-18  1:32   ` Laurent Pinchart
2026-09-17 12:04 ` [PATCH 10/10] media: rcar-fcp: Add R-Car X5H support Paul Elder
2026-09-18  1:35   ` Laurent Pinchart
2026-09-17 12:17 ` [PATCH 00/10] media: rcar-fcp, vsp1: Enable on R-Car X5H Laurent Pinchart
2026-09-18  1:50 ` Laurent Pinchart

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=20260917121348.3C60E1F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=media-ci@linuxtv.org \
    --cc=paul.elder+renesas@ideasonboard.com \
    --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