[PATCH V2 11/23] drm/etnaviv: clear alloced event
Christian Gmeiner
christian.gmeiner at gmail.com
Sat Jul 22 09:53:11 UTC 2017
Results in less code as the users do not set every struct member to 0/NULL.
Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Reviewed-by: Lucas Stach <l.stach at pengutronix.de>
---
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index bc1b96b4c7e9..93e3f14c0599 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -1163,6 +1163,7 @@ static int event_alloc(struct etnaviv_gpu *gpu, unsigned nr_events,
int event = find_first_zero_bit(gpu->event_bitmap, ETNA_NR_EVENTS);
events[i] = event;
+ memset(&gpu->event[event], 0, sizeof(struct etnaviv_event));
set_bit(event, gpu->event_bitmap);
}
@@ -1354,7 +1355,6 @@ int etnaviv_gpu_submit(struct etnaviv_gpu *gpu,
}
gpu->event[event].fence = fence;
- gpu->event[event].sync_point = NULL;
submit->fence = dma_fence_get(fence);
gpu->active_fence = submit->fence->seqno;
--
2.13.3
More information about the etnaviv
mailing list