[PATCH 2/5] bcm2708_fb: remove redundant code as detected by static analysis

Paolo Pisati paolo.pisati at canonical.com
Thu Sep 10 10:17:25 UTC 2015


From: Colin Ian King <colin.king at canonical.com>

static analysis with cppcheck detected some redundant code which
should probably be removed:

[drivers/video/fbdev/bcm2708_fb.c:269]: (style) Variable 'yres'
  is assigned a value that is never used.

Signed-off-by: Colin Ian King <colin.king at canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati at canonical.com>
---
 drivers/video/fbdev/bcm2708_fb.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/video/fbdev/bcm2708_fb.c b/drivers/video/fbdev/bcm2708_fb.c
index 06a96d1..fed0672 100644
--- a/drivers/video/fbdev/bcm2708_fb.c
+++ b/drivers/video/fbdev/bcm2708_fb.c
@@ -263,12 +263,6 @@ static int bcm2708_fb_check_var(struct fb_var_screeninfo *var,
 	if (var->yoffset > var->yres_virtual - var->yres)
 		var->yoffset = var->yres_virtual - var->yres - 1;
 
-	yres = var->yres;
-	if (var->vmode & FB_VMODE_DOUBLE)
-		yres *= 2;
-	else if (var->vmode & FB_VMODE_INTERLACED)
-		yres = (yres + 1) / 2;
-
 	return 0;
 }
 
-- 
2.1.4





More information about the kernel-team mailing list