Skip to contentSkip to conversation

staging: wilc1000: Align the code

PATCH In review Tamara Diaconita 2 participants 2 messages Mar 9, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: wilc1000: Align the code

Deleted tabs and added spaces to align the code.

Fixed the checkpath.pl issue:
CHECK: Aligment should match open paranthesis.

---
Changes since v1:
*Changed the subject of the patch from "staging: speakup: wilc1000" to "staging: wilc1000".

 drivers/staging/wilc1000/linux_wlan.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/wilc1000/linux_wlan.c +4 -4
index 2eebc62..c65c5e8 100644
@@ -870,12 +870,12 @@ static int wilc_mac_open(struct net_device *ndev)
 				if (memcmp(wl->vif[i ^ 1]->bssid,
 					   wl->vif[i ^ 1]->src_addr, 6))
 					wilc_set_wfi_drv_handler(vif,
-							 wilc_get_vif_idx(vif),
-							 0);
+								 wilc_get_vif_idx(vif),
+								 0);
 				else
 					wilc_set_wfi_drv_handler(vif,
-							 wilc_get_vif_idx(vif),
-							 1);
+								 wilc_get_vif_idx(vif),
+								 1);
 			}
 			wilc_set_operation_mode(vif, vif->iftype);
 
Signature · 1 line
2.9.3
#1 lore raw
Quoted 6 lines · Tamara Diaconita

Deleted tabs and added spaces to align the code.

Fixed the checkpath.pl issue:
CHECK: Aligment should match open paranthesis.

Hi Tamara,

I ran the update post-commit hook on this and it catches some of the typo's in the commit message:

CHECK: 'Aligment' may be misspelled - perhaps 'Alignment'? #9: FILE: temp:9:
+CHECK: Aligment should match open paranthesis.

CHECK: 'paranthesis' may be misspelled - perhaps 'parenthesis'? #9: FILE: temp:9:
+CHECK: Aligment should match open paranthesis.

See the first patch tutorial for how to do it automagically, or else do it manually before you submit.

In the code, can the if/else segment in question be modified to have one more else if and avoid excessive indentation.

change this:

	if	
	} else if
	} else {
		if
		else
	}

to this:

	if	
	} else if
	} else if
	} else
	}

Yikes..that was awkward to write. See if it makes sense in the code.

alisons

Quoted 36 lines

---
Changes since v1:
*Changed the subject of the patch from "staging: speakup: wilc1000" to "staging: wilc1000".

 drivers/staging/wilc1000/linux_wlan.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/wilc1000/linux_wlan.c +4 -4
index 2eebc62..c65c5e8 100644
@@ -870,12 +870,12 @@ static int wilc_mac_open(struct net_device *ndev)
 				if (memcmp(wl->vif[i ^ 1]->bssid,
 					   wl->vif[i ^ 1]->src_addr, 6))
 					wilc_set_wfi_drv_handler(vif,
-							 wilc_get_vif_idx(vif),
-							 0);
+								 wilc_get_vif_idx(vif),
+								 0);
 				else
 					wilc_set_wfi_drv_handler(vif,
-							 wilc_get_vif_idx(vif),
-							 1);
+								 wilc_get_vif_idx(vif),
+								 1);
 			}
 			wilc_set_operation_mode(vif, vif->iftype);
 
Signature · 8 lines
2.9.3

-- 
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/20170309205748.4422-1-diaconita.tamara%40gmail.com.
For more options, visit https://groups.google.com/d/optout.