[PATCH 09/21] drm/etnaviv: clear alloced event
Christian Gmeiner
christian.gmeiner at gmail.com
Fri Jun 9 10:21:23 UTC 2017
Results in less code as there is no need to set every struct
member to 0/NULL.
Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
---
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 803fcf4..0766861 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -1156,6 +1156,7 @@ static unsigned int event_alloc(struct etnaviv_gpu *gpu)
/* find first free event */
for (i = 0; i < ARRAY_SIZE(gpu->event); i++) {
if (gpu->event[i].used == false) {
+ memset(&gpu->event[i], 0, sizeof(struct etnaviv_event));
gpu->event[i].used = true;
event = i;
break;
@@ -1350,7 +1351,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.9.4
More information about the dri-devel
mailing list