* [PATCH v3 0/6] clean up of xgifb/vb_setmode.c
@ 2016-09-14 21:30 Gargi Sharma
2016-09-14 21:30 ` [PATCH v3 1/6] staging: xgifb: move AND operator for logical continuation Gargi Sharma
` (5 more replies)
0 siblings, 6 replies; 9+ messages in thread
From: Gargi Sharma @ 2016-09-14 21:30 UTC (permalink / raw)
To: outreachy-kernel; +Cc: arnaud.patard, gregkh, Gargi Sharma
The following patchset contains patches to make the code more readable. 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.
---
Changes since v2:
reword commit messages in all patches to explain the solution and use imperative form for the commit subject.
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(-)
--
2.9.2
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3 1/6] staging: xgifb: move AND operator for logical continuation
2016-09-14 21:30 [PATCH v3 0/6] clean up of xgifb/vb_setmode.c Gargi Sharma
@ 2016-09-14 21:30 ` Gargi Sharma
2016-09-14 21:30 ` [PATCH v3 2/6] staging: xgifb: remove unnecessary parentheses Gargi Sharma
` (4 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Gargi Sharma @ 2016-09-14 21:30 UTC (permalink / raw)
To: outreachy-kernel; +Cc: arnaud.patard, gregkh, Gargi Sharma
Move && up to the previous line, to fix the checkpatch issue Logical
continuations should be on the previous line.
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
---
drivers/staging/xgifb/vb_setmode.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
index 50c8ea4..316209f 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 2/6] staging: xgifb: remove unnecessary parentheses
2016-09-14 21:30 [PATCH v3 0/6] clean up of xgifb/vb_setmode.c Gargi Sharma
2016-09-14 21:30 ` [PATCH v3 1/6] staging: xgifb: move AND operator for logical continuation Gargi Sharma
@ 2016-09-14 21:30 ` Gargi Sharma
2016-09-14 21:30 ` [PATCH v3 3/6] staging: xgifb: remove blank line after open brace Gargi Sharma
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Gargi Sharma @ 2016-09-14 21:30 UTC (permalink / raw)
To: outreachy-kernel; +Cc: arnaud.patard, gregkh, Gargi Sharma
! has higher priority than && or ||, so remove parentheses around ! expressions to make the code more
readable.
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
---
drivers/staging/xgifb/vb_setmode.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
index 316209f..af3f4d0 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 3/6] staging: xgifb: remove blank line after open brace
2016-09-14 21:30 [PATCH v3 0/6] clean up of xgifb/vb_setmode.c Gargi Sharma
2016-09-14 21:30 ` [PATCH v3 1/6] staging: xgifb: move AND operator for logical continuation Gargi Sharma
2016-09-14 21:30 ` [PATCH v3 2/6] staging: xgifb: remove unnecessary parentheses Gargi Sharma
@ 2016-09-14 21:30 ` Gargi Sharma
2016-09-14 21:30 ` [PATCH v3 4/6] staging: xgifb: add spaces around | Gargi Sharma
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Gargi Sharma @ 2016-09-14 21:30 UTC (permalink / raw)
To: outreachy-kernel; +Cc: arnaud.patard, gregkh, Gargi Sharma
delete a blank line after an open brace to fix the check patch issue, Blank lines aren't necessary after an open
brace '{'.
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
---
drivers/staging/xgifb/vb_setmode.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
index af3f4d0..41dcc6d3 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -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
--
2.9.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 4/6] staging: xgifb: add spaces around |
2016-09-14 21:30 [PATCH v3 0/6] clean up of xgifb/vb_setmode.c Gargi Sharma
` (2 preceding siblings ...)
2016-09-14 21:30 ` [PATCH v3 3/6] staging: xgifb: remove blank line after open brace Gargi Sharma
@ 2016-09-14 21:30 ` Gargi Sharma
2016-09-14 21:30 ` [PATCH v3 5/6] staging: xgifb: remove blank line before closing brace Gargi Sharma
2016-09-14 21:30 ` [PATCH v3 6/6] staging: xgifb: fix alignment for if arguments Gargi Sharma
5 siblings, 0 replies; 9+ messages in thread
From: Gargi Sharma @ 2016-09-14 21:30 UTC (permalink / raw)
To: outreachy-kernel; +Cc: arnaud.patard, gregkh, Gargi Sharma
insert spaces around '|' to fix the checkpatch issue spaces preferred around that '|'.
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
---
drivers/staging/xgifb/vb_setmode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
index 41dcc6d3..b0ec981 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -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);
--
2.9.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 5/6] staging: xgifb: remove blank line before closing brace
2016-09-14 21:30 [PATCH v3 0/6] clean up of xgifb/vb_setmode.c Gargi Sharma
` (3 preceding siblings ...)
2016-09-14 21:30 ` [PATCH v3 4/6] staging: xgifb: add spaces around | Gargi Sharma
@ 2016-09-14 21:30 ` Gargi Sharma
2016-09-15 5:08 ` [Outreachy kernel] " Julia Lawall
2016-09-14 21:30 ` [PATCH v3 6/6] staging: xgifb: fix alignment for if arguments Gargi Sharma
5 siblings, 1 reply; 9+ messages in thread
From: Gargi Sharma @ 2016-09-14 21:30 UTC (permalink / raw)
To: outreachy-kernel; +Cc: arnaud.patard, gregkh, Gargi Sharma
delete blank line before '}' to fix the checkpatch issue Blank lines aren't necessary before a close
brace '}'.
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
---
drivers/staging/xgifb/vb_setmode.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
index b0ec981..8488612 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -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 */
}
-
}
/* --------------------------------------------------------------------- */
--
2.9.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 6/6] staging: xgifb: fix alignment for if arguments
2016-09-14 21:30 [PATCH v3 0/6] clean up of xgifb/vb_setmode.c Gargi Sharma
` (4 preceding siblings ...)
2016-09-14 21:30 ` [PATCH v3 5/6] staging: xgifb: remove blank line before closing brace Gargi Sharma
@ 2016-09-14 21:30 ` Gargi Sharma
2016-09-15 5:07 ` [Outreachy kernel] " Julia Lawall
5 siblings, 1 reply; 9+ messages in thread
From: Gargi Sharma @ 2016-09-14 21:30 UTC (permalink / raw)
To: outreachy-kernel; +Cc: arnaud.patard, gregkh, Gargi Sharma
Line up multi-line if-test arguments for better
readability.
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
---
drivers/staging/xgifb/vb_setmode.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
index 8488612..068f422 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH v3 6/6] staging: xgifb: fix alignment for if arguments
2016-09-14 21:30 ` [PATCH v3 6/6] staging: xgifb: fix alignment for if arguments Gargi Sharma
@ 2016-09-15 5:07 ` Julia Lawall
0 siblings, 0 replies; 9+ messages in thread
From: Julia Lawall @ 2016-09-15 5:07 UTC (permalink / raw)
To: Gargi Sharma; +Cc: outreachy-kernel, arnaud.patard, gregkh
On Thu, 15 Sep 2016, Gargi Sharma wrote:
> Line up multi-line if-test arguments for better
> readability.
Actually, you didn't line them up. What you did is OK too, but it would
be "Reduce indentation..."
julia
>
> Signed-off-by: Gargi Sharma <gs051095@gmail.com>
> ---
> drivers/staging/xgifb/vb_setmode.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
> index 8488612..068f422 100644
> --- a/drivers/staging/xgifb/vb_setmode.c
> +++ b/drivers/staging/xgifb/vb_setmode.c
> @@ -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 outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/35059e3a8fc71def1989e2b7efc323d95c8800a1.1473888417.git.gs051095%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH v3 5/6] staging: xgifb: remove blank line before closing brace
2016-09-14 21:30 ` [PATCH v3 5/6] staging: xgifb: remove blank line before closing brace Gargi Sharma
@ 2016-09-15 5:08 ` Julia Lawall
0 siblings, 0 replies; 9+ messages in thread
From: Julia Lawall @ 2016-09-15 5:08 UTC (permalink / raw)
To: Gargi Sharma; +Cc: outreachy-kernel, arnaud.patard, gregkh
On Thu, 15 Sep 2016, Gargi Sharma wrote:
> delete blank line before '}' to fix the checkpatch issue Blank lines aren't necessary before a close
> brace '}'.
Lines in the commit message should not go over 80 characters.
julia
>
> Signed-off-by: Gargi Sharma <gs051095@gmail.com>
> ---
> drivers/staging/xgifb/vb_setmode.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
> index b0ec981..8488612 100644
> --- a/drivers/staging/xgifb/vb_setmode.c
> +++ b/drivers/staging/xgifb/vb_setmode.c
> @@ -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 */
> }
> -
> }
>
> /* --------------------------------------------------------------------- */
> --
> 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 outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/197d584fbdce72b6bcdcb969c9dfc963db31035e.1473888417.git.gs051095%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-09-15 5:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-14 21:30 [PATCH v3 0/6] clean up of xgifb/vb_setmode.c Gargi Sharma
2016-09-14 21:30 ` [PATCH v3 1/6] staging: xgifb: move AND operator for logical continuation Gargi Sharma
2016-09-14 21:30 ` [PATCH v3 2/6] staging: xgifb: remove unnecessary parentheses Gargi Sharma
2016-09-14 21:30 ` [PATCH v3 3/6] staging: xgifb: remove blank line after open brace Gargi Sharma
2016-09-14 21:30 ` [PATCH v3 4/6] staging: xgifb: add spaces around | Gargi Sharma
2016-09-14 21:30 ` [PATCH v3 5/6] staging: xgifb: remove blank line before closing brace Gargi Sharma
2016-09-15 5:08 ` [Outreachy kernel] " Julia Lawall
2016-09-14 21:30 ` [PATCH v3 6/6] staging: xgifb: fix alignment for if arguments Gargi Sharma
2016-09-15 5:07 ` [Outreachy kernel] " Julia Lawall
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.