Skip to contentSkip to conversation

staging: xgifb: add braces around if statement

PATCH Superseded Gargi Sharma 3 participants 3 messages Feb 16, 2017 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: xgifb: add braces around if statement

add braces around if statment to fix the checkpatch issue, braces {} should be used on all arms of this statement.

---
 drivers/staging/xgifb/XGI_main_26.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/xgifb/XGI_main_26.c +2 -1
index 6930f7e..6d8120d 100644
@@ -178,8 +178,9 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
 		*sync |= FB_SYNC_HOR_HIGH_ACT;
 
 	*vmode = FB_VMODE_NONINTERLACED;
-	if (XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x0080)
+	if (XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x0080) {
 		*vmode = FB_VMODE_INTERLACED;
+	}
 	else {
 		j = 0;
 		while (XGI330_EModeIDTable[j].Ext_ModeID != 0xff) {
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Gargi Sharma

add braces around if statment to fix the checkpatch issue, braces {} should be used on all arms of this statement.

Looks good. Congratulations on sending the first patch of this round :)

Quoted 29 lines
---
 drivers/staging/xgifb/XGI_main_26.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/xgifb/XGI_main_26.c +2 -2
index 6930f7e..6d8120d 100644
@@ -178,8 +178,9 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
 		*sync |= FB_SYNC_HOR_HIGH_ACT;
 
 	*vmode = FB_VMODE_NONINTERLACED;
-	if (XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x0080)
+	if (XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x0080) {
 		*vmode = FB_VMODE_INTERLACED;
+	}
 	else {
 		j = 0;
 		while (XGI330_EModeIDTable[j].Ext_ModeID != 0xff) {
--

2.7.4

--
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/1487238803-24600-1-git-send-email-gs051095%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

maintainer
#2 lore raw
In reply to Gargi Sharma
Quoted 13 lines · Gargi Sharma

add braces around if statment to fix the checkpatch issue, braces {} should be used on all arms of this statement.

---
 drivers/staging/xgifb/XGI_main_26.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/xgifb/XGI_main_26.c +0 -0
index 6930f7e..6d8120d 100644

drivers/staging/xgifb/XGI_main_26.c static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, · line 184

Quoted 8 lines
drivers/staging/xgifb/XGI_main_26.c +2 -1
@@ -178,8 +178,9 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
 		*sync |= FB_SYNC_HOR_HIGH_ACT;
 
 	*vmode = FB_VMODE_NONINTERLACED;
-	if (XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x0080)
+	if (XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x0080) {
 		*vmode = FB_VMODE_INTERLACED;
+	}
 	else {

That line really should look like:

	} else {

right?

Can you please fix that up and send a "v2" of this patch?

thanks,

greg k-h