* [PATCH] drm/bridge: Remove unnecessary memset
@ 2025-08-07 12:38 Liao Yuanhong
2025-08-07 14:18 ` Luca Ceresoli
0 siblings, 1 reply; 2+ messages in thread
From: Liao Yuanhong @ 2025-08-07 12:38 UTC (permalink / raw)
To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Aradhya Bhatia,
Dmitry Baryshkov, Tomi Valkeinen, Luca Ceresoli,
open list:DRM DRIVERS, open list
Cc: Liao Yuanhong
kzalloc() has already been initialized to full 0 space, there is no need to
use memset() to initialize again.
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c
index a57ca8c3bdae..590f7c75744e 100644
--- a/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c
+++ b/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c
@@ -1047,7 +1047,6 @@ cdns_dsi_bridge_atomic_reset(struct drm_bridge *bridge)
if (!dsi_state)
return NULL;
- memset(dsi_state, 0, sizeof(*dsi_state));
dsi_state->base.bridge = bridge;
return &dsi_state->base;
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/bridge: Remove unnecessary memset
2025-08-07 12:38 [PATCH] drm/bridge: Remove unnecessary memset Liao Yuanhong
@ 2025-08-07 14:18 ` Luca Ceresoli
0 siblings, 0 replies; 2+ messages in thread
From: Luca Ceresoli @ 2025-08-07 14:18 UTC (permalink / raw)
To: Liao Yuanhong
Cc: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Aradhya Bhatia,
Dmitry Baryshkov, Tomi Valkeinen, open list:DRM DRIVERS,
open list
Hello Liao,
On Thu, 7 Aug 2025 20:38:33 +0800
Liao Yuanhong <liaoyuanhong@vivo.com> wrote:
> kzalloc() has already been initialized to full 0 space, there is no need to
> use memset() to initialize again.
>
> Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
> ---
> drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c
> index a57ca8c3bdae..590f7c75744e 100644
> --- a/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c
> +++ b/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c
> @@ -1047,7 +1047,6 @@ cdns_dsi_bridge_atomic_reset(struct drm_bridge *bridge)
> if (!dsi_state)
> return NULL;
>
> - memset(dsi_state, 0, sizeof(*dsi_state));
Thanks, your patch seems correct, but your subject line should mention
the driver you are changing. You can use
'git log --oneline -- <filename>'
to ensure which prefix is used for that file.
Without that your subject line would suggest you are changing the
drm_bridge core or doing a change affecting several drivers. That would
be misleading to reviewers receiving your patch as well as when looking
at the git history in case the patch gets applied (because the e-mail
Subject will be used as the git commit message title.
Best regards,
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-07 14:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-07 12:38 [PATCH] drm/bridge: Remove unnecessary memset Liao Yuanhong
2025-08-07 14:18 ` Luca Ceresoli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).