diff options
author | Peter Huewe <peterhuewe@gmx.de> | 2013-02-03 04:08:41 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-03 19:26:13 -0600 |
commit | ecfaa00c00904270ecff5b5e4c44b514be62645f (patch) | |
tree | 98d54d99e940f379946c8cdfb57b11987e2d86fc /drivers | |
parent | e2d979ccb73928bb22201a9d9035d0169aa37691 (diff) |
staging/xgifb: Remove unused variables and dead assignments
The variables A,HBS and VBS are never read in XGIfb_mode_rate_to_ddata
and the assignment has no side effects -> so we can simply remove them.
Removing them causes VT, HT and cr_data3 to be unused -> remove them as well
and remove the assignmens to cr_data which are shadowed by a different
assignment a few lines later.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/xgifb/XGI_main_26.c | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 68a216fcefb..ca9f5833872 100644 --- a/drivers/staging/xgifb/XGI_main_26.c +++ b/drivers/staging/xgifb/XGI_main_26.c @@ -91,11 +91,10 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, unsigned short ModeIdIndex, index = 0; unsigned short RefreshRateTableIndex = 0; - unsigned short VRE, VBE, VRS, VBS, VDE, VT; - unsigned short HRE, HBE, HRS, HBS, HDE, HT; + unsigned short VRE, VBE, VRS, VDE; + unsigned short HRE, HBE, HRS, HDE; unsigned char sr_data, cr_data, cr_data2; - unsigned long cr_data3; - int A, B, C, D, E, F, temp, j; + int B, C, D, E, F, temp, j; InitTo330Pointer(HwDeviceExtension->jChipType, XGI_Pr); if (!XGI_SearchModeID(ModeNo, &ModeIdIndex, XGI_Pr)) return 0; @@ -105,12 +104,6 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, sr_data = XGI_CRT1Table[index].CR[5]; - cr_data = XGI_CRT1Table[index].CR[0]; - - /* Horizontal total */ - HT = (cr_data & 0xff) | ((unsigned short) (sr_data & 0x03) << 8); - A = HT + 5; - HDE = (XGI330_RefIndex[RefreshRateTableIndex].XRes >> 3) - 1; E = HDE + 1; @@ -120,11 +113,6 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, HRS = (cr_data & 0xff) | ((unsigned short) (sr_data & 0xC0) << 2); F = HRS - E - 3; - cr_data = XGI_CRT1Table[index].CR[1]; - - /* Horizontal blank start */ - HBS = (cr_data & 0xff) | ((unsigned short) (sr_data & 0x30) << 4); - sr_data = XGI_CRT1Table[index].CR[6]; cr_data = XGI_CRT1Table[index].CR[2]; @@ -152,16 +140,8 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, sr_data = XGI_CRT1Table[index].CR[14]; - cr_data = XGI_CRT1Table[index].CR[8]; - cr_data2 = XGI_CRT1Table[index].CR[9]; - /* Vertical total */ - VT = (cr_data & 0xFF) | ((unsigned short) (cr_data2 & 0x01) << 8) - | ((unsigned short) (cr_data2 & 0x20) << 4) - | ((unsigned short) (sr_data & 0x01) << 10); - A = VT + 2; - VDE = XGI330_RefIndex[RefreshRateTableIndex].YRes - 1; E = VDE + 1; @@ -173,15 +153,6 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, | ((unsigned short) (sr_data & 0x08) << 7); F = VRS + 1 - E; - cr_data = XGI_CRT1Table[index].CR[12]; - - cr_data3 = (XGI_CRT1Table[index].CR[14] & 0x80) << 5; - - /* Vertical blank start */ - VBS = (cr_data & 0xff) | ((unsigned short) (cr_data2 & 0x08) << 5) - | ((unsigned short) (cr_data3 & 0x20) << 4) - | ((unsigned short) (sr_data & 0x04) << 8); - cr_data = XGI_CRT1Table[index].CR[13]; /* Vertical blank end */ |