From: sashiko-bot@kernel.org
To: "Paul Elder" <paul.elder+renesas@ideasonboard.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org,
media-ci@linuxtv.org, robh@kernel.org, linux-clk@vger.kernel.org,
wsa+renesas@sang-engineering.com
Subject: Re: [PATCH DNI v2 11/11] media: rcar-fcp: Check device revision at probe time
Date: Fri, 18 Sep 2026 17:15:14 +0000 [thread overview]
Message-ID: <20260918171514.81CC41F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260919-epaul-v7-3-rc1-x5h-vsp-fcp-v2-11-dbe9236bfd22@ideasonboard.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] pm: resource leak on probe error due to async pm_runtime_put()
- [Low] macro: malformed macro RCAR_FCP_REG_PICINFO1_STRIDE_DIV16 missing parameter list
- [Low] type: compiler warning from direct pointer-to-enum cast on 64-bit architectures
--
commit 4a6c9e446d9f471665024b004ad3e5842c693332
Author: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
media: rcar-fcp: Check device revision at probe time
Verify that the device revision register reports a valid value,
otherwise reject the device.
> diff --git a/drivers/media/platform/renesas/rcar-fcp.c b/drivers/media/platform/renesas/rcar-fcp.c
> index 76d4c250b3081..5f2c483f71f42 100644
> --- a/drivers/media/platform/renesas/rcar-fcp.c
> +++ b/drivers/media/platform/renesas/rcar-fcp.c
[ ... ]
> +#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 a parameter list? It looks like the missing (n) after
the macro name will prevent it from taking arguments, treating ((n) << 0)
as the literal expansion.
[ ... ]
> static int rcar_fcp_probe(struct platform_device *pdev)
> {
> struct rcar_fcp_device *fcp;
> + int ret;
>
> fcp = devm_kzalloc(&pdev->dev, sizeof(*fcp), GFP_KERNEL);
> if (fcp == NULL)
> return -ENOMEM;
>
> fcp->dev = &pdev->dev;
> + fcp->type = (enum rcar_fcp_type)device_get_match_data(&pdev->dev);
[Severity: Low]
Can this direct pointer-to-enum cast cause a compiler warning on 64-bit
architectures?
To avoid precision loss warnings on 64-bit platforms like ARM64, should the
pointer be cast to an integer of the same size, such as unsigned long or
uintptr_t, before being cast to the enum type?
> platform_set_drvdata(pdev, fcp);
[ ... ]
> pm_runtime_enable(&pdev->dev);
> + ret = pm_runtime_resume_and_get(&pdev->dev);
> + if (ret < 0)
> + goto error_pm_disable;
> +
> + ret = rcar_fcp_setup(fcp);
> + if (ret < 0)
> + goto error_pm_put;
> +
> + pm_runtime_put(&pdev->dev);
>
> mutex_lock(&fcp_lock);
> list_add_tail(&fcp->list, &fcp_devices);
> mutex_unlock(&fcp_lock);
>
> return 0;
> +
> +error_pm_put:
> + pm_runtime_put(&pdev->dev);
> +error_pm_disable:
> + pm_runtime_disable(&pdev->dev);
> + return ret;
[Severity: Medium]
Does calling pm_runtime_put() immediately before pm_runtime_disable() leak
the device power state?
Since pm_runtime_put() queues an asynchronous suspend, the subsequent
pm_runtime_disable() can cancel it, leaving the hardware active after a probe
failure.
Should this use pm_runtime_put_sync() instead to ensure the device powers
down correctly before being disabled?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260919-epaul-v7-3-rc1-x5h-vsp-fcp-v2-0-dbe9236bfd22@ideasonboard.com?part=11
next prev parent reply other threads:[~2026-09-18 17:15 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 17:06 [PATCH DNI v2 00/11] media: rcar-fcp, vsp1: Enable on R-Car X5H Paul Elder
2026-09-18 17:06 ` [PATCH DNI v2 01/11] dt-bindings: clock: renesas,r8a78000-cpg: Add CPG_SGD4_VIO_DP_{TX,OTHER} Paul Elder
2026-09-18 17:06 ` [PATCH DNI v2 02/11] clk: renesas: r8a78000: Add clock for FCPV and VSP for SCP FW SDKv4.36 Paul Elder
2026-09-18 17:07 ` [PATCH v2 03/11] pmdomain: renesas: r8a78000: Add maps for VIO " Paul Elder
2026-09-18 17:18 ` sashiko-bot
2026-09-19 17:40 ` Laurent Pinchart
2026-09-18 17:07 ` [PATCH v2 04/11] arm64: renesas: r8a78000: Add FCPV[BI] nodes Paul Elder
2026-09-18 17:18 ` sashiko-bot
2026-09-18 17:07 ` [PATCH v2 05/11] arm64: renesas: r8a78000: Add VSP[BI] nodes Paul Elder
2026-09-18 17:07 ` [PATCH v2 06/11] arm64: renesas: r8a78000: Add FCPVD and VSPD nodes Paul Elder
2026-09-19 17:56 ` Laurent Pinchart
2026-09-18 17:07 ` [PATCH v2 07/11] media: vsp1: Support full VSPB on R-Car M3-W, M3-N and E3 Paul Elder
2026-09-18 17:07 ` [PATCH v2 08/11] media: vsp1: Document X5H SoC ID Paul Elder
2026-09-19 17:58 ` Laurent Pinchart
2026-09-24 9:16 ` Paul Elder
2026-09-24 14:38 ` Laurent Pinchart
2026-09-18 17:07 ` [PATCH v2 09/11] media: vsp1: Add device info entries for VSPD on X5H Paul Elder
2026-09-18 17:17 ` sashiko-bot
2026-09-19 18:11 ` Laurent Pinchart
2026-09-18 17:07 ` [PATCH v2 10/11] media: rcar-fcp: Handle resets Paul Elder
2026-09-18 17:23 ` sashiko-bot
2026-09-19 18:15 ` Laurent Pinchart
2026-09-18 17:07 ` [PATCH DNI v2 11/11] media: rcar-fcp: Check device revision at probe time Paul Elder
2026-09-18 17:15 ` sashiko-bot [this message]
2026-09-21 7:41 ` [PATCH DNI v2 00/11] media: rcar-fcp, vsp1: Enable on R-Car X5H Geert Uytterhoeven
2026-09-21 7:51 ` 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=20260918171514.81CC41F000FF@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 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.