[Mesa-dev] [PATCH] i965: Define miptree map functions static (trivial)

Anuj Phogat anuj.phogat at gmail.com
Tue Feb 2 23:25:49 UTC 2016


On Tue, Feb 2, 2016 at 2:51 PM, Ben Widawsky
<benjamin.widawsky at intel.com> wrote:
> They were already declared as such. It was changed here:
> commit 31f0967fb50101437d2568e9ab9640ffbcbf7ef9
> Author: Ian Romanick <ian.d.romanick at intel.com>
> Date:   Wed Sep 2 14:43:18 2015 -0700
>
>     i965: Make intel_miptree_map_raw static
>
> Cc: Ian Romanick <ian.d.romanick at intel.com>
> Signed-off-by: Ben Widawsky <benjamin.widawsky at intel.com>
> ---
>  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index 855eb68..25295b2 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -2161,7 +2161,7 @@ intel_miptree_updownsample(struct brw_context *brw,
>     }
>  }
>
> -void *
> +static void *
>  intel_miptree_map_raw(struct brw_context *brw, struct intel_mipmap_tree *mt)
>  {
>     /* CPU accesses to color buffers don't understand fast color clears, so
> @@ -2182,7 +2182,7 @@ intel_miptree_map_raw(struct brw_context *brw, struct intel_mipmap_tree *mt)
>     return bo->virtual;
>  }
>
> -void
> +static void
>  intel_miptree_unmap_raw(struct intel_mipmap_tree *mt)
>  {
>     drm_intel_bo_unmap(mt->bo);
These functions are declared static at top of the file. In that case 'static'
keyword in front of the functions is optional. But it doesn't hurt and brings
more clarity.

> --
> 2.7.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list