mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/nouveau/dp: convert to use ERR_CAST()
@ 2025-05-15 12:11 zhang.enpei
  2025-05-16 14:10 ` Danilo Krummrich
  0 siblings, 1 reply; 2+ messages in thread
From: zhang.enpei @ 2025-05-15 12:11 UTC (permalink / raw)
  To: lyude
  Cc: dakr, airlied, simona, airlied, zhang.enpei, dri-devel, nouveau,
	linux-kernel

From: Zhang Enpei <zhang.enpei@zte.com.cn>
As opposed to open-code, use ERR_CAST to clearly indicate that this is a
pointer to an error value and a type conversion is performed.

Signed-off-by: Zhang Enpei <zhang.enpei@zte.com.cn>
---
 drivers/gpu/drm/nouveau/nvkm/engine/disp/r535.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/r535.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/r535.c
index 99110ab2f44d..43ad467d09db 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/r535.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/r535.c
@@ -646,7 +646,7 @@ r535_conn_new(struct nvkm_disp *disp, u32 id)
        ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom,
                                    NV0073_CTRL_CMD_SPECIFIC_GET_CONNECTOR_DATA, sizeof(*ctrl));
        if (IS_ERR(ctrl))
-               return (void *)ctrl;
+               return ERR_CAST(ctrl);

        ctrl->subDeviceInstance = 0;
        ctrl->displayId = BIT(id);
-- 
2.25.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/nouveau/dp: convert to use ERR_CAST()
  2025-05-15 12:11 [PATCH] drm/nouveau/dp: convert to use ERR_CAST() zhang.enpei
@ 2025-05-16 14:10 ` Danilo Krummrich
  0 siblings, 0 replies; 2+ messages in thread
From: Danilo Krummrich @ 2025-05-16 14:10 UTC (permalink / raw)
  To: zhang.enpei
  Cc: lyude, airlied, simona, airlied, dri-devel, nouveau, linux-kernel

On 5/15/25 2:11 PM, zhang.enpei@zte.com.cn wrote:
> From: Zhang Enpei <zhang.enpei@zte.com.cn>
> As opposed to open-code, use ERR_CAST to clearly indicate that this is a
> pointer to an error value and a type conversion is performed.

Applied to drm-misc-next, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-16 14:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-15 12:11 [PATCH] drm/nouveau/dp: convert to use ERR_CAST() zhang.enpei
2025-05-16 14:10 ` Danilo Krummrich

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®