Skip to content
Permalink
Browse files
drm/i915/display: Remove unused variable in the for loop.
Variable is not used in the loop, and its assignment is redundant too.
So it should be deleted.

The clang_analyzer complains as follows:

drivers/gpu/drm/i915/display/intel_fb.c:1018:3 warning:

Value stored to 'cpp' is never read.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
  • Loading branch information
luo penghao authored and intel-lab-lkp committed Oct 18, 2021
1 parent 7c832d2 commit 1a3c67fc7e245a1130e2b59fe5a04ce82de697c0
Showing 1 changed file with 2 additions and 2 deletions.
@@ -998,7 +998,7 @@ int intel_fill_fb_info(struct drm_i915_private *i915, struct intel_framebuffer *
for (i = 0; i < num_planes; i++) {
struct fb_plane_view_dims view_dims;
unsigned int width, height;
unsigned int cpp, size;
unsigned int size;
u32 offset;
int x, y;
int ret;
@@ -1015,7 +1015,7 @@ int intel_fill_fb_info(struct drm_i915_private *i915, struct intel_framebuffer *
return -EINVAL;
}

cpp = fb->base.format->cpp[i];
fb->base.format->cpp[i];
intel_fb_plane_dims(fb, i, &width, &height);

ret = convert_plane_offset_to_xy(fb, i, width, &x, &y);

0 comments on commit 1a3c67f

Please sign in to comment.