drm/i915: Remove set but not used variable 'src_y'
authorYueHaibing <yuehaibing@huawei.com>
Fri, 19 Jul 2019 02:41:00 +0000 (02:41 +0000)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 19 Jul 2019 12:33:16 +0000 (15:33 +0300)
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@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190719024100.64738-1-yuehaibing@huawei.com
drivers/gpu/drm/i915/display/intel_sprite.c

index 5e5ea867aae95231702fba2b886328ecaebf7652..53c6594c4588444648d2e75d1780c26a16c18c1c 100644 (file)
@@ -1518,7 +1518,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];
@@ -1529,7 +1529,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;