[Intel-gfx] [PATCH 09/15] drm/i915/gem: drop unused but set variable unpinned

Andi Shyti andi.shyti at linux.intel.com
Fri May 26 17:35:35 UTC 2023


Hi Jani,

On Fri, May 26, 2023 at 07:38:02PM +0300, Jani Nikula wrote:
> Prepare for re-enabling -Wunused-but-set-variable.
> 
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
> ---
>  drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> index 5fb459ea4294..cfd7929587d8 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> @@ -736,7 +736,6 @@ static int eb_reserve(struct i915_execbuffer *eb)
>  	struct eb_vma *ev;
>  	unsigned int pass;
>  	int err = 0;
> -	bool unpinned;
>  
>  	/*
>  	 * We have one more buffers that we couldn't bind, which could be due to
> @@ -776,7 +775,7 @@ static int eb_reserve(struct i915_execbuffer *eb)
>  			pin_flags |= PIN_NONBLOCK;
>  
>  		if (pass >= 1)
> -			unpinned = eb_unbind(eb, pass >= 2);
> +			eb_unbind(eb, pass >= 2);

Reviewed-by: Andi Shyti <andi.shyti at linux.intel.com> 

A next patch can make eb_unbind() a void function.

Andi

>  
>  		if (pass == 2) {
>  			err = mutex_lock_interruptible(&eb->context->vm->mutex);
> -- 
> 2.39.2


More information about the Intel-gfx mailing list