linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: vt6656: iwctl: mop up a few remaining obvious style issues
@ 2012-06-27 19:19 Jesper Juhl
  2012-07-06 23:09 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 11+ messages in thread
From: Jesper Juhl @ 2012-06-27 19:19 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Forest Bond, Marcos Paulo de Souza, devel, linux-kernel, Dan Carpenter

My previous 14 patch series to vt6656 missed a few bits and
pieces. This mops up the last few obvious style issues.
It is quite short and completely trivial - simply deletes a few blank
lines, does some whitespace cleanup around operators and adds a few
curly braces.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 drivers/staging/vt6656/iwctl.c | 35 +++++++++++++++--------------------
 1 file changed, 15 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
index dc24096..a5eeb4f 100644
--- a/drivers/staging/vt6656/iwctl.c
+++ b/drivers/staging/vt6656/iwctl.c
@@ -104,7 +104,7 @@ int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info,
 	PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
 	struct iw_scan_req *req = (struct iw_scan_req *)extra;
 	BYTE abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
-	PWLAN_IE_SSID pItemSSID=NULL;
+	PWLAN_IE_SSID pItemSSID = NULL;
 
 	if (!(pDevice->flags & DEVICE_FLAGS_OPENED))
 		return -EINVAL;
@@ -140,9 +140,9 @@ int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info,
 			if (pItemSSID->abySSID[req->essid_len - 1] == '\0') {
 				if (req->essid_len > 0)
 					pItemSSID->len = req->essid_len - 1;
-			}
-			else
+			} else {
 				pItemSSID->len = req->essid_len;
+			}
 			pMgmt->eScanType = WMAC_SCAN_PASSIVE;
 			PRINT_K("SIOCSIWSCAN:[desired_ssid=%s,len=%d]\n", ((PWLAN_IE_SSID)abyScanSSID)->abySSID,
 				((PWLAN_IE_SSID)abyScanSSID)->len);
@@ -203,7 +203,7 @@ int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info,
 			iwe.cmd = SIOCGIWAP;
 			iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
 			memcpy(iwe.u.ap_addr.sa_data, pBSS->abyBSSID, WLAN_BSSID_LEN);
-			current_ev = iwe_stream_add_event(info,current_ev,end_buf, &iwe, IW_EV_ADDR_LEN);
+			current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_ADDR_LEN);
 			// ADD ssid
 			memset(&iwe, 0, sizeof(iwe));
 			iwe.cmd = SIOCGIWESSID;
@@ -244,7 +244,7 @@ int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info,
 			iwe.u.qual.level = ldBm;
 			iwe.u.qual.noise = 0;
 
-			if (-ldBm<50)
+			if (-ldBm < 50)
 				iwe.u.qual.qual = 100;
 			else  if (-ldBm > 90)
 				iwe.u.qual.qual = 0;
@@ -577,9 +577,9 @@ int iwctl_siwap(struct net_device *dev, struct iw_request_info *info,
 
 	PRINT_K(" SIOCSIWAP \n");
 
-	if (wrq->sa_family != ARPHRD_ETHER)
+	if (wrq->sa_family != ARPHRD_ETHER) {
 		rc = -EINVAL;
-	else {
+	} else {
 		memcpy(pMgmt->abyDesireBSSID, wrq->sa_data, 6);
 		// mike: add
 		if ((is_broadcast_ether_addr(pMgmt->abyDesireBSSID)) ||
@@ -882,8 +882,7 @@ int iwctl_siwrate(struct net_device *dev, struct iw_request_info *info,
 			pDevice->uConnectionRate = brate;
 			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Fixed to Rate %d \n", pDevice->uConnectionRate);
 		}
-	}
-	else {
+	} else {
 		pDevice->bFixRate = FALSE;
 		pDevice->uConnectionRate = 13;
 	}
@@ -965,7 +964,6 @@ int iwctl_giwrts(struct net_device *dev, struct iw_request_info *info,
 	wrq->value = pDevice->wRTSThreshold;
 	wrq->disabled = (wrq->value >= 2312);
 	wrq->fixed = 1;
-
 	return 0;
 }
 
@@ -1004,7 +1002,6 @@ int iwctl_giwfrag(struct net_device *dev, struct iw_request_info *info,
 	wrq->value = pDevice->wFragmentationThreshold;
 	wrq->disabled = (wrq->value >= 2312);
 	wrq->fixed = 1;
-
 	return 0;
 }
 
@@ -1098,7 +1095,6 @@ int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info,
 
 	// Send the key to the card
 	if (wrq->length > 0) {
-
 		if (wrq->length ==  WLAN_WEP232_KEYLEN) {
 			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 232 bit wep key\n");
 		} else if (wrq->length ==  WLAN_WEP104_KEYLEN) {
@@ -1120,8 +1116,7 @@ int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info,
 					dwKeyIndex | (1 << 31),
 					wrq->length, NULL,
 					pDevice->abyKey,
-					KEY_CTL_WEP
-				);
+					KEY_CTL_WEP);
 			spin_unlock_irq(&pDevice->lock);
 		}
 		pDevice->byKeyIndex = (BYTE)dwKeyIndex;
@@ -1205,7 +1200,7 @@ int iwctl_giwencode(struct net_device *dev, struct iw_request_info *info,
 	wrq->length = 0;
 
 	if ((index == 0) && (pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled ||
-				pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled)){ // get wpa pairwise  key
+				pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled)) { // get wpa pairwise key
 		if (KeybGetKey(&(pDevice->sKey), pMgmt->abyCurrBSSID, 0xffffffff, &pKey)) {
 			wrq->length = pKey->uKeyLength;
 			memcpy(abyKey, pKey->abyKey,	pKey->uKeyLength);
@@ -1362,7 +1357,7 @@ int iwctl_siwauth(struct net_device *dev, struct iw_request_info *info,
 		if (pairwise == IW_AUTH_CIPHER_NONE) {
 			if (wrq->value == IW_AUTH_CIPHER_CCMP) {
 				pDevice->eEncryptionStatus = Ndis802_11Encryption3Enabled;
-			}else {
+			} else {
 				pDevice->eEncryptionStatus = Ndis802_11Encryption2Enabled;
 			}
 		}
@@ -1446,7 +1441,7 @@ int iwctl_siwgenie(struct net_device *dev, struct iw_request_info *info,
 			goto out;
 		}
 		pMgmt->wWPAIELen = wrq->length;
-	}else {
+	} else {
 		memset(pMgmt->abyWPAIE, 0, MAX_WPA_IE_LEN);
 		pMgmt->wWPAIELen = 0;
 	}
@@ -1470,8 +1465,9 @@ int iwctl_giwgenie(struct net_device *dev, struct iw_request_info *info,
 			if (copy_to_user(extra, pMgmt->abyWPAIE, pMgmt->wWPAIELen)) {
 				ret = -EFAULT;
 			}
-		} else
+		} else {
 			ret = -E2BIG;
+		}
 	}
 	return ret;
 }
@@ -1624,8 +1620,7 @@ int iwctl_siwmlme(struct net_device *dev, struct iw_request_info *info,
 	case IW_MLME_DISASSOC:
 		if (pDevice->bLinkPass == TRUE) {
 			PRINT_K("iwctl_siwmlme--->send DISASSOCIATE\n");
-			bScheduleCommand((void *)pDevice,
-					WLAN_CMD_DISASSOCIATE,
+			bScheduleCommand((void *)pDevice, WLAN_CMD_DISASSOCIATE,
 					NULL);
 		}
 		break;
-- 
1.7.11.1


-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] staging: vt6656: iwctl: mop up a few remaining obvious style issues
  2012-06-27 19:19 [PATCH] staging: vt6656: iwctl: mop up a few remaining obvious style issues Jesper Juhl
@ 2012-07-06 23:09 ` Greg Kroah-Hartman
  2012-07-07  0:29   ` Jesper Juhl
  0 siblings, 1 reply; 11+ messages in thread
From: Greg Kroah-Hartman @ 2012-07-06 23:09 UTC (permalink / raw)
  To: Jesper Juhl
  Cc: devel, Marcos Paulo de Souza, Forest Bond, Dan Carpenter, linux-kernel

On Wed, Jun 27, 2012 at 09:19:15PM +0200, Jesper Juhl wrote:
> My previous 14 patch series to vt6656 missed a few bits and
> pieces. This mops up the last few obvious style issues.
> It is quite short and completely trivial - simply deletes a few blank
> lines, does some whitespace cleanup around operators and adds a few
> curly braces.
> 
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>

Again, one patch per thing please.  Please break this up into different
patches so it can be accepted.

greg k-h

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] staging: vt6656: iwctl: mop up a few remaining obvious style issues
  2012-07-06 23:09 ` Greg Kroah-Hartman
@ 2012-07-07  0:29   ` Jesper Juhl
  2012-07-08 22:58     ` [PATCH 0/3][v2] " Jesper Juhl
  0 siblings, 1 reply; 11+ messages in thread
From: Jesper Juhl @ 2012-07-07  0:29 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Marcos Paulo de Souza, Forest Bond, Dan Carpenter, linux-kernel

On Fri, 6 Jul 2012, Greg Kroah-Hartman wrote:

> On Wed, Jun 27, 2012 at 09:19:15PM +0200, Jesper Juhl wrote:
> > My previous 14 patch series to vt6656 missed a few bits and
> > pieces. This mops up the last few obvious style issues.
> > It is quite short and completely trivial - simply deletes a few blank
> > lines, does some whitespace cleanup around operators and adds a few
> > curly braces.
> > 
> > Signed-off-by: Jesper Juhl <jj@chaosbits.net>
> 
> Again, one patch per thing please.  Please break this up into different
> patches so it can be accepted.
> 
Ok, ok :-)
I really thought that this one was so short and trivial that it would be 
OK - but I'll break it up and submit a tiny series against linux-next some 
time during the weekend (as a reply to this mail).

> greg k-h
> 

-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 0/3][v2] staging: vt6656: iwctl: mop up a few remaining obvious style issues.
  2012-07-07  0:29   ` Jesper Juhl
@ 2012-07-08 22:58     ` Jesper Juhl
  2012-07-08 22:58       ` [PATCH 1/3] staging: vt6656: iwctl: fix up spacing around operators Jesper Juhl
                         ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Jesper Juhl @ 2012-07-08 22:58 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Marcos Paulo de Souza, Forest Bond, Dan Carpenter, linux-kernel

My previous 14 patch series to vt6656 missed a few bits and pieces.
This small followup series mops up the last few obvious style issues.
It is quite short and completely trivial - simply deletes a few blank 
lines, does some whitespace cleanup around operators and fixes a few curly 
braces.
The series is on top of linux-next (next-20120706).

-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/3] staging: vt6656: iwctl: fix up spacing around operators
  2012-07-08 22:58     ` [PATCH 0/3][v2] " Jesper Juhl
@ 2012-07-08 22:58       ` Jesper Juhl
  2012-07-08 23:03         ` Joe Perches
  2012-07-08 22:58       ` [PATCH 2/3] staging: vt6656: iwctl: Fix up a few remaining brace issues Jesper Juhl
  2012-07-08 22:59       ` [PATCH 3/3] staging: vt6656: iwctl: remove a few remaining redundant newlines Jesper Juhl
  2 siblings, 1 reply; 11+ messages in thread
From: Jesper Juhl @ 2012-07-08 22:58 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Marcos Paulo de Souza, Forest Bond, Dan Carpenter, linux-kernel

A few cases were missed in my previous cleanup, this takes care of the
last cases of missing space (or too much space (as in a newline))
around operators ('=', '==', ',', '<').

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 drivers/staging/vt6656/iwctl.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
index dc24096..f8ea662 100644
--- a/drivers/staging/vt6656/iwctl.c
+++ b/drivers/staging/vt6656/iwctl.c
@@ -104,7 +104,7 @@ int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info,
 	PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
 	struct iw_scan_req *req = (struct iw_scan_req *)extra;
 	BYTE abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
-	PWLAN_IE_SSID pItemSSID=NULL;
+	PWLAN_IE_SSID pItemSSID = NULL;
 
 	if (!(pDevice->flags & DEVICE_FLAGS_OPENED))
 		return -EINVAL;
@@ -203,7 +203,7 @@ int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info,
 			iwe.cmd = SIOCGIWAP;
 			iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
 			memcpy(iwe.u.ap_addr.sa_data, pBSS->abyBSSID, WLAN_BSSID_LEN);
-			current_ev = iwe_stream_add_event(info,current_ev,end_buf, &iwe, IW_EV_ADDR_LEN);
+			current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_ADDR_LEN);
 			// ADD ssid
 			memset(&iwe, 0, sizeof(iwe));
 			iwe.cmd = SIOCGIWESSID;
@@ -244,7 +244,7 @@ int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info,
 			iwe.u.qual.level = ldBm;
 			iwe.u.qual.noise = 0;
 
-			if (-ldBm<50)
+			if (-ldBm < 50)
 				iwe.u.qual.qual = 100;
 			else  if (-ldBm > 90)
 				iwe.u.qual.qual = 0;
@@ -1099,9 +1099,9 @@ int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info,
 	// Send the key to the card
 	if (wrq->length > 0) {
 
-		if (wrq->length ==  WLAN_WEP232_KEYLEN) {
+		if (wrq->length == WLAN_WEP232_KEYLEN) {
 			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 232 bit wep key\n");
-		} else if (wrq->length ==  WLAN_WEP104_KEYLEN) {
+		} else if (wrq->length == WLAN_WEP104_KEYLEN) {
 			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 104 bit wep key\n");
 		} else if (wrq->length == WLAN_WEP40_KEYLEN) {
 			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 40 bit wep key, index= %d\n", (int)dwKeyIndex);
@@ -1624,8 +1624,7 @@ int iwctl_siwmlme(struct net_device *dev, struct iw_request_info *info,
 	case IW_MLME_DISASSOC:
 		if (pDevice->bLinkPass == TRUE) {
 			PRINT_K("iwctl_siwmlme--->send DISASSOCIATE\n");
-			bScheduleCommand((void *)pDevice,
-					WLAN_CMD_DISASSOCIATE,
+			bScheduleCommand((void *)pDevice, WLAN_CMD_DISASSOCIATE,
 					NULL);
 		}
 		break;
-- 
1.7.11.1


-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/3] staging: vt6656: iwctl: Fix up a few remaining brace issues
  2012-07-08 22:58     ` [PATCH 0/3][v2] " Jesper Juhl
  2012-07-08 22:58       ` [PATCH 1/3] staging: vt6656: iwctl: fix up spacing around operators Jesper Juhl
@ 2012-07-08 22:58       ` Jesper Juhl
  2012-07-08 22:59       ` [PATCH 3/3] staging: vt6656: iwctl: remove a few remaining redundant newlines Jesper Juhl
  2 siblings, 0 replies; 11+ messages in thread
From: Jesper Juhl @ 2012-07-08 22:58 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Marcos Paulo de Souza, Forest Bond, Dan Carpenter, linux-kernel

My previous cleanup patches missed a few cases of
redundant/missing/replaced curly braces. This should fix up the last
ones.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 drivers/staging/vt6656/iwctl.c | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
index f8ea662..13ad62c 100644
--- a/drivers/staging/vt6656/iwctl.c
+++ b/drivers/staging/vt6656/iwctl.c
@@ -140,9 +140,9 @@ int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info,
 			if (pItemSSID->abySSID[req->essid_len - 1] == '\0') {
 				if (req->essid_len > 0)
 					pItemSSID->len = req->essid_len - 1;
-			}
-			else
+			} else {
 				pItemSSID->len = req->essid_len;
+			}
 			pMgmt->eScanType = WMAC_SCAN_PASSIVE;
 			PRINT_K("SIOCSIWSCAN:[desired_ssid=%s,len=%d]\n", ((PWLAN_IE_SSID)abyScanSSID)->abySSID,
 				((PWLAN_IE_SSID)abyScanSSID)->len);
@@ -577,9 +577,9 @@ int iwctl_siwap(struct net_device *dev, struct iw_request_info *info,
 
 	PRINT_K(" SIOCSIWAP \n");
 
-	if (wrq->sa_family != ARPHRD_ETHER)
+	if (wrq->sa_family != ARPHRD_ETHER) {
 		rc = -EINVAL;
-	else {
+	} else {
 		memcpy(pMgmt->abyDesireBSSID, wrq->sa_data, 6);
 		// mike: add
 		if ((is_broadcast_ether_addr(pMgmt->abyDesireBSSID)) ||
@@ -882,8 +882,7 @@ int iwctl_siwrate(struct net_device *dev, struct iw_request_info *info,
 			pDevice->uConnectionRate = brate;
 			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Fixed to Rate %d \n", pDevice->uConnectionRate);
 		}
-	}
-	else {
+	} else {
 		pDevice->bFixRate = FALSE;
 		pDevice->uConnectionRate = 13;
 	}
@@ -1205,7 +1204,7 @@ int iwctl_giwencode(struct net_device *dev, struct iw_request_info *info,
 	wrq->length = 0;
 
 	if ((index == 0) && (pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled ||
-				pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled)){ // get wpa pairwise  key
+				pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled)) { // get wpa pairwise  key
 		if (KeybGetKey(&(pDevice->sKey), pMgmt->abyCurrBSSID, 0xffffffff, &pKey)) {
 			wrq->length = pKey->uKeyLength;
 			memcpy(abyKey, pKey->abyKey,	pKey->uKeyLength);
@@ -1360,11 +1359,10 @@ int iwctl_siwauth(struct net_device *dev, struct iw_request_info *info,
 		if (wpa_version == IW_AUTH_WPA_VERSION_DISABLED)
 			break;
 		if (pairwise == IW_AUTH_CIPHER_NONE) {
-			if (wrq->value == IW_AUTH_CIPHER_CCMP) {
+			if (wrq->value == IW_AUTH_CIPHER_CCMP)
 				pDevice->eEncryptionStatus = Ndis802_11Encryption3Enabled;
-			}else {
+			else
 				pDevice->eEncryptionStatus = Ndis802_11Encryption2Enabled;
-			}
 		}
 		break;
 	case IW_AUTH_KEY_MGMT:
@@ -1446,7 +1444,7 @@ int iwctl_siwgenie(struct net_device *dev, struct iw_request_info *info,
 			goto out;
 		}
 		pMgmt->wWPAIELen = wrq->length;
-	}else {
+	} else {
 		memset(pMgmt->abyWPAIE, 0, MAX_WPA_IE_LEN);
 		pMgmt->wWPAIELen = 0;
 	}
@@ -1470,8 +1468,9 @@ int iwctl_giwgenie(struct net_device *dev, struct iw_request_info *info,
 			if (copy_to_user(extra, pMgmt->abyWPAIE, pMgmt->wWPAIELen)) {
 				ret = -EFAULT;
 			}
-		} else
+		} else {
 			ret = -E2BIG;
+		}
 	}
 	return ret;
 }
-- 
1.7.11.1


-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/3] staging: vt6656: iwctl: remove a few remaining redundant newlines
  2012-07-08 22:58     ` [PATCH 0/3][v2] " Jesper Juhl
  2012-07-08 22:58       ` [PATCH 1/3] staging: vt6656: iwctl: fix up spacing around operators Jesper Juhl
  2012-07-08 22:58       ` [PATCH 2/3] staging: vt6656: iwctl: Fix up a few remaining brace issues Jesper Juhl
@ 2012-07-08 22:59       ` Jesper Juhl
  2012-07-08 23:05         ` Joe Perches
  2 siblings, 1 reply; 11+ messages in thread
From: Jesper Juhl @ 2012-07-08 22:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Marcos Paulo de Souza, Forest Bond, Dan Carpenter, linux-kernel

I missed a few redundant newlines the first time.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 drivers/staging/vt6656/iwctl.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
index 13ad62c..8b9894b 100644
--- a/drivers/staging/vt6656/iwctl.c
+++ b/drivers/staging/vt6656/iwctl.c
@@ -964,7 +964,6 @@ int iwctl_giwrts(struct net_device *dev, struct iw_request_info *info,
 	wrq->value = pDevice->wRTSThreshold;
 	wrq->disabled = (wrq->value >= 2312);
 	wrq->fixed = 1;
-
 	return 0;
 }
 
@@ -1003,7 +1002,6 @@ int iwctl_giwfrag(struct net_device *dev, struct iw_request_info *info,
 	wrq->value = pDevice->wFragmentationThreshold;
 	wrq->disabled = (wrq->value >= 2312);
 	wrq->fixed = 1;
-
 	return 0;
 }
 
@@ -1097,7 +1095,6 @@ int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info,
 
 	// Send the key to the card
 	if (wrq->length > 0) {
-
 		if (wrq->length == WLAN_WEP232_KEYLEN) {
 			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 232 bit wep key\n");
 		} else if (wrq->length == WLAN_WEP104_KEYLEN) {
@@ -1119,8 +1116,7 @@ int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info,
 					dwKeyIndex | (1 << 31),
 					wrq->length, NULL,
 					pDevice->abyKey,
-					KEY_CTL_WEP
-				);
+					KEY_CTL_WEP);
 			spin_unlock_irq(&pDevice->lock);
 		}
 		pDevice->byKeyIndex = (BYTE)dwKeyIndex;
-- 
1.7.11.1


-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/3] staging: vt6656: iwctl: fix up spacing around operators
  2012-07-08 22:58       ` [PATCH 1/3] staging: vt6656: iwctl: fix up spacing around operators Jesper Juhl
@ 2012-07-08 23:03         ` Joe Perches
  2012-07-08 23:19           ` Jesper Juhl
  0 siblings, 1 reply; 11+ messages in thread
From: Joe Perches @ 2012-07-08 23:03 UTC (permalink / raw)
  To: Jesper Juhl
  Cc: Greg Kroah-Hartman, devel, Marcos Paulo de Souza, Forest Bond,
	Dan Carpenter, linux-kernel

On Mon, 2012-07-09 at 00:58 +0200, Jesper Juhl wrote:
> A few cases were missed in my previous cleanup, this takes care of the
> last cases of missing space (or too much space (as in a newline))
> around operators ('=', '==', ',', '<').

Trivia:

> diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
[]
> @@ -1624,8 +1624,7 @@ int iwctl_siwmlme(struct net_device *dev, struct iw_request_info *info,
>  	case IW_MLME_DISASSOC:
>  		if (pDevice->bLinkPass == TRUE) {
>  			PRINT_K("iwctl_siwmlme--->send DISASSOCIATE\n");
> -			bScheduleCommand((void *)pDevice,
> -					WLAN_CMD_DISASSOCIATE,
> +			bScheduleCommand((void *)pDevice, WLAN_CMD_DISASSOCIATE,
>  					NULL);

pDevice doesn't need a cast.

bScheduleCommand uses a lot of casts for pDevice
that aren't necessary.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] staging: vt6656: iwctl: remove a few remaining redundant newlines
  2012-07-08 22:59       ` [PATCH 3/3] staging: vt6656: iwctl: remove a few remaining redundant newlines Jesper Juhl
@ 2012-07-08 23:05         ` Joe Perches
  2012-07-08 23:16           ` Jesper Juhl
  0 siblings, 1 reply; 11+ messages in thread
From: Joe Perches @ 2012-07-08 23:05 UTC (permalink / raw)
  To: Jesper Juhl
  Cc: Greg Kroah-Hartman, devel, Marcos Paulo de Souza, Forest Bond,
	Dan Carpenter, linux-kernel

On Mon, 2012-07-09 at 00:59 +0200, Jesper Juhl wrote:
> I missed a few redundant newlines the first time.
[]
> diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
[]
> @@ -964,7 +964,6 @@ int iwctl_giwrts(struct net_device *dev, struct iw_request_info *info,
>  	wrq->value = pDevice->wRTSThreshold;
>  	wrq->disabled = (wrq->value >= 2312);
>  	wrq->fixed = 1;
> -
>  	return 0;
>  }

I think this is a useful style and these should not be removed.
It's akin to a blank line after automatic variable declarations.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] staging: vt6656: iwctl: remove a few remaining redundant newlines
  2012-07-08 23:05         ` Joe Perches
@ 2012-07-08 23:16           ` Jesper Juhl
  0 siblings, 0 replies; 11+ messages in thread
From: Jesper Juhl @ 2012-07-08 23:16 UTC (permalink / raw)
  To: Joe Perches
  Cc: Greg Kroah-Hartman, devel, Marcos Paulo de Souza, Forest Bond,
	Dan Carpenter, linux-kernel

On Sun, 8 Jul 2012, Joe Perches wrote:

> On Mon, 2012-07-09 at 00:59 +0200, Jesper Juhl wrote:
> > I missed a few redundant newlines the first time.
> []
> > diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
> []
> > @@ -964,7 +964,6 @@ int iwctl_giwrts(struct net_device *dev, struct iw_request_info *info,
> >  	wrq->value = pDevice->wRTSThreshold;
> >  	wrq->disabled = (wrq->value >= 2312);
> >  	wrq->fixed = 1;
> > -
> >  	return 0;
> >  }
> 
> I think this is a useful style and these should not be removed.
> It's akin to a blank line after automatic variable declarations.
> 
Thank you for your feedback Joe.

I see your point, but personally I'd rather leave it out - especially for 
small functions.

I'll leave it up to Greg whether or not to take this one :-)


-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/3] staging: vt6656: iwctl: fix up spacing around operators
  2012-07-08 23:03         ` Joe Perches
@ 2012-07-08 23:19           ` Jesper Juhl
  0 siblings, 0 replies; 11+ messages in thread
From: Jesper Juhl @ 2012-07-08 23:19 UTC (permalink / raw)
  To: Joe Perches
  Cc: Greg Kroah-Hartman, devel, Marcos Paulo de Souza, Forest Bond,
	Dan Carpenter, linux-kernel

On Sun, 8 Jul 2012, Joe Perches wrote:

> On Mon, 2012-07-09 at 00:58 +0200, Jesper Juhl wrote:
> > A few cases were missed in my previous cleanup, this takes care of the
> > last cases of missing space (or too much space (as in a newline))
> > around operators ('=', '==', ',', '<').
> 
> Trivia:
> 
> > diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
> []
> > @@ -1624,8 +1624,7 @@ int iwctl_siwmlme(struct net_device *dev, struct iw_request_info *info,
> >  	case IW_MLME_DISASSOC:
> >  		if (pDevice->bLinkPass == TRUE) {
> >  			PRINT_K("iwctl_siwmlme--->send DISASSOCIATE\n");
> > -			bScheduleCommand((void *)pDevice,
> > -					WLAN_CMD_DISASSOCIATE,
> > +			bScheduleCommand((void *)pDevice, WLAN_CMD_DISASSOCIATE,
> >  					NULL);
> 
> pDevice doesn't need a cast.
> 
> bScheduleCommand uses a lot of casts for pDevice
> that aren't necessary.
> 
Right you are.

I have not gone through the file to verify all casts (yet). I was focused 
on getting it from the totally chaotic state it was in to something that 
was readable and reasonably close to CodingStyle. I'm well aware that it's 
not perfect (yet).

I'm a bit out of time right now and for the next couple of days, but I can 
probably do a review of the casts and send some follow-up patches later in 
the week.

-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-07-08 23:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-27 19:19 [PATCH] staging: vt6656: iwctl: mop up a few remaining obvious style issues Jesper Juhl
2012-07-06 23:09 ` Greg Kroah-Hartman
2012-07-07  0:29   ` Jesper Juhl
2012-07-08 22:58     ` [PATCH 0/3][v2] " Jesper Juhl
2012-07-08 22:58       ` [PATCH 1/3] staging: vt6656: iwctl: fix up spacing around operators Jesper Juhl
2012-07-08 23:03         ` Joe Perches
2012-07-08 23:19           ` Jesper Juhl
2012-07-08 22:58       ` [PATCH 2/3] staging: vt6656: iwctl: Fix up a few remaining brace issues Jesper Juhl
2012-07-08 22:59       ` [PATCH 3/3] staging: vt6656: iwctl: remove a few remaining redundant newlines Jesper Juhl
2012-07-08 23:05         ` Joe Perches
2012-07-08 23:16           ` Jesper Juhl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).