Skip to contentSkip to conversation

amdgpu/dc: don't memset after kzalloc.

PATCH In review Dave Airlie 2 participants 2 messages Oct 3, 2017 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

From: Dave Airlie <[email protected]>

We allocate this struct zeroed, so don't need to memset in the constructor.

---
 drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_surface.c +0 -2
index f170ae9..ff07105 100644
@@ -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)
Signature · 6 lines
2.9.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20171003023733.4996-1-airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 6 lines · Dave Airlie

From: Dave Airlie <[email protected]>

We allocate this struct zeroed, so don't need to memset in the constructor.

Harry

Quoted 10 lines
---
 drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_surface.c +0 -0
index f170ae9..ff07105 100644

drivers/gpu/drm/amd/display/dc/core/dc_surface.c line 42

Quoted 8 lines
drivers/gpu/drm/amd/display/dc/core/dc_surface.c +0 -2
@@ -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)

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx