[Mesa-dev] [PATCH v2 13/27] st/va: move variable declaration to where its used

Christian König deathsimple at vodafone.de
Fri May 5 11:44:19 UTC 2017


Am 04.05.2017 um 18:33 schrieb Emil Velikov:
> From: Emil Velikov <emil.velikov at collabora.com>
>
> ... and make it const, since we shouldn't tinker with it.
>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> Reviewed-by: Nayan Deshmukh <nayan26deshmukh at gmail.com>

Patches #13 - #17 are Reviewed-by: Christian König 
<christian.koenig at amd.com>, but I need to take a closer look at the rest.

BTW: Can you send and commit those minor cleanups separately the next time?

Makes live much easier to have the trivial stuff in master there is 
autohell or other non trivial things involved in a patch set.

Regards,
Christian.

> ---
>   src/gallium/state_trackers/va/context.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c
> index 5159fceac91..a44634c4428 100644
> --- a/src/gallium/state_trackers/va/context.c
> +++ b/src/gallium/state_trackers/va/context.c
> @@ -103,7 +103,6 @@ PUBLIC VAStatus
>   VA_DRIVER_INIT_FUNC(VADriverContextP ctx)
>   {
>      vlVaDriver *drv;
> -   struct drm_state *drm_info;
>   
>      if (!ctx)
>         return VA_STATUS_ERROR_INVALID_CONTEXT;
> @@ -127,7 +126,7 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx)
>      case VA_DISPLAY_WAYLAND:
>      case VA_DISPLAY_DRM:
>      case VA_DISPLAY_DRM_RENDERNODES: {
> -      drm_info = (struct drm_state *) ctx->drm_state;
> +      const struct drm_state *drm_info = (struct drm_state *) ctx->drm_state;
>   
>         if (!drm_info || drm_info->fd < 0) {
>            FREE(drv);




More information about the mesa-dev mailing list