[PATCH] staging: xgifb: vb_setmode: Removed variables that is never used

From: Rickard Strandqvist
Date: Sat Jan 31 2015 - 10:18:31 EST


Variable was assigned a value that was never used.
I have also removed all the code that thereby serves no purpose.

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@xxxxxxxxxxxxxxxxxx>
---
drivers/staging/xgifb/vb_setmode.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
index 1f6f699..6eb8c55 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -730,7 +730,6 @@ static void XGI_SetCRT1DE(unsigned short ModeIdIndex,
tempax |= 0x40;

xgifb_reg_and_or(pVBInfo->P3d4, 0x07, ~0x42, tempax);
- data = xgifb_reg_get(pVBInfo->P3d4, 0x07);
tempax = 0;

if (tempbx & 0x04)
@@ -2245,9 +2244,8 @@ static unsigned char XGI_XG27GetPSCValue(struct vb_device_info *pVBInfo)
static void XGI_XG21BLSignalVDD(unsigned short tempbh, unsigned short tempbl,
struct vb_device_info *pVBInfo)
{
- unsigned char CR4A, temp;
+ unsigned char temp;

- CR4A = xgifb_reg_get(pVBInfo->P3d4, 0x4A);
tempbh &= 0x23;
tempbl &= 0x23;
xgifb_reg_and(pVBInfo->P3d4, 0x4A, ~tempbh); /* enable GPIO write */
@@ -2271,7 +2269,7 @@ static void XGI_XG21BLSignalVDD(unsigned short tempbh, unsigned short tempbl,
static void XGI_XG27BLSignalVDD(unsigned short tempbh, unsigned short tempbl,
struct vb_device_info *pVBInfo)
{
- unsigned char CR4A, temp;
+ unsigned char temp;
unsigned short tempbh0, tempbl0;

tempbh0 = tempbh;
@@ -2290,7 +2288,6 @@ static void XGI_XG27BLSignalVDD(unsigned short tempbh, unsigned short tempbl,
}
xgifb_reg_and_or(pVBInfo->P3d4, 0xB4, ~tempbh0, tempbl0);

- CR4A = xgifb_reg_get(pVBInfo->P3d4, 0x4A);
tempbh &= 0x03;
tempbl &= 0x03;
tempbh <<= 2;
@@ -5160,7 +5157,7 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE,
}
i--;
if ((pVBInfo->SetFlag & ProgrammingCRT2)) {
- temp = XGI_AjustCRT2Rate(ModeIdIndex, RefreshRateTableIndex,
+ XGI_AjustCRT2Rate(ModeIdIndex, RefreshRateTableIndex,
&i, pVBInfo);
}
return RefreshRateTableIndex + i;
--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/