[Intel-gfx] [PATCH -next] drm/i915/icl: Remove set but not used variable 'src_y'

Ville Syrjälä ville.syrjala at linux.intel.com
Fri Jul 19 12:39:52 UTC 2019


On Fri, Jul 19, 2019 at 02:41:00AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/gpu/drm/i915/display/intel_sprite.c: In function 'g4x_sprite_check_scaling':
> drivers/gpu/drm/i915/display/intel_sprite.c:1494:13: warning:
>  variable 'src_y' set but not used [-Wunused-but-set-variable]
> 
> Reported-by: Hulk Robot <hulkci at huawei.com>
> Signed-off-by: YueHaibing <yuehaibing at huawei.com>

Thanks. Applied to drm-intel-next-queued.

PS. I removed the "/icl" from the subject line because this has nothing
to do with icelake hardware.

> ---
>  drivers/gpu/drm/i915/display/intel_sprite.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c b/drivers/gpu/drm/i915/display/intel_sprite.c
> index 34586f29be60..9c3367491f04 100644
> --- a/drivers/gpu/drm/i915/display/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/display/intel_sprite.c
> @@ -1491,7 +1491,7 @@ g4x_sprite_check_scaling(struct intel_crtc_state *crtc_state,
>  	const struct drm_framebuffer *fb = plane_state->base.fb;
>  	const struct drm_rect *src = &plane_state->base.src;
>  	const struct drm_rect *dst = &plane_state->base.dst;
> -	int src_x, src_y, src_w, src_h, crtc_w, crtc_h;
> +	int src_x, src_w, src_h, crtc_w, crtc_h;
>  	const struct drm_display_mode *adjusted_mode =
>  		&crtc_state->base.adjusted_mode;
>  	unsigned int cpp = fb->format->cpp[0];
> @@ -1502,7 +1502,6 @@ g4x_sprite_check_scaling(struct intel_crtc_state *crtc_state,
>  	crtc_h = drm_rect_height(dst);
>  
>  	src_x = src->x1 >> 16;
> -	src_y = src->y1 >> 16;
>  	src_w = drm_rect_width(src) >> 16;
>  	src_h = drm_rect_height(src) >> 16;
> 
> 

-- 
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list