@@ -2648,7 +2648,7 @@ static void
SiS_SetCRT1ModeRegs(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
unsigned short ModeIdIndex, unsigned short RRTI)
{
- unsigned short data, infoflag = 0, modeflag, resindex;
+ unsigned short data, infoflag = 0, modeflag;
#ifdef CONFIG_FB_SIS_315
unsigned char *ROMAddr = SiS_Pr->VirtualRomBase;
unsigned short data2, data3;
@@ -2659,7 +2659,7 @@ SiS_SetCRT1ModeRegs(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
if(SiS_Pr->UseCustomMode) {
infoflag = SiS_Pr->CInfoFlag;
} else {
- resindex = SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex);
+ SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex);
if(ModeNo > 0x13) {
infoflag = SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag;
}
@@ -3538,16 +3538,15 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata,
struct fb_var_screeninfo *var, bool writeres
)
{
- unsigned short HRE, HBE, HRS, HBS, HDE, HT;
- unsigned short VRE, VBE, VRS, VBS, VDE, VT;
+ unsigned short HRE, HBE, HRS, HDE, HT;
+ unsigned short VRE, VBE, VRS, VDE, VT;
unsigned char sr_data, cr_data, cr_data2;
- int A, B, C, D, E, F, temp;
+ int B, C, D, E, F, temp;
sr_data = crdata[14];
/* Horizontal total */
HT = crdata[0] | ((unsigned short)(sr_data & 0x03) << 8);
- A = HT + 5;
/* Horizontal display enable end */
HDE = crdata[1] | ((unsigned short)(sr_data & 0x0C) << 6);
@@ -3557,9 +3556,6 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata,
HRS = crdata[4] | ((unsigned short)(sr_data & 0xC0) << 2);
F = HRS - E - 3;
- /* Horizontal blank start */
- HBS = crdata[2] | ((unsigned short)(sr_data & 0x30) << 4);
-
sr_data = crdata[15];
cr_data = crdata[5];
@@ -3593,7 +3589,6 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata,
((unsigned short)(cr_data & 0x01) << 8) |
((unsigned short)(cr_data & 0x20) << 4) |
((unsigned short)(sr_data & 0x01) << 10);
- A = VT + 2;
/* Vertical display enable end */
VDE = crdata[10] |
@@ -3611,12 +3606,6 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata,
cr_data2 = (crdata[16] & 0x01) << 5;
- /* Vertical blank start */
- VBS = crdata[11] |
- ((unsigned short)(cr_data & 0x08) << 5) |
- ((unsigned short)(cr_data2 & 0x20) << 4) |
- ((unsigned short)(sr_data & 0x04) << 8);
-
/* Vertical blank end */
VBE = crdata[12] | ((unsigned short)(sr_data & 0x10) << 4);
temp = VBE - ((E - 1) & 511);
Fixes the following W=1 kernel build warning(s): drivers/video/fbdev/sis/init.c: In function ‘SiS_SetCRT1ModeRegs’: drivers/video/fbdev/sis/init.c:2651:49: warning: variable ‘resindex’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/sis/init.c: In function ‘SiS_Generic_ConvertCRData’: drivers/video/fbdev/sis/init.c:3544:19: warning: variable ‘A’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/sis/init.c:3542:34: warning: variable ‘VBS’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/sis/init.c:3541:34: warning: variable ‘HBS’ set but not used [-Wunused-but-set-variable] Cc: Thomas Winischhofer <thomas@winischhofer.net> Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/video/fbdev/sis/init.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-)