[PATCH] drm/bridge: Remove unnecessary memset

Luca Ceresoli luca.ceresoli at bootlin.com
Thu Aug 7 14:18:59 UTC 2025


Hello Liao,

On Thu,  7 Aug 2025 20:38:33 +0800
Liao Yuanhong <liaoyuanhong at 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 at 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


More information about the dri-devel mailing list