[PATCH 09/21] drm/etnaviv: clear alloced event

Lucas Stach l.stach at pengutronix.de
Mon Jun 26 13:30:48 UTC 2017


Am Freitag, den 09.06.2017, 12:21 +0200 schrieb Christian Gmeiner:
> 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>

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 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;
>  


More information about the etnaviv mailing list