From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>, David Airlie <airlied@gmail.com>,
Daniel Vetter <daniel@ffwll.ch>, Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Douglas Anderson <dianders@chromium.org>
Subject: Re: [PATCH v5 2/3] drm/bridge: Drop conditionals around of_node pointers
Date: Wed, 30 Aug 2023 23:38:25 +0300 [thread overview]
Message-ID: <20230830203825.GP6477@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20230830170819.309269-3-biju.das.jz@bp.renesas.com>
Hi Biju,
Thank you for the patch.
In the commit message, s/pointers/pointer/ as you're only touching a
single one.
On Wed, Aug 30, 2023 at 06:08:18PM +0100, Biju Das wrote:
> The commit c9e358dfc4a8 ("driver-core: remove conditionals around
> devicetree pointers") supposed to remove conditionals around of_node
> pointer, but it missed out drm/bridge.h. So drop #if conditionals by
> adding struct device_node forward declaration.
You can hardly blame commit c9e358dfc4a8 for forgetting drm_bridge, as
that commit dates back from 2011 and the drm_bridge of_node field was
added in 2015 :-)
I would simply copy the rationale from the commit message of
c9e358dfc4a8 and write something like
--------
Having conditional around the of_node pointer of the drm_bridge
structure turns out to make driver code use ugly #ifdef blocks. Drop the
conditionals to simplify drivers. While this slightly increases the size
of struct drm_bridge on non-OF system, the number of bridges used today
and foreseen tomorrow on those systems is very low, so this shouldn't be
an issue.
--------
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Suggested-by: Douglas Anderson <dianders@chromium.org>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> v5:
> * Split from patch#2
> * Updated commit description
> * Added struct device_node forward declaration.
> ---
> include/drm/drm_bridge.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
> index c339fc85fd07..843736627f60 100644
> --- a/include/drm/drm_bridge.h
> +++ b/include/drm/drm_bridge.h
> @@ -32,6 +32,8 @@
> #include <drm/drm_mode_object.h>
> #include <drm/drm_modes.h>
>
> +struct device_node;
> +
> struct drm_bridge;
> struct drm_bridge_timings;
> struct drm_connector;
> @@ -716,10 +718,8 @@ struct drm_bridge {
> struct drm_encoder *encoder;
> /** @chain_node: used to form a bridge chain */
> struct list_head chain_node;
> -#ifdef CONFIG_OF
> /** @of_node: device node pointer to the bridge */
> struct device_node *of_node;
> -#endif
> /** @list: to keep track of all added bridges */
> struct list_head list;
> /**
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2023-08-30 21:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-30 17:08 [PATCH v5 0/3] Drop ID table and conditionals around of_node pointers for anx78xx driver Biju Das
2023-08-30 17:08 ` [PATCH v5 1/3] drm/bridge/analogix/anx78xx: Drop ID table Biju Das
2023-08-30 17:08 ` [PATCH v5 2/3] drm/bridge: Drop conditionals around of_node pointers Biju Das
2023-08-30 19:51 ` Doug Anderson
2023-08-30 20:38 ` Laurent Pinchart [this message]
2023-08-30 17:08 ` [PATCH v5 3/3] drm/bridge/analogix/anx78xx: " Biju Das
2023-08-30 19:53 ` Doug Anderson
2023-08-30 20:41 ` Laurent Pinchart
2023-08-31 6:52 ` Biju Das
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=20230830203825.GP6477@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andrzej.hajda@intel.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=daniel@ffwll.ch \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--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