From: neil.armstrong@linaro.org
To: zhang.enpei@zte.com.cn, andrzej.hajda@intel.com
Cc: rfoss@kernel.org, laurent.pinchart@ideasonboard.com,
jonas@kwiboo.se, jernej.skrabec@gmail.com,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/bridge: panel: convert to use ERR_CAST()
Date: Mon, 4 Aug 2025 17:17:14 +0200 [thread overview]
Message-ID: <6408ca9a-bf7b-45b4-982c-8a91d2ebf7d3@linaro.org> (raw)
In-Reply-To: <20250719164705961iryN2w6eDrp8KeLJMkI6-@zte.com.cn>
On 19/07/2025 10:47, zhang.enpei@zte.com.cn wrote:
> From: Zhang Enpei <zhang.enpei@zte.com.cn>
>
> Use ERR_CAST() since the macro clearly indicates that this is a pointer
> to an error value and a type conversion was performed.
>
> Signed-off-by: Zhang Enpei <zhang.enpei@zte.com.cn>
> ---
> drivers/gpu/drm/bridge/panel.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c
> index 184a8b7049a7..7d2d67e56cee 100644
> --- a/drivers/gpu/drm/bridge/panel.c
> +++ b/drivers/gpu/drm/bridge/panel.c
> @@ -291,7 +291,7 @@ struct drm_bridge *drm_panel_bridge_add_typed(struct drm_panel *panel,
> panel_bridge = devm_drm_bridge_alloc(panel->dev, struct panel_bridge, bridge,
> &panel_bridge_bridge_funcs);
> if (IS_ERR(panel_bridge))
> - return (void *)panel_bridge;
> + return ERR_CAST(panel_bridge);
>
> panel_bridge->connector_type = connector_type;
> panel_bridge->panel = panel;
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
prev parent reply other threads:[~2025-08-04 15:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-19 8:47 zhang.enpei
2025-08-04 15:17 ` neil.armstrong [this message]
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=6408ca9a-bf7b-45b4-982c-8a91d2ebf7d3@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=rfoss@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=zhang.enpei@zte.com.cn \
/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®