From: sashiko-bot@kernel.org
To: "Paul Elder" <paul.elder+renesas@ideasonboard.com>
Cc: linux-clk@vger.kernel.org, conor+dt@kernel.org,
devicetree@vger.kernel.org, robh@kernel.org,
wsa+renesas@sang-engineering.com, media-ci@linuxtv.org
Subject: Re: [PATCH 06/10] media: rcar-fcp: Check device revision at probe time
Date: Thu, 17 Sep 2026 12:12:30 +0000 [thread overview]
Message-ID: <20260917121231.732DC1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260917-epaul-v7-3-rc1-x5h-vsp-fcp-v1-6-4c72d4e086dd@ideasonboard.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] pm: async pm_runtime_put cancelled by pm_runtime_disable
- [Low] macro RCAR_FCP_REG_PICINFO1_STRIDE_DIV16 uses unbound identifier 'n'
--
commit 0a2b449894e5bebc78fab36701f40043d23860e2
Author: Paul Elder <paul.elder+renesas@ideasonboard.com>
media: rcar-fcp: Check device revision at probe time
This commit verifies that the device revision register reports a valid value
during initialization. It adds type information and rejects devices with an
unsupported version.
> diff --git a/drivers/media/platform/renesas/rcar-fcp.c b/drivers/media/platform/renesas/rcar-fcp.c
> index dfb0ca93e854d..d99b3ff976e80 100644
> --- a/drivers/media/platform/renesas/rcar-fcp.c
> +++ b/drivers/media/platform/renesas/rcar-fcp.c
> @@ -14,26 +14,75 @@
[ ... ]
> +#define RCAR_FCP_REG_TL_CTRL 0x0070
> +#define RCAR_FCP_REG_TL_CTRL_TLEN BIT(31)
> +#define RCAR_FCP_REG_TL_CTRL_VPOS_C(n) ((n) << 16)
> +#define RCAR_FCP_REG_TL_CTRL_VPOS_Y(n) ((n) << 0)
> +
> +#define RCAR_FCP_REG_PICINFO1 0x00c4
> +#define RCAR_FCP_REG_PICINFO1_STRIDE_DIV16 ((n) << 0)
[Severity: Low]
Is this macro missing its parameter list? It references the unbound identifier
n in its expansion but doesn't define it as an argument, unlike the
RCAR_FCP_REG_TL_CTRL_VPOS_C(n) macro above.
Any code attempting to use this macro might fail to compile or silently
capture a local variable named n.
[ ... ]
> @@ -169,6 +269,15 @@ static int rcar_fcp_probe(struct platform_device *pdev)
[ ... ]
> return 0;
> +
> +error_pm_put:
> + pm_runtime_put(&pdev->dev);
> +error_pm_disable:
> + pm_runtime_disable(&pdev->dev);
> + return ret;
> }
[Severity: Medium]
Can this error path leave the hardware powered on indefinitely?
When rcar_fcp_setup() returns an error, the error_pm_put path calls the
asynchronous pm_runtime_put(), which queues idle/suspend work. However, the
immediate call to pm_runtime_disable() will cancel that pending work.
Because the suspension is cancelled, the device hardware remains active with
its usage count decremented, causing a power resource leak. Should this use
pm_runtime_put_sync() instead to ensure the device is properly suspended
before runtime PM is disabled?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260917-epaul-v7-3-rc1-x5h-vsp-fcp-v1-0-4c72d4e086dd@ideasonboard.com?part=6
next prev parent reply other threads:[~2026-09-17 12:12 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 [this message]
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
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=20260917121231.732DC1F000FF@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