From: Christian Gmeiner Date: Sun, 24 Sep 2017 13:15:29 +0000 (+0200) Subject: drm/etnaviv: clear alloced event X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=547d340d3f9bcd83a356c00044f260ae9d80d0e0;p=openwrt%2Fstaging%2Fblogic.git drm/etnaviv: clear alloced event Results in less code as the users do not set every struct member to 0/NULL. Signed-off-by: Christian Gmeiner Reviewed-by: Lucas Stach Signed-off-by: Lucas Stach --- diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c index cd70e7c04305..8aabdac8d00b 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c @@ -1169,6 +1169,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); } @@ -1365,7 +1366,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;