[Mesa-dev] [PATCH] nouveau: remove always false argument in nouveau_fence_new()

Ilia Mirkin imirkin at alum.mit.edu
Mon Jan 16 16:56:27 UTC 2017


I think there was a point in time when it was actually used. But that
time is no more.

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

On Mon, Jan 16, 2017 at 11:25 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> No point in having the extra argument considering that it's effectively
> unused since the function was introduced.
>
> Cc: Ilia Mirkin <imirkin at alum.mit.edu>
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
>  src/gallium/drivers/nouveau/nouveau_fence.c    | 8 ++------
>  src/gallium/drivers/nouveau/nouveau_fence.h    | 3 +--
>  src/gallium/drivers/nouveau/nv30/nv30_screen.c | 2 +-
>  src/gallium/drivers/nouveau/nv50/nv50_screen.c | 2 +-
>  src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 2 +-
>  5 files changed, 6 insertions(+), 11 deletions(-)
>
> diff --git a/src/gallium/drivers/nouveau/nouveau_fence.c b/src/gallium/drivers/nouveau/nouveau_fence.c
> index 691553ae7e..6c299cbc6a 100644
> --- a/src/gallium/drivers/nouveau/nouveau_fence.c
> +++ b/src/gallium/drivers/nouveau/nouveau_fence.c
> @@ -30,8 +30,7 @@
>  #endif
>
>  bool
> -nouveau_fence_new(struct nouveau_screen *screen, struct nouveau_fence **fence,
> -                  bool emit)
> +nouveau_fence_new(struct nouveau_screen *screen, struct nouveau_fence **fence)
>  {
>     *fence = CALLOC_STRUCT(nouveau_fence);
>     if (!*fence)
> @@ -41,9 +40,6 @@ nouveau_fence_new(struct nouveau_screen *screen, struct nouveau_fence **fence,
>     (*fence)->ref = 1;
>     LIST_INITHEAD(&(*fence)->work);
>
> -   if (emit)
> -      nouveau_fence_emit(*fence);
> -
>     return true;
>  }
>
> @@ -242,7 +238,7 @@ nouveau_fence_next(struct nouveau_screen *screen)
>
>     nouveau_fence_ref(NULL, &screen->fence.current);
>
> -   nouveau_fence_new(screen, &screen->fence.current, false);
> +   nouveau_fence_new(screen, &screen->fence.current);
>  }
>
>  void
> diff --git a/src/gallium/drivers/nouveau/nouveau_fence.h b/src/gallium/drivers/nouveau/nouveau_fence.h
> index f10016da82..e14572bce8 100644
> --- a/src/gallium/drivers/nouveau/nouveau_fence.h
> +++ b/src/gallium/drivers/nouveau/nouveau_fence.h
> @@ -32,8 +32,7 @@ struct nouveau_fence {
>  void nouveau_fence_emit(struct nouveau_fence *);
>  void nouveau_fence_del(struct nouveau_fence *);
>
> -bool nouveau_fence_new(struct nouveau_screen *, struct nouveau_fence **,
> -                       bool emit);
> +bool nouveau_fence_new(struct nouveau_screen *, struct nouveau_fence **);
>  bool nouveau_fence_work(struct nouveau_fence *, void (*)(void *), void *);
>  void nouveau_fence_update(struct nouveau_screen *, bool flushed);
>  void nouveau_fence_next(struct nouveau_screen *);
> diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
> index 19df068e39..96a6cfdf33 100644
> --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
> +++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
> @@ -734,6 +734,6 @@ nv30_screen_create(struct nouveau_device *dev)
>
>     nouveau_pushbuf_kick(push, push->channel);
>
> -   nouveau_fence_new(&screen->base, &screen->base.fence.current, false);
> +   nouveau_fence_new(&screen->base, &screen->base.fence.current);
>     return &screen->base;
>  }
> diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
> index 56370014bc..322ad59b17 100644
> --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
> +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
> @@ -1016,7 +1016,7 @@ nv50_screen_create(struct nouveau_device *dev)
>        goto fail;
>     }
>
> -   nouveau_fence_new(&screen->base, &screen->base.fence.current, false);
> +   nouveau_fence_new(&screen->base, &screen->base.fence.current);
>
>     return &screen->base;
>
> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
> index b6e4c6cfe9..8d1b7bed2d 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
> @@ -1225,7 +1225,7 @@ nvc0_screen_create(struct nouveau_device *dev)
>     if (!nvc0_blitter_create(screen))
>        goto fail;
>
> -   nouveau_fence_new(&screen->base, &screen->base.fence.current, false);
> +   nouveau_fence_new(&screen->base, &screen->base.fence.current);
>
>     return &screen->base;
>
> --
> 2.11.0
>


More information about the mesa-dev mailing list