* [PATCH v2] drm: renesas: rz-du: mipi-dsi: drop duplicate platform_set_drvdata() call
@ 2026-05-01 8:08 John Madieu
2026-05-01 8:18 ` Biju Das
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: John Madieu @ 2026-05-01 8:08 UTC (permalink / raw)
To: biju.das.jz, maarten.lankhorst, mripard, tzimmermann, airlied,
simona
Cc: dri-devel, linux-renesas-soc, linux-kernel, john.madieu,
John Madieu
rzg2l_mipi_dsi_probe() calls platform_set_drvdata() twice with the same
arguments: once right after devm_drm_bridge_alloc() succeeds and again
after the reset controllers have been acquired. The second call is
redundant; remove it.
Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
---
Change:
v2: rather drop first occurence, leaving the appropriate call
close to where the platform data would really be used
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
index 715872130780..32616e5bc591 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
@@ -1406,7 +1406,6 @@ static int rzg2l_mipi_dsi_probe(struct platform_device *pdev)
if (IS_ERR(dsi))
return PTR_ERR(dsi);
- platform_set_drvdata(pdev, dsi);
dsi->dev = &pdev->dev;
dsi->info = of_device_get_match_data(&pdev->dev);
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH v2] drm: renesas: rz-du: mipi-dsi: drop duplicate platform_set_drvdata() call
2026-05-01 8:08 [PATCH v2] drm: renesas: rz-du: mipi-dsi: drop duplicate platform_set_drvdata() call John Madieu
@ 2026-05-01 8:18 ` Biju Das
2026-05-01 8:21 ` John Madieu
2026-05-04 23:31 ` Claude review: " Claude Code Review Bot
2026-05-04 23:31 ` Claude Code Review Bot
2 siblings, 1 reply; 5+ messages in thread
From: Biju Das @ 2026-05-01 8:18 UTC (permalink / raw)
To: John Madieu, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com,
simona@ffwll.ch
Cc: dri-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
john.madieu@gmail.com
Hi John,
Thanks for the patch.
> -----Original Message-----
> From: John Madieu <john.madieu.xa@bp.renesas.com>
> Sent: 01 May 2026 09:08
> Subject: [PATCH v2] drm: renesas: rz-du: mipi-dsi: drop duplicate platform_set_drvdata() call
>
> rzg2l_mipi_dsi_probe() calls platform_set_drvdata() twice with the same
> arguments: once right after devm_drm_bridge_alloc() succeeds and again after the reset controllers have
> been acquired. The second call is redundant; remove it.
May be "Drop the first call and keep the second one, as it is close to where the platform data would really be used."
With that fixed,
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Cheers,
Biju
>
> Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
> ---
>
> Change:
>
> v2: rather drop first occurence, leaving the appropriate call
> close to where the platform data would really be used
>
> drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c b/drivers/gpu/drm/renesas/rz-
> du/rzg2l_mipi_dsi.c
> index 715872130780..32616e5bc591 100644
> --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> @@ -1406,7 +1406,6 @@ static int rzg2l_mipi_dsi_probe(struct platform_device *pdev)
> if (IS_ERR(dsi))
> return PTR_ERR(dsi);
>
> - platform_set_drvdata(pdev, dsi);
> dsi->dev = &pdev->dev;
>
> dsi->info = of_device_get_match_data(&pdev->dev);
> --
> 2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH v2] drm: renesas: rz-du: mipi-dsi: drop duplicate platform_set_drvdata() call
2026-05-01 8:18 ` Biju Das
@ 2026-05-01 8:21 ` John Madieu
0 siblings, 0 replies; 5+ messages in thread
From: John Madieu @ 2026-05-01 8:21 UTC (permalink / raw)
To: Biju Das, maarten.lankhorst@linux.intel.com, mripard@kernel.org,
tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch
Cc: dri-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
john.madieu@gmail.com
Hi Biju,
Thanks fort he review.
> -----Original Message-----
> From: Biju Das <biju.das.jz@bp.renesas.com>
> Sent: Freitag, 1. Mai 2026 10:18
> To: John Madieu <john.madieu.xa@bp.renesas.com>;
> maarten.lankhorst@linux.intel.com; mripard@kernel.org;
> tzimmermann@suse.de; airlied@gmail.com; simona@ffwll.ch
> Cc: dri-devel@lists.freedesktop.org; linux-renesas-soc@vger.kernel.org;
> linux-kernel@vger.kernel.org; john.madieu@gmail.com
> Subject: RE: [PATCH v2] drm: renesas: rz-du: mipi-dsi: drop duplicate
> platform_set_drvdata() call
>
> Hi John,
>
> Thanks for the patch.
>
> > -----Original Message-----
> > From: John Madieu <john.madieu.xa@bp.renesas.com>
> > Sent: 01 May 2026 09:08
> > Subject: [PATCH v2] drm: renesas: rz-du: mipi-dsi: drop duplicate
> > platform_set_drvdata() call
> >
> > rzg2l_mipi_dsi_probe() calls platform_set_drvdata() twice with the
> > same
> > arguments: once right after devm_drm_bridge_alloc() succeeds and again
> > after the reset controllers have been acquired. The second call is
> redundant; remove it.
>
> May be "Drop the first call and keep the second one, as it is close to
> where the platform data would really be used."
>
Will update the message and send v3?
Regards,
John
> With that fixed,
>
> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
>
> Cheers,
> Biju
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Claude review: drm: renesas: rz-du: mipi-dsi: drop duplicate platform_set_drvdata() call
2026-05-01 8:08 [PATCH v2] drm: renesas: rz-du: mipi-dsi: drop duplicate platform_set_drvdata() call John Madieu
2026-05-01 8:18 ` Biju Das
@ 2026-05-04 23:31 ` Claude Code Review Bot
2026-05-04 23:31 ` Claude Code Review Bot
2 siblings, 0 replies; 5+ messages in thread
From: Claude Code Review Bot @ 2026-05-04 23:31 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: drm: renesas: rz-du: mipi-dsi: drop duplicate platform_set_drvdata() call
Author: John Madieu <john.madieu.xa@bp.renesas.com>
Patches: 3
Reviewed: 2026-05-05T09:31:02.038117
---
This is a single, straightforward cleanup patch that removes a duplicate `platform_set_drvdata()` call in `rzg2l_mipi_dsi_probe()`. The analysis is correct: the call appears at line 1405 (immediately after `devm_drm_bridge_alloc()`) and again at line 1444 (after reset controller acquisition). No code between the two calls reads the driver data via `platform_get_drvdata()` or `dev_get_drvdata()`, so both calls are equivalent and one is genuinely redundant.
The v2 change (dropping the first occurrence instead of the second) is a reasonable choice — keeping the call closer to where `pm_runtime_enable()` and other code that might trigger callbacks is slightly more conventional, though it doesn't matter functionally since `dsi` doesn't change between the two calls.
**Verdict: Patch looks correct and ready to apply.**
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Claude review: drm: renesas: rz-du: mipi-dsi: drop duplicate platform_set_drvdata() call
2026-05-01 8:08 [PATCH v2] drm: renesas: rz-du: mipi-dsi: drop duplicate platform_set_drvdata() call John Madieu
2026-05-01 8:18 ` Biju Das
2026-05-04 23:31 ` Claude review: " Claude Code Review Bot
@ 2026-05-04 23:31 ` Claude Code Review Bot
2 siblings, 0 replies; 5+ messages in thread
From: Claude Code Review Bot @ 2026-05-04 23:31 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**Correctness: OK**
Confirmed in the source tree that there are indeed two identical calls:
- Line 1405: `platform_set_drvdata(pdev, dsi);` (right after `devm_drm_bridge_alloc`)
- Line 1444: `platform_set_drvdata(pdev, dsi);` (after reset controller acquisition)
The `dsi` pointer is not reassigned between the two calls, and no runtime callbacks that read driver data can fire before probe returns, so removing either call is safe. The v2 decision to drop the *first* occurrence (line 1405) rather than the second is fine — it keeps the call closer to the `pm_runtime_enable()` at line 1446, which is the first point where PM callbacks could theoretically be invoked.
**Nit (commit message):** "occurence" in the v2 changelog should be "occurrence", but this is below the `---` line so it won't be in the git history.
**No functional concerns.** This is a clean one-line removal with no behavioral impact.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-05-04 23:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-01 8:08 [PATCH v2] drm: renesas: rz-du: mipi-dsi: drop duplicate platform_set_drvdata() call John Madieu
2026-05-01 8:18 ` Biju Das
2026-05-01 8:21 ` John Madieu
2026-05-04 23:31 ` Claude review: " Claude Code Review Bot
2026-05-04 23:31 ` Claude Code Review Bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox