Skip to contentSkip to conversation

staging: wilc1000: move open brace in line with control flow statement

PATCH Superseded Alison Schofield 2 participants 3 messages Oct 9, 2015 – Oct 12, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: wilc1000: move open brace in line with control flow statement

Move open braces to be in line with "if" control flow statements. Addresses checkpatch.pl:
ERROR: that open brace { should be on the previous line

---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +6 -6
index 6472777..bf65038 100644
@@ -1476,8 +1476,8 @@ static int get_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
 	priv = wiphy_priv(wiphy);
 
 
-	if (!pairwise)
-	{
+	if (!pairwise) {
+
 		PRINT_D(CFG80211_DBG, "Getting group key idx: %x\n", key_index);
 
 		key_params.key = priv->wilc_gtk[key_index]->key;
@@ -1855,8 +1855,8 @@ void WILC_WFI_CfgParseRxAction(u8 *buf, u32 len)
 		index += buf[index + 1] + 3; /* ID,Length byte */
 	}
 
-	if (u8WLANChannel != INVALID_CHANNEL)
-	{
+	if (u8WLANChannel != INVALID_CHANNEL) {
+
 		/*Modify channel list attribute*/
 		if (channel_list_attr_index) {
 			PRINT_D(GENERIC_DBG, "Modify channel list attribute\n");
@@ -1910,8 +1910,8 @@ void WILC_WFI_CfgParseTxAction(u8 *buf, u32 len, bool bOperChan, u8 iftype)
 		index += buf[index + 1] + 3; /* ID,Length byte */
 	}
 
-	if (u8WLANChannel != INVALID_CHANNEL && bOperChan)
-	{
+	if (u8WLANChannel != INVALID_CHANNEL && bOperChan) {
+
 		/*Modify channel list attribute*/
 		if (channel_list_attr_index) {
 			PRINT_D(GENERIC_DBG, "Modify channel list attribute\n");
Signature · 1 line
2.1.4
#1 lore raw
Quoted 14 lines · Alison Schofield

Move open braces to be in line with "if" control flow statements. Addresses checkpatch.pl:
ERROR: that open brace { should be on the previous line

---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +0 -0
index 6472777..bf65038 100644

drivers/staging/wilc1000/wilc_wfi_cfgoperations.c static int get_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, · line 1480

Quoted 7 lines
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +2 -2
@@ -1476,8 +1476,8 @@ static int get_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
 	priv = wiphy_priv(wiphy);
 
 
-	if (!pairwise)
-	{
+	if (!pairwise) {
+

This patch will be introducing new checkpatch warning of:
Blank lines aren't necessary after an open brace '{'.

The blank lines after the brace is not required.

regards
sudip

#2 lore raw

PATCH v2 1/1 staging: wilc1000: move open brace in line with control flow statement

In reply to Alison Schofield

Move open braces to be in line with "if" control flow statements. Addresses checkpatch.pl:
ERROR: that open brace { should be on the previous line

---

Changes in v2: removed blank lines after open braces

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +3 -6
index 6472777..906700f 100644
@@ -1476,8 +1476,7 @@ static int get_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
 	priv = wiphy_priv(wiphy);
 
 
-	if (!pairwise)
-	{
+	if (!pairwise) {
 		PRINT_D(CFG80211_DBG, "Getting group key idx: %x\n", key_index);
 
 		key_params.key = priv->wilc_gtk[key_index]->key;
@@ -1854,9 +1853,8 @@ void WILC_WFI_CfgParseRxAction(u8 *buf, u32 len)
 			op_channel_attr_index = index;
 		index += buf[index + 1] + 3; /* ID,Length byte */
 	}
+	if (u8WLANChannel != INVALID_CHANNEL) {
 
-	if (u8WLANChannel != INVALID_CHANNEL)
-	{
 		/*Modify channel list attribute*/
 		if (channel_list_attr_index) {
 			PRINT_D(GENERIC_DBG, "Modify channel list attribute\n");
@@ -1909,9 +1907,8 @@ void WILC_WFI_CfgParseTxAction(u8 *buf, u32 len, bool bOperChan, u8 iftype)
 			op_channel_attr_index = index;
 		index += buf[index + 1] + 3; /* ID,Length byte */
 	}
+	if (u8WLANChannel != INVALID_CHANNEL && bOperChan) {
 
-	if (u8WLANChannel != INVALID_CHANNEL && bOperChan)
-	{
 		/*Modify channel list attribute*/
 		if (channel_list_attr_index) {
 			PRINT_D(GENERIC_DBG, "Modify channel list attribute\n");
Signature · 1 line
2.1.4