From: "Maíra Canal" <mcanal@igalia.com>
To: Luca Ceresoli <luca.ceresoli@bootlin.com>,
Maxime Ripard <mripard@kernel.org>,
Dave Stevenson <dave.stevenson@raspberrypi.com>,
Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: Paul Cercueil <paul.cercueil@bootlin.com>,
Hui Pu <Hui.Pu@gehealthcare.com>,
Ian Ray <ian.ray@gehealthcare.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 3/3] drm/vc4: dsi: remove unnecessary intermediate pointer computation
Date: Thu, 5 Nov 2026 20:27:32 -0300 [thread overview]
Message-ID: <05396e07-1c4a-4942-82dd-a0154fd6316d@igalia.com> (raw)
In-Reply-To: <20261105-drm-fix-of_get_bridge-build-regression-v4-3-906ca343ac1b@bootlin.com>
Hi Luca,
On 05/11/26 07:32, Luca Ceresoli wrote:
> This function computes the 'dsi' pointer from the passed 'bridge' pointer,
> but uses 'dsi' just to obtain the same 'bridge' pointer. Remove the
> unnecessary pointer dance, just use the passed 'bridge' pointer.
>
> Suggested-by: Maíra Canal <mcanal@igalia.com>
> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
>
> ---
>
> New patch in v4
> ---
> drivers/gpu/drm/vc4/vc4_dsi.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c
> index 581b54e04ce4..ec008f766dd5 100644
> --- a/drivers/gpu/drm/vc4/vc4_dsi.c
> +++ b/drivers/gpu/drm/vc4/vc4_dsi.c
> @@ -1159,10 +1159,7 @@ static int vc4_dsi_bridge_attach(struct drm_bridge *bridge,
> struct drm_encoder *encoder,
> enum drm_bridge_attach_flags flags)
> {
> - struct vc4_dsi *dsi = bridge_to_vc4_dsi(bridge);
> -
> - return drm_bridge_attach(encoder, dsi->bridge.next_bridge,
> - &dsi->bridge, flags);
> + return drm_bridge_attach(encoder, bridge->next_bridge, bridge, flags);
I wonder if we should turn this into a DRM helper... I noticed that
other drivers follow this exact same pattern. The following files have
such pattern: vs_bridge.c, meson_encoder_hdmi.c, rzg2l_mipi_dsi.c, etc.
Anyway, just a suggestion. I already pushed the series to drm-misc-next.
Best regards,
- Maíra
next prev parent reply other threads:[~2026-11-05 23:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 10:32 [PATCH v4 0/3] drm: remove deprecated *_of_get_bridge() from non-OF drivers Luca Ceresoli
2026-11-05 10:32 ` [PATCH v4 1/3] drm/vc4: dpi: stop using deprecated drmm_of_get_bridge() Luca Ceresoli
2026-11-05 10:32 ` [PATCH v4 2/3] drm/vc4: dsi: " Luca Ceresoli
2026-11-05 10:32 ` [PATCH v4 3/3] drm/vc4: dsi: remove unnecessary intermediate pointer computation Luca Ceresoli
2026-11-05 23:27 ` Maíra Canal [this message]
2026-11-06 14:01 ` Luca Ceresoli
2026-11-05 23:20 ` [PATCH v4 0/3] drm: remove deprecated *_of_get_bridge() from non-OF drivers Maíra Canal
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=05396e07-1c4a-4942-82dd-a0154fd6316d@igalia.com \
--to=mcanal@igalia.com \
--cc=Hui.Pu@gehealthcare.com \
--cc=airlied@gmail.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ian.ray@gehealthcare.com \
--cc=kernel-list@raspberrypi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=paul.cercueil@bootlin.com \
--cc=simona@ffwll.ch \
--cc=thomas.petazzoni@bootlin.com \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®