[PATCH] amdgpu/dc: don't memset after kzalloc.

Harry Wentland harry.wentland at amd.com
Tue Oct 3 13:50:27 UTC 2017


On 2017-10-02 10:37 PM, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> We allocate this struct zeroed, so don't need to memset in the
> constructor.
> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>

Reviewed-by: Harry Wentland <harry.wentland at amd.com>

Harry

> ---
>  drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_surface.c b/drivers/gpu/drm/amd/display/dc/core/dc_surface.c
> index f170ae9..ff07105 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_surface.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_surface.c
> @@ -37,8 +37,6 @@
>  static void construct(struct dc_context *ctx, struct dc_plane_state *plane_state)
>  {
>  	plane_state->ctx = ctx;
> -	memset(&plane_state->hdr_static_ctx,
> -			0, sizeof(struct dc_hdr_static_metadata));
>  }
>  
>  static void destruct(struct dc_plane_state *plane_state)
> 


More information about the amd-gfx mailing list