aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.1/0171-bcm2708_fb-remove-redundant-code-as-detected-by-stat.patch
blob: 82092e73ce1317b6c43e62c948fac18941b5b635 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 5a50f31eec8f7cda9f2d8d89d47609e01be70fb8 Mon Sep 17 00:00:00 2001
From: Colin Ian King <colin.king@canonical.com>
Date: Wed, 2 Sep 2015 07:13:17 -0400
Subject: [PATCH 171/222] bcm2708_fb: remove redundant code as detected by
 static analysis

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@canonical.com>
---
 drivers/video/fbdev/bcm2708_fb.c | 6 ------
 1 file changed, 6 deletions(-)

--- 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 f
 	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;
 }