From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: "Neil Armstrong" <neil.armstrong@linaro.org>,
"Zhu Wang" <wangzhu9@huawei.com>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Robert Foss" <rfoss@kernel.org>,
"Andrzej Hajda" <andrzej.hajda@intel.com>,
"Sam Ravnborg" <sam@ravnborg.org>,
"Jonas Karlman" <jonas@kwiboo.se>,
"Sandor Yu" <Sandor.yu@nxp.com>,
dri-devel@lists.freedesktop.org,
"Adrián Larumbe" <adrian.larumbe@collabora.com>,
"Douglas Anderson" <dianders@chromium.org>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
linux-kernel@vger.kernel.org, "Ondrej Jirman" <megi@xff.cz>,
"Guillaume BRUN" <the.cheaterman@gmail.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Thierry Reding" <treding@nvidia.com>
Subject: Re: [PATCH v6 3/4] drm/bridge: Drop CONFIG_OF conditionals around of_node pointers
Date: Thu, 31 Aug 2023 12:29:49 +0300 [thread overview]
Message-ID: <20230831092949.GE2698@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20230831080938.47454-4-biju.das.jz@bp.renesas.com>
Hi Biju,
Thank you for the patch.
On Thu, Aug 31, 2023 at 09:09:37AM +0100, Biju Das wrote:
> Having conditional around the of_node pointers turns out to make driver
> code use ugly #ifdef and #if blocks. So drop the conditionals.
>
> Suggested-by: Douglas Anderson <dianders@chromium.org>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> v5->v6:
> * Added Rb tag from Douglas Anderson.
> * Dropped conditionals from remaining drm/bridge drivers.
> v5:
> * Split from patch#2
> ---
> drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c | 2 --
> drivers/gpu/drm/bridge/panel.c | 2 --
> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2 --
> drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 2 --
> 4 files changed, 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
> index 6169db73d2fe..ad8241758896 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
> @@ -1231,9 +1231,7 @@ static int anx78xx_i2c_probe(struct i2c_client *client)
>
> mutex_init(&anx78xx->lock);
>
> -#if IS_ENABLED(CONFIG_OF)
> anx78xx->bridge.of_node = client->dev.of_node;
> -#endif
>
> anx78xx->client = client;
> i2c_set_clientdata(client, anx78xx);
> diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c
> index 9316384b4474..7f41525f7a6e 100644
> --- a/drivers/gpu/drm/bridge/panel.c
> +++ b/drivers/gpu/drm/bridge/panel.c
> @@ -302,9 +302,7 @@ struct drm_bridge *drm_panel_bridge_add_typed(struct drm_panel *panel,
> panel_bridge->panel = panel;
>
> panel_bridge->bridge.funcs = &panel_bridge_bridge_funcs;
> -#ifdef CONFIG_OF
> panel_bridge->bridge.of_node = panel->dev->of_node;
> -#endif
> panel_bridge->bridge.ops = DRM_BRIDGE_OP_MODES;
> panel_bridge->bridge.type = connector_type;
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 6c1d79474505..52d91a0df85e 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -3541,9 +3541,7 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
> | DRM_BRIDGE_OP_HPD;
> hdmi->bridge.interlace_allowed = true;
> hdmi->bridge.ddc = hdmi->ddc;
> -#ifdef CONFIG_OF
> hdmi->bridge.of_node = pdev->dev.of_node;
> -#endif
>
> memset(&pdevinfo, 0, sizeof(pdevinfo));
> pdevinfo.parent = dev;
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> index 04d4a1a10698..a8dd2a2e7c7b 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> @@ -1182,9 +1182,7 @@ __dw_mipi_dsi_probe(struct platform_device *pdev,
>
> dsi->bridge.driver_private = dsi;
> dsi->bridge.funcs = &dw_mipi_dsi_bridge_funcs;
> -#ifdef CONFIG_OF
> dsi->bridge.of_node = pdev->dev.of_node;
> -#endif
>
> return dsi;
> }
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2023-08-31 9:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-31 8:09 [PATCH v6 0/4] Drop ID table and conditionals around of_node pointers Biju Das
2023-08-31 8:09 ` [PATCH v6 1/4] drm/bridge/analogix/anx78xx: Drop ID table Biju Das
2023-09-06 15:41 ` Doug Anderson
2023-08-31 8:09 ` [PATCH v6 2/4] drm/bridge: Drop conditionals around of_node pointers Biju Das
2023-09-06 15:42 ` Doug Anderson
2023-08-31 8:09 ` [PATCH v6 3/4] drm/bridge: Drop CONFIG_OF " Biju Das
2023-08-31 9:29 ` Laurent Pinchart [this message]
2023-08-31 16:14 ` Andy Shevchenko
2023-09-06 15:42 ` Doug Anderson
2023-08-31 8:09 ` [PATCH v6 4/4] drm/bridge: panel: Drop CONFIG_OF conditional around *_of_get_bridge() Biju Das
2023-08-31 9:31 ` Laurent Pinchart
2023-08-31 10:47 ` Biju Das
2023-08-31 16:16 ` Andy Shevchenko
2023-09-06 15:42 ` Doug Anderson
2023-09-06 18:15 ` 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=20230831092949.GE2698@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=Sandor.yu@nxp.com \
--cc=adrian.larumbe@collabora.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andrzej.hajda@intel.com \
--cc=biju.das.jz@bp.renesas.com \
--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=megi@xff.cz \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=sam@ravnborg.org \
--cc=the.cheaterman@gmail.com \
--cc=treding@nvidia.com \
--cc=u.kleine-koenig@pengutronix.de \
--cc=wangzhu9@huawei.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.