Cleaning xgifb/vb_setmode.c
cover Cleaning xgifb/vb_setmode.c
This patchset fixes various issues that come up in the checkpatch in patch 1, 3, 4 and 5. Patches 2 and 6 are based on Julia's suggestion when a one patch was sent fixing the checkpatch issue of moving && operator to previous line.
Gargi Sharma (6):
staging: xgifb: move AND operator for logical continuation
staging: xgifb: remove unnecessary parentheses
staging: xgifb: remove blank line after open brace
staging: xgifb: add spaces around |
staging: xgifb: remove blank line before closing brace
staging: xgifb: fix alignment for if arguments
drivers/staging/xgifb/vb_setmode.c | 48 ++++++++++++++------------------------ 1 file changed, 17 insertions(+), 31 deletions(-)
Signature · 1 line
2.9.2
PATCH 1/6 staging: xgifb: move AND operator for logical continuation
Fixes the checkpatch issue Logical continuations should be on the previous line.
--- drivers/staging/xgifb/vb_setmode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/xgifb/vb_setmode.c +4 -4
@@ -1741,8 +1741,8 @@ static void XGI_SetCRT2ECLK(unsigned short ModeIdIndex,for (i =0 ; i <4 ; i++) {xgifb_reg_and_or (pVBInfo->P3d4,0x31 , ~0x30 , (unsigned short ) (0x10 * i)); -if ((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) - && (!(pVBInfo->VBInfo & SetInSlaveMode))) { +if ((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) && + (!(pVBInfo->VBInfo & SetInSlaveMode))) {xgifb_reg_set (pVBInfo->P3c4,0x2e , di_0);xgifb_reg_set (pVBInfo->P3c4,0x2f , di_1); }else {
@@ -4141,8 +4141,8 @@ static void XGI_SetGroup4(unsigned short ModeIdIndex, | TVSetYPbPr525p | TVSetYPbPr750p | TVSetHiVision))) { temp |=0x0001 ; -if ((pVBInfo->VBInfo & SetInSlaveMode) - && (!(pVBInfo->TVInfo +if ((pVBInfo->VBInfo & SetInSlaveMode) && + (!(pVBInfo->TVInfo & TVSimuMode))) temp &= (~0x0001 ); }
Signature · 1 line
2.9.2
Re: [Outreachy kernel] [PATCH 1/6] staging: xgifb: move AND operator for logical continuation
Quoted 2 lines · Gargi Sharma
Fixes the checkpatch issue Logical continuations should be on the previous line.
It would be better to avoid commit messages that start with Fixes. They put the emphasis on what the problem is, but give no information about the solution. If the reader knows about both, then they are better oriented when looking at the patch code. Here you could say
Move && up to the previous line, to fix the checkpatch issue Logical continuations should be on the previous line.
julia
Quoted 42 lines
Signed-off-by Gargi Sharma <[email protected]>--- drivers/staging/xgifb/vb_setmode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/staging/xgifb/vb_setmode.c +4
-5@@ -1741,8 +1741,8 @@ static void XGI_SetCRT2ECLK(unsigned short ModeIdIndex,for (i =0 ; i <4 ; i++) {xgifb_reg_and_or (pVBInfo->P3d4,0x31 , ~0x30 , (unsigned short ) (0x10 * i)); -if ((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) - && (!(pVBInfo->VBInfo & SetInSlaveMode))) { +if ((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) && + (!(pVBInfo->VBInfo & SetInSlaveMode))) {xgifb_reg_set (pVBInfo->P3c4,0x2e , di_0);xgifb_reg_set (pVBInfo->P3c4,0x2f , di_1); }else {@@ -4141,8 +4141,8 @@ static void XGI_SetGroup4(unsigned short ModeIdIndex, | TVSetYPbPr525p | TVSetYPbPr750p | TVSetHiVision))) { temp |=0x0001 ; -if ((pVBInfo->VBInfo & SetInSlaveMode) - && (!(pVBInfo->TVInfo +if ((pVBInfo->VBInfo & SetInSlaveMode) && + (!(pVBInfo->TVInfo & TVSimuMode))) temp &= (~0x0001 ); } --2.9.2
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/d24ac86a8d9d2a7b7cb677f29a8bd920027322b1.1473809551.git.gs051095%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
PATCH 2/6 staging: xgifb: remove unnecessary parentheses
In reply to Gargi SharmaRemoving parentheses that are not required to make the code more readable.
--- drivers/staging/xgifb/vb_setmode.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-)
drivers/staging/xgifb/vb_setmode.c +16 -16
@@ -214,7 +214,7 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeIdIndex,if (!(pVBInfo->VBInfo & TVSetPAL) && (modeflag & NoSupportSimuTV) && (pVBInfo->VBInfo & SetInSlaveMode) && - (!(pVBInfo->VBInfo & SetNotSimuMode))) + !(pVBInfo->VBInfo & SetNotSimuMode))return 0 ; }
@@ -1655,7 +1655,7 @@ static unsigned char XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex, modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;if ((pVBInfo->SetFlag & ProgrammingCRT2) && - (!(pVBInfo->LCDInfo & EnableScalingLCD))) {/* {LCDA/LCDB} */ + !(pVBInfo->LCDInfo & EnableScalingLCD)) {/* {LCDA/LCDB} */ index =XGI_GetLCDCapPtr (pVBInfo); tempal = pVBInfo->LCDCapList[index].LCD_VCLK;
@@ -1716,7 +1716,7 @@ static void XGI_GetVCLKLen(unsigned char tempal, unsigned char *di_0, {if (pVBInfo->VBType & (VB_SIS301 |VB_SIS301B |VB_SIS302B |VB_SIS301LV |VB_SIS302LV |VB_XGI301C )) { -if ((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) && +if (!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) && (pVBInfo->SetFlag & ProgrammingCRT2)) { *di_0 = XGI_VBVCLKData[tempal].Part4_A; *di_1 = XGI_VBVCLKData[tempal].Part4_B;
@@ -1741,8 +1741,8 @@ static void XGI_SetCRT2ECLK(unsigned short ModeIdIndex,for (i =0 ; i <4 ; i++) {xgifb_reg_and_or (pVBInfo->P3d4,0x31 , ~0x30 , (unsigned short ) (0x10 * i)); -if ((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) && - (!(pVBInfo->VBInfo & SetInSlaveMode))) { +if (!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) && + !(pVBInfo->VBInfo & SetInSlaveMode)) {xgifb_reg_set (pVBInfo->P3c4,0x2e , di_0);xgifb_reg_set (pVBInfo->P3c4,0x2f , di_1); }else {
@@ -1986,7 +1986,7 @@ static void XGI_GetVBInfo(unsigned short ModeIdIndex, }if (!(tempbx & DisableCRT2Display)) { -if ((!(tempbx & DriverMode)) || (!(modeflag & CRT2Mode))) { +if (!(tempbx & DriverMode) || !(modeflag & CRT2Mode)) {if (!(tempbx & XGI_SetCRT2ToLCDA)) tempbx |= (SetInSlaveMode | SetSimuScanMode); }
@@ -2132,7 +2132,7 @@ static unsigned char XGI_GetLCDInfo(unsigned short ModeIdIndex,if ((pVBInfo->LCDResInfo == Panel_1400x1050) && (pVBInfo->VBInfo & SetCRT2ToLCD) && (resinfo ==9 ) && - (!(tempbx & EnableScalingLCD))) + !(tempbx & EnableScalingLCD))/* * set to center in 1280x1024 LCDB * for Panel_1400x1050
@@ -3922,7 +3922,7 @@ static void XGI_SetTap4Regs(struct vb_device_info *pVBInfo)xgifb_reg_set (pVBInfo->Part2Port, i, Tap4TimingPtr->Reg[j]);if ((pVBInfo->VBInfo & SetCRT2ToTV) && - (!(pVBInfo->VBInfo & SetCRT2ToHiVision))) { + !(pVBInfo->VBInfo & SetCRT2ToHiVision)) {/* Set Vertical Scaling */ Tap4TimingPtr =XGI_GetTap4Ptr (1 , pVBInfo);for (i =0xC0 , j =0 ; i <0xFF ; i++, j++)
@@ -3932,7 +3932,7 @@ static void XGI_SetTap4Regs(struct vb_device_info *pVBInfo) }if ((pVBInfo->VBInfo & SetCRT2ToTV) && - (!(pVBInfo->VBInfo & SetCRT2ToHiVision))) + !(pVBInfo->VBInfo & SetCRT2ToHiVision))/* Enable V.Scaling */ xgifb_reg_and_or (pVBInfo->Part2Port,0x4E , ~0x14 ,0x04 );else
@@ -4142,8 +4142,8 @@ static void XGI_SetGroup4(unsigned short ModeIdIndex, | TVSetHiVision))) { temp |=0x0001 ;if ((pVBInfo->VBInfo & SetInSlaveMode) && - (!(pVBInfo->TVInfo - & TVSimuMode))) + !(pVBInfo->TVInfo + & TVSimuMode)) temp &= (~0x0001 ); } }
@@ -4476,7 +4476,7 @@ static void XGI_DisableBridge(struct xgifb_video_info *xgifb_info,if ((pVBInfo->VBInfo & (DisableCRT2Display | SetSimuScanMode)) || - ((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) && + (!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) && (pVBInfo->VBInfo & (SetCRT2ToRAMDAC | SetCRT2ToLCD | SetCRT2ToTV))))xgifb_reg_or (pVBInfo->Part1Port,0x00 ,0x80 );
@@ -4587,7 +4587,7 @@ static void XGI_GetTVPtrIndex2(unsigned short *tempbx, unsigned char *tempcl,if (pVBInfo->VBType & (VB_SIS301B |VB_SIS302B |VB_SIS301LV |VB_SIS302LV |VB_XGI301C )) { -if ((!(pVBInfo->VBInfo & SetInSlaveMode)) || (pVBInfo->TVInfo +if (!(pVBInfo->VBInfo & SetInSlaveMode) || (pVBInfo->TVInfo & TVSimuMode)) { *tempbx +=8 ; *tempcl +=1 ;
@@ -4988,8 +4988,8 @@ reg_and_or:if (pVBInfo->VBInfo & (SetCRT2ToRAMDAC | SetCRT2ToTV | SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) { tempah &= (~0x08 ); -if ((pVBInfo->ModeType == ModeVGA) && (!(pVBInfo->VBInfo - & SetInSlaveMode))) { +if ((pVBInfo->ModeType == ModeVGA) && !(pVBInfo->VBInfo + & SetInSlaveMode)) { tempah |=0x010 ; } tempah |=0x080 ;
@@ -5486,7 +5486,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,XGI_DisableBridge (xgifb_info, HwDeviceExtension, pVBInfo);if (pVBInfo->VBInfo & (SetSimuScanMode | XGI_SetCRT2ToLCDA) || - (!(pVBInfo->VBInfo & SwitchCRT2))) { + !(pVBInfo->VBInfo & SwitchCRT2)) {XGI_SetCRT1Group (xgifb_info, HwDeviceExtension, ModeNo, ModeIdIndex, pVBInfo);
Signature · 1 line
2.9.2
Re: [Outreachy kernel] [PATCH 2/6] staging: xgifb: remove unnecessary parentheses
Quoted 2 lines · Gargi Sharma
Removing parentheses that are not required to make the code more readable.
Use the imperative. Removing -> Remove. Also, you could give some information about why the change is OK. "! has higher priority than && or ||, so remove parentheses around ! expressions to make the code more readable."
julia
Quoted 143 lines
Signed-off-by Gargi Sharma <[email protected]>--- drivers/staging/xgifb/vb_setmode.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-)drivers/staging/xgifb/vb_setmode.c +16
-17@@ -214,7 +214,7 @@ static unsigned char XGI_AjustCRT2Rate(unsigned short ModeIdIndex,if (!(pVBInfo->VBInfo & TVSetPAL) && (modeflag & NoSupportSimuTV) && (pVBInfo->VBInfo & SetInSlaveMode) && - (!(pVBInfo->VBInfo & SetNotSimuMode))) + !(pVBInfo->VBInfo & SetNotSimuMode))return 0 ; }@@ -1655,7 +1655,7 @@ static unsigned char XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex, modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;if ((pVBInfo->SetFlag & ProgrammingCRT2) && - (!(pVBInfo->LCDInfo & EnableScalingLCD))) {/* {LCDA/LCDB} */ + !(pVBInfo->LCDInfo & EnableScalingLCD)) {/* {LCDA/LCDB} */ index =XGI_GetLCDCapPtr (pVBInfo); tempal = pVBInfo->LCDCapList[index].LCD_VCLK;@@ -1716,7 +1716,7 @@ static void XGI_GetVCLKLen(unsigned char tempal, unsigned char *di_0, {if (pVBInfo->VBType & (VB_SIS301 |VB_SIS301B |VB_SIS302B |VB_SIS301LV |VB_SIS302LV |VB_XGI301C )) { -if ((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) && +if (!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) && (pVBInfo->SetFlag & ProgrammingCRT2)) { *di_0 = XGI_VBVCLKData[tempal].Part4_A; *di_1 = XGI_VBVCLKData[tempal].Part4_B;@@ -1741,8 +1741,8 @@ static void XGI_SetCRT2ECLK(unsigned short ModeIdIndex,for (i =0 ; i <4 ; i++) {xgifb_reg_and_or (pVBInfo->P3d4,0x31 , ~0x30 , (unsigned short ) (0x10 * i)); -if ((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) && - (!(pVBInfo->VBInfo & SetInSlaveMode))) { +if (!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) && + !(pVBInfo->VBInfo & SetInSlaveMode)) {xgifb_reg_set (pVBInfo->P3c4,0x2e , di_0);xgifb_reg_set (pVBInfo->P3c4,0x2f , di_1); }else {@@ -1986,7 +1986,7 @@ static void XGI_GetVBInfo(unsigned short ModeIdIndex, }if (!(tempbx & DisableCRT2Display)) { -if ((!(tempbx & DriverMode)) || (!(modeflag & CRT2Mode))) { +if (!(tempbx & DriverMode) || !(modeflag & CRT2Mode)) {if (!(tempbx & XGI_SetCRT2ToLCDA)) tempbx |= (SetInSlaveMode | SetSimuScanMode); }@@ -2132,7 +2132,7 @@ static unsigned char XGI_GetLCDInfo(unsigned short ModeIdIndex,if ((pVBInfo->LCDResInfo == Panel_1400x1050) && (pVBInfo->VBInfo & SetCRT2ToLCD) && (resinfo ==9 ) && - (!(tempbx & EnableScalingLCD))) + !(tempbx & EnableScalingLCD))/* * set to center in 1280x1024 LCDB * for Panel_1400x1050 @@ -3922,7 +3922,7 @@ static void XGI_SetTap4Regs(struct vb_device_info *pVBInfo)xgifb_reg_set (pVBInfo->Part2Port, i, Tap4TimingPtr->Reg[j]);if ((pVBInfo->VBInfo & SetCRT2ToTV) && - (!(pVBInfo->VBInfo & SetCRT2ToHiVision))) { + !(pVBInfo->VBInfo & SetCRT2ToHiVision)) {/* Set Vertical Scaling */ Tap4TimingPtr =XGI_GetTap4Ptr (1 , pVBInfo);for (i =0xC0 , j =0 ; i <0xFF ; i++, j++)@@ -3932,7 +3932,7 @@ static void XGI_SetTap4Regs(struct vb_device_info *pVBInfo) }if ((pVBInfo->VBInfo & SetCRT2ToTV) && - (!(pVBInfo->VBInfo & SetCRT2ToHiVision))) + !(pVBInfo->VBInfo & SetCRT2ToHiVision))/* Enable V.Scaling */ xgifb_reg_and_or (pVBInfo->Part2Port,0x4E , ~0x14 ,0x04 );else @@ -4142,8 +4142,8 @@ static void XGI_SetGroup4(unsigned short ModeIdIndex, | TVSetHiVision))) { temp |=0x0001 ;if ((pVBInfo->VBInfo & SetInSlaveMode) && - (!(pVBInfo->TVInfo - & TVSimuMode))) + !(pVBInfo->TVInfo + & TVSimuMode)) temp &= (~0x0001 ); } }@@ -4476,7 +4476,7 @@ static void XGI_DisableBridge(struct xgifb_video_info *xgifb_info,if ((pVBInfo->VBInfo & (DisableCRT2Display | SetSimuScanMode)) || - ((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) && + (!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) && (pVBInfo->VBInfo & (SetCRT2ToRAMDAC | SetCRT2ToLCD | SetCRT2ToTV))))xgifb_reg_or (pVBInfo->Part1Port,0x00 ,0x80 );@@ -4587,7 +4587,7 @@ static void XGI_GetTVPtrIndex2(unsigned short *tempbx, unsigned char *tempcl,if (pVBInfo->VBType & (VB_SIS301B |VB_SIS302B |VB_SIS301LV |VB_SIS302LV |VB_XGI301C )) { -if ((!(pVBInfo->VBInfo & SetInSlaveMode)) || (pVBInfo->TVInfo +if (!(pVBInfo->VBInfo & SetInSlaveMode) || (pVBInfo->TVInfo & TVSimuMode)) { *tempbx +=8 ; *tempcl +=1 ;@@ -4988,8 +4988,8 @@ reg_and_or:if (pVBInfo->VBInfo & (SetCRT2ToRAMDAC | SetCRT2ToTV | SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) { tempah &= (~0x08 ); -if ((pVBInfo->ModeType == ModeVGA) && (!(pVBInfo->VBInfo - & SetInSlaveMode))) { +if ((pVBInfo->ModeType == ModeVGA) && !(pVBInfo->VBInfo + & SetInSlaveMode)) { tempah |=0x010 ; } tempah |=0x080 ;@@ -5486,7 +5486,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,XGI_DisableBridge (xgifb_info, HwDeviceExtension, pVBInfo);if (pVBInfo->VBInfo & (SetSimuScanMode | XGI_SetCRT2ToLCDA) || - (!(pVBInfo->VBInfo & SwitchCRT2))) { + !(pVBInfo->VBInfo & SwitchCRT2)) {XGI_SetCRT1Group (xgifb_info, HwDeviceExtension, ModeNo, ModeIdIndex, pVBInfo); --2.9.2
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/02a0ec389a5db28823bcd41829bc83b346df13dc.1473809551.git.gs051095%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
PATCH 3/6 staging: xgifb: remove blank line after open brace
In reply to Gargi SharmaFixes the check patch issue, Blank lines aren't necessary after an open brace '{'.
--- drivers/staging/xgifb/vb_setmode.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/staging/xgifb/vb_setmode.c +0 -6
@@ -1647,7 +1647,6 @@ static void XGI_GetLCDVCLKPtr(unsigned char *di_0, unsigned char *di_1,static unsigned char XGI_GetVCLKPtr (unsigned short RefreshRateTableIndex,unsigned short ModeIdIndex,struct vb_device_info *pVBInfo) { -unsigned short index, modeflag;unsigned char tempal;
@@ -2291,7 +2290,6 @@ static void XGI_DisplayOn(struct xgifb_video_info *xgifb_info,struct xgi_hw_device_info *pXGIHWDE, struct vb_device_info *pVBInfo) { - xgifb_reg_and_or(pVBInfo->P3c4, 0x01, 0xDF, 0x00);if (pXGIHWDE->jChipType ==XG21 ) {if (pVBInfo->IF_DEF_LVDS ==1 ) {
@@ -2338,7 +2336,6 @@ void XGI_DisplayOff(struct xgifb_video_info *xgifb_info, struct xgi_hw_device_info *pXGIHWDE, struct vb_device_info *pVBInfo) { -if (pXGIHWDE->jChipType ==XG21 ) {if (pVBInfo->IF_DEF_LVDS ==1 ) {/* LVDS backlight off */
@@ -2455,7 +2452,6 @@ exit:static unsigned char XGI_IsLCDDualLink (struct vb_device_info *pVBInfo) { -if ((pVBInfo->VBInfo & (SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) && (pVBInfo->LCDInfo & SetLCDDualLink))/* shampoo0129 */ return 1 ;
@@ -4389,7 +4385,6 @@ static void xgifb_set_lvds(struct xgifb_video_info *xgifb_info, (value << 2) & 0x7C);for (temp =0 , value =0 ; temp <3 ; temp++) { -xgifb_reg_and_or (pVBInfo->P3c4,0x31 , ~0x30 , value);xgifb_reg_set (pVBInfo->P3c4,0x2B , xgifb_info->lvds_data.VCLKData1);
@@ -5416,7 +5411,6 @@ static void XGI_SetCRT1Group(struct xgifb_video_info *xgifb_info,if (HwDeviceExtension->jChipType >=XG21 ) { temp =xgifb_reg_get (pVBInfo->P3d4,0x38 );if (temp &0xA0 ) { -if (HwDeviceExtension->jChipType ==XG27 )XGI_SetXG27CRTC (RefreshRateTableIndex, pVBInfo);else
Signature · 1 line
2.9.2
PATCH 4/6 staging: xgifb: add spaces around |
In reply to Gargi SharmaFixed the checkpatch issue spaces preferred around that '|'.
--- drivers/staging/xgifb/vb_setmode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/xgifb/vb_setmode.c +1 -1
@@ -1914,7 +1914,7 @@ static void XGI_GetVBInfo(unsigned short ModeIdIndex, } } -if (pVBInfo->VBType & (VB_SIS301LV |VB_SIS302LV |VB_XGI301C )) { +if (pVBInfo->VBType & (VB_SIS301LV |VB_SIS302LV |VB_XGI301C )) {if (temp & SetYPbPr) {/* shampoo add for new scratch */ temp =xgifb_reg_get (pVBInfo->P3d4,0x35 );
Signature · 1 line
2.9.2
PATCH 5/6 staging: xgifb: remove blank line before closing brace
In reply to Gargi SharmaFixes the checkpatch issue Blank lines aren't necessary before a close brace '}'.
--- drivers/staging/xgifb/vb_setmode.c | 7 ------- 1 file changed, 7 deletions(-)
drivers/staging/xgifb/vb_setmode.c +0 -7
@@ -1677,7 +1677,6 @@ static unsigned char XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex,if (!(modeflag & Charx8Dot)) tempal =TVCLKBASE_315 + HiTVTextVCLK; - }return tempal; }
@@ -2244,7 +2243,6 @@ static void XGI_XG21BLSignalVDD(unsigned short tempbh, unsigned short tempbl,/* CR B4[1] */ xgifb_reg_and_or (pVBInfo->P3d4,0xB4 , ~0x02 , temp); - } temp =xgifb_reg_get (pVBInfo->P3d4,0x48 );
@@ -2273,7 +2271,6 @@ static void XGI_XG27BLSignalVDD(unsigned short tempbh, unsigned short tempbl,/* CR B4[1] */ xgifb_reg_and_or (pVBInfo->P3d4,0xB4 , ~0x02 , temp); - }xgifb_reg_and_or (pVBInfo->P3d4,0xB4 , ~tempbh0, tempbl0);
@@ -2308,7 +2305,6 @@ static void XGI_DisplayOn(struct xgifb_video_info *xgifb_info,/* DVO/DVI signal on */ XGI_XG21BLSignalVDD (0x20 ,0x20 , pVBInfo); } - }if (pXGIHWDE->jChipType ==XG27 ) {
@@ -2328,7 +2324,6 @@ static void XGI_DisplayOn(struct xgifb_video_info *xgifb_info,/* DVO/DVI signal on */ XGI_XG27BLSignalVDD (0x20 ,0x20 , pVBInfo); } - } }
@@ -4128,7 +4123,6 @@ static void XGI_SetGroup4(unsigned short ModeIdIndex,if (pVBInfo->VBInfo & (SetCRT2ToTV | SetCRT2ToHiVision)) {if (pVBInfo->VGAHDE >800 )xgifb_reg_or (pVBInfo->Part4Port,0x1E ,0x08 ); - } temp =0x0036 ;
@@ -4404,7 +4398,6 @@ static void xgifb_set_lvds(struct xgifb_video_info *xgifb_info,inb (pVBInfo->P3da);/* reset 3da */ } - }/* --------------------------------------------------------------------- */
Signature · 1 line
2.9.2
PATCH 6/6 staging: xgifb: fix alignment for if arguments
In reply to Gargi SharmaFixing alignment of arguments inside if clause for better readability.
--- drivers/staging/xgifb/vb_setmode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/xgifb/vb_setmode.c +2 -3
@@ -1740,7 +1740,7 @@ static void XGI_SetCRT2ECLK(unsigned short ModeIdIndex,xgifb_reg_and_or (pVBInfo->P3d4,0x31 , ~0x30 , (unsigned short ) (0x10 * i));if (!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) && - !(pVBInfo->VBInfo & SetInSlaveMode)) { + !(pVBInfo->VBInfo & SetInSlaveMode)) {xgifb_reg_set (pVBInfo->P3c4,0x2e , di_0);xgifb_reg_set (pVBInfo->P3c4,0x2f , di_1); }else {
@@ -4132,8 +4132,7 @@ static void XGI_SetGroup4(unsigned short ModeIdIndex, | TVSetHiVision))) { temp |=0x0001 ;if ((pVBInfo->VBInfo & SetInSlaveMode) && - !(pVBInfo->TVInfo - & TVSimuMode)) + !(pVBInfo->TVInfo & TVSimuMode)) temp &= (~0x0001 ); } }
Signature · 1 line
2.9.2
Re: [Outreachy kernel] [PATCH 6/6] staging: xgifb: fix alignment for if arguments
Quoted 1 line · Gargi Sharma
Fixing alignment of arguments inside if clause for better readability.
Here it would be better to say what strategy you have used to make it better. For example, Line up multi-line if-test arguments for better readability.
julia
Quoted 39 lines
Signed-off-by Gargi Sharma <[email protected]>--- drivers/staging/xgifb/vb_setmode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/staging/xgifb/vb_setmode.c +2
-4@@ -1740,7 +1740,7 @@ static void XGI_SetCRT2ECLK(unsigned short ModeIdIndex,xgifb_reg_and_or (pVBInfo->P3d4,0x31 , ~0x30 , (unsigned short ) (0x10 * i));if (!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) && - !(pVBInfo->VBInfo & SetInSlaveMode)) { + !(pVBInfo->VBInfo & SetInSlaveMode)) {xgifb_reg_set (pVBInfo->P3c4,0x2e , di_0);xgifb_reg_set (pVBInfo->P3c4,0x2f , di_1); }else {@@ -4132,8 +4132,7 @@ static void XGI_SetGroup4(unsigned short ModeIdIndex, | TVSetHiVision))) { temp |=0x0001 ;if ((pVBInfo->VBInfo & SetInSlaveMode) && - !(pVBInfo->TVInfo - & TVSimuMode)) + !(pVBInfo->TVInfo & TVSimuMode)) temp &= (~0x0001 ); } } --2.9.2
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/97cf53983f2ba686aaef71701f345b06b31be508.1473809551.git.gs051095%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 1 line · Gargi Sharma
This patchset fixes various issues that come up in the checkpatch in patch 1, 3, 4 and 5. Patches 2 and 6 are based on Julia's suggestion when a one patch was sent fixing the checkpatch issue of moving && operator to previous line.
This is actually a v2, because eg the first one was sent already.
julia
Quoted 22 lines
Gargi Sharma (6):
staging: xgifb: move AND operator for logical continuation
staging: xgifb: remove unnecessary parentheses
staging: xgifb: remove blank line after open brace
staging: xgifb: add spaces around |
staging: xgifb: remove blank line before closing brace
staging: xgifb: fix alignment for if argumentsdrivers/staging/xgifb/vb_setmode.c | 48 ++++++++++++++------------------------ 1 file changed, 17 insertions(+), 31 deletions(-)--
2.9.2--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1473809550.git.gs051095%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Hi
Quoted 4 lines · Julia Lawall
Quoted 1 line · Gargi Sharma
This patchset fixes various issues that come up in the checkpatch in
patch 1, 3, 4 and 5. Patches 2 and 6 are based on Julia's suggestion when a one patch was sent fixing the checkpatch issue of moving && operator to previous line.
Quoted 2 lines
This is actually a v2, because eg the first one was sent already.
I'm sorry for all the stupid question but will the revision patches I send now to correct the commit subjects be v3 ?
Thanks,
gargi
Quoted 13 lines
julia
Quoted 10 lines
Gargi Sharma (6):
staging: xgifb: move AND operator for logical continuation
staging: xgifb: remove unnecessary parentheses
staging: xgifb: remove blank line after open brace
staging: xgifb: add spaces around |
staging: xgifb: remove blank line before closing brace
staging: xgifb: fix alignment for if argumentsdrivers/staging/xgifb/vb_setmode.c | 48 ++++++++++++++----------------
--------
Quoted 7 lines
Quoted 7 lines
1 file changed, 17 insertions(+), 31 deletions(-)--
2.9.2--
You received this message because you are subscribed to the Google
Groups "outreachy-kernel" group.
Quoted 1 line
Quoted 1 line
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
Quoted 2 lines
Quoted 2 lines
To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/
msgid/outreachy-kernel/cover.1473809550.git.gs051095%40gmail.com.
Quoted 2 lines
Quoted 2 lines
For more options, visit https://groups.google.com/d/optout.
Quoted 10 lines · Gargi Sharma
Hi
Quoted 8 lines · Julia Lawall
Quoted 4 lines · Gargi Sharma
This patchset fixes various issues that come up in the checkpatch in patch 1, 3, 4 and 5. Patches 2 and 6 are based on Julia's suggestion when a one patch was sent fixing the checkpatch issue of moving && operator to previous line.
Quoted 4 lines
Quoted 1 line
This is actually a v2, because eg the first one was sent already.
I'm sorry for all the stupid question but will the revision patches I send now to correct the commit subjects be v3 ?
Yes, with explaining changes since last 2 versions under --- .
Quoted 42 lines
Thanks,
gargiQuoted 29 lines
julia
Quoted 26 lines
Gargi Sharma (6):
staging: xgifb: move AND operator for logical continuation
staging: xgifb: remove unnecessary parentheses
staging: xgifb: remove blank line after open brace
staging: xgifb: add spaces around |
staging: xgifb: remove blank line before closing brace
staging: xgifb: fix alignment for if argumentsdrivers/staging/xgifb/vb_setmode.c | 48 ++++++++++++++------------------------ 1 file changed, 17 insertions(+), 31 deletions(-)--
2.9.2--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit
https://groups.google.com/d/msgid/outreachy-kernel/cover.1473809550.git.gs051095%40gmail.com.
For more options, visit https://groups.google.com/d/optout.--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected]. To view this discussion on the web visit
https://groups.google.com/d/msgid/outreachy-kernel/CAOCi2DFsEPQjsn8Ua60A7vbYbeUiqO6Z1R_6i_Pk5pLQQB7KVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Signature · 2 lines
Vaishali http://vaishalithakkar.in/