Staging: xgifb: Fix multiple checkpatch issues
cover Staging: xgifb: Fix multiple checkpatch issues
This patchset fixes multiple checkpatch.pl issues in xgifb/vb_setmode.c .
Bhumika Goyal (2):
Staging: xgifb: Remove space after type cast
Staging: xgifb: Remove unnecessary blank lines
drivers/staging/xgifb/vb_setmode.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/2 Staging: xgifb: Remove space after type cast
This patch removes unnecessary space after type casts. Found using checkpatch.pl.
Signed-off-by Bhumika Goyal <[email protected]>
--- drivers/staging/xgifb/vb_setmode.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/staging/xgifb/vb_setmode.c +11 -11
@@ -274,12 +274,12 @@ static void XGI_SetCRT1Timing_H(struct vb_device_info *pVBInfo,for (i =0x01 ; i <=0x04 ; i++) { data = pVBInfo->TimingH.data[i]; -xgifb_reg_set (pVBInfo->P3d4, (unsigned short ) (i +1 ), data); +xgifb_reg_set (pVBInfo->P3d4, (unsigned short )(i +1 ), data); }for (i =0x05 ; i <=0x06 ; i++) { data = pVBInfo->TimingH.data[i]; -xgifb_reg_set (pVBInfo->P3c4, (unsigned short ) (i +6 ), data); +xgifb_reg_set (pVBInfo->P3c4, (unsigned short )(i +6 ), data); } j =xgifb_reg_get (pVBInfo->P3c4,0x0e );
@@ -325,17 +325,17 @@ static void XGI_SetCRT1Timing_V(unsigned short ModeIdIndex,for (i =0x00 ; i <=0x01 ; i++) { data = pVBInfo->TimingV.data[i]; -xgifb_reg_set (pVBInfo->P3d4, (unsigned short ) (i +6 ), data); +xgifb_reg_set (pVBInfo->P3d4, (unsigned short )(i +6 ), data); }for (i =0x02 ; i <=0x03 ; i++) { data = pVBInfo->TimingV.data[i]; -xgifb_reg_set (pVBInfo->P3d4, (unsigned short ) (i +0x0e ), data); +xgifb_reg_set (pVBInfo->P3d4, (unsigned short )(i +0x0e ), data); }for (i =0x04 ; i <=0x05 ; i++) { data = pVBInfo->TimingV.data[i]; -xgifb_reg_set (pVBInfo->P3d4, (unsigned short ) (i +0x11 ), data); +xgifb_reg_set (pVBInfo->P3d4, (unsigned short )(i +0x11 ), data); } j =xgifb_reg_get (pVBInfo->P3c4,0x0a );
@@ -433,7 +433,7 @@ static void XGI_SetXG21CRTC(unsigned short RefreshRateTableIndex, Temp2 |=0x40 ;/* Temp2 + 0x40 */ Temp2 &=0xFF ; - Tempax = (unsigned char ) Temp2;/* Tempax: HRE[7:0] */ + Tempax = (unsigned char )Temp2;/* Tempax: HRE[7:0] */ Tempax <<=2 ;/* Tempax[7:2]: HRE[5:0] */ Tempdx >>=6 ;/* Tempdx[7:6]->[1:0] HRS[9:8] */ Tempax |= Tempdx;/* HRE[5:0]HRS[9:8] */
@@ -483,11 +483,11 @@ static void XGI_SetXG21CRTC(unsigned short RefreshRateTableIndex, Temp2 |=0x20 ;/* VRE + 0x20 */ Temp2 &=0xFF ; - Tempax = (unsigned char ) Temp2;/* Tempax: VRE[7:0] */ + Tempax = (unsigned char )Temp2;/* Tempax: VRE[7:0] */ Tempax <<=2 ;/* Tempax[7:0]; VRE[5:0]00 */ Temp1 &=0x600 ;/* Temp1[10:9]: VRS[10:9] */ Temp1 >>=9 ;/* Temp1[1:0]: VRS[10:9] */ - Tempbx = (unsigned char ) Temp1; + Tempbx = (unsigned char )Temp1; Tempax |= Tempbx;/* Tempax[7:0]: VRE[5:0]VRS[10:9] */ Tempax &=0x7F ;/* SR3F D[7:2]->VRE D[1:0]->VRS */
@@ -716,10 +716,10 @@ static void XGI_SetCRT1DE(unsigned short ModeIdIndex, data =xgifb_reg_get (pVBInfo->P3d4,0x11 ); data &=0x7F ;xgifb_reg_set (pVBInfo->P3d4,0x11 , data);/* Unlock CRTC */ -xgifb_reg_set (pVBInfo->P3d4,0x01 , (unsigned short ) (tempcx &0xff )); +xgifb_reg_set (pVBInfo->P3d4,0x01 , (unsigned short )(tempcx &0xff ));xgifb_reg_and_or (pVBInfo->P3d4,0x0b , ~0x0c , - (unsigned short ) ((tempcx &0x0ff00 ) >>10 )); -xgifb_reg_set (pVBInfo->P3d4,0x12 , (unsigned short ) (tempbx &0xff )); + (unsigned short )((tempcx &0x0ff00 ) >>10 )); +xgifb_reg_set (pVBInfo->P3d4,0x12 , (unsigned short )(tempbx &0xff )); tempax =0 ; tempbx >>=8 ;
Signature · 1 line
1.9.1
PATCH 2/2 Staging: xgifb: Remove unnecessary blank lines
In reply to Bhumika GoyalThis patch removes unnecessary blank lines after { and before }. Found using checkpatch.pl.
Signed-off-by Bhumika Goyal <[email protected]>
--- drivers/staging/xgifb/vb_setmode.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/staging/xgifb/vb_setmode.c +0 -6
@@ -61,7 +61,6 @@ void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo)if (((temp &0x88 ) ==0x80 ) || ((temp &0x88 ) ==0x08 )) pVBInfo->XGINew_CR97 =0x80 ; } - }static void XGI_SetSeqRegs (struct vb_device_info *pVBInfo)
@@ -155,7 +154,6 @@ static void XGI_ClearExt1Regs(struct vb_device_info *pVBInfo)static unsigned char XGI_SetDefaultVCLK (struct vb_device_info *pVBInfo) { -xgifb_reg_and_or (pVBInfo->P3c4,0x31 , ~0x30 ,0x20 );xgifb_reg_set (pVBInfo->P3c4,0x2B , XGI_VCLKData[0 ].SR2B);xgifb_reg_set (pVBInfo->P3c4,0x2C , XGI_VCLKData[0 ].SR2C);
@@ -592,7 +590,6 @@ static void XGI_SetXG27FPBits(struct vb_device_info *pVBInfo)xgifb_reg_and_or (pVBInfo->P3c4,0x06 , ~0xc0 , temp &0x80 );/* SR09[7] enable FP output, SR09[6] 1: sigle 18bits, 0: 24bits */ xgifb_reg_and_or (pVBInfo->P3c4,0x09 , ~0xc0 , temp |0x80 ); - } static void xgifb_set_lcd(int chip_id,
@@ -930,7 +927,6 @@ static void XGI_SetXG21FPBits(struct vb_device_info *pVBInfo)xgifb_reg_and_or (pVBInfo->P3c4,0x06 , ~0x40 , temp);/* SR09[7] enable FP output, SR09[6] 1: sigle 18bits, 0: dual 12bits */ xgifb_reg_and_or (pVBInfo->P3c4,0x09 , ~0xc0 , temp |0x80 ); - } static void XGI_SetCRT1FIFO(struct xgi_hw_device_info *HwDeviceExtension,
@@ -990,7 +986,6 @@ static void XGI_SetVCLKState(struct xgi_hw_device_info *HwDeviceExtension,xgifb_reg_and_or (pVBInfo->P3c4,0x07 ,0xFC , data2);if (HwDeviceExtension->jChipType >=XG27 )xgifb_reg_and_or (pVBInfo->P3c4,0x40 ,0xFC , data2 &0x03 ); - } static void XGI_SetCRT1ModeRegs(struct xgi_hw_device_info *HwDeviceExtension,
@@ -1072,7 +1067,6 @@ static void XGI_SetCRT1ModeRegs(struct xgi_hw_device_info *HwDeviceExtension, data =0x6c ;xgifb_reg_set (pVBInfo->P3d4,0x52 , data); } - } static void XGI_WriteDAC(unsigned short dl,
Signature · 1 line
1.9.1