Skip to contentSkip to conversation

staging: wlan-ng: Fix several style issues.

PATCH New Sergio Paracuellos 1 participant 6 messages Nov 2, 2016 Staging

lore
Share & tools
lore
#0 lore raw

cover staging: wlan-ng: Fix several style issues.

This patch series fix some style issues in several source and header files.

Sergio Paracuellos (5):
staging: wlan-ng: add spaces around or operator :
HOSTWEP_DEFAULTKEY_MASK
staging: wlan-ng: remove two unnecessary blank lines
staging: wlan-ng: change comparison to NULL to preferred style.
staging: wlan-ng: remove unnecessary parentheses
staging: wlan-ng: remove unnecessary blank line

 drivers/staging/wlan-ng/p80211netdev.c | 2 --
 drivers/staging/wlan-ng/p80211netdev.h | 2 +-
 drivers/staging/wlan-ng/p80211req.c    | 7 +++----
 3 files changed, 4 insertions(+), 7 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/5 staging: wlan-ng: add spaces around or operator : HOSTWEP_DEFAULTKEY_MASK

Add spaces around or operator to comply with the standard kernel coding style.

---
 drivers/staging/wlan-ng/p80211netdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlan-ng/p80211netdev.h +1 -1
index 972e076..8066ac4 100644
@@ -143,7 +143,7 @@ struct p80211_frmrx {
 #define NUM_WEPKEYS 4
 #define MAX_KEYLEN 32
 
-#define HOSTWEP_DEFAULTKEY_MASK (BIT(1)|BIT(0))
+#define HOSTWEP_DEFAULTKEY_MASK (BIT(1) | BIT(0))
 #define HOSTWEP_SHAREDKEY BIT(3)
 #define HOSTWEP_DECRYPT  BIT(4)
 #define HOSTWEP_ENCRYPT  BIT(5)
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/5 staging: wlan-ng: remove two unnecessary blank lines

In reply to Sergio Paracuellos

After open brace or before close brace blank lines are not really necessary. Remove them.

---
 drivers/staging/wlan-ng/p80211netdev.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/wlan-ng/p80211netdev.c +0 -2
index 10dacf8..ae6e635 100644
@@ -277,7 +277,6 @@ static void p80211netdev_rx_bh(unsigned long arg)
 	/* Let's empty our our queue */
 	while ((skb = skb_dequeue(&wlandev->nsd_rxq))) {
 		if (wlandev->state == WLAN_DEVICE_OPEN) {
-
 			if (dev->type != ARPHRD_ETHER) {
 				/* RAW frame; we shouldn't convert it */
 				/* XXX Append the Prism Header here instead. */
@@ -461,7 +460,6 @@ static void p80211knetdev_set_multicast_list(struct net_device *dev)
 
 	if (wlandev->set_multicast_list)
 		wlandev->set_multicast_list(wlandev, dev);
-
 }
 
 #ifdef SIOCETHTOOL
Signature · 1 line
1.9.1
#3 lore raw

PATCH 3/5 staging: wlan-ng: change comparison to NULL to preferred style.

In reply to Sergio Paracuellos

Comparison to NULL could be written in preferred form. Change it to comply with the standard kernel coding style.

---
 drivers/staging/wlan-ng/p80211req.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlan-ng/p80211req.c +1 -1
index b3b33d2e..3414fd8 100644
@@ -141,7 +141,7 @@ int p80211req_dorequest(struct wlandevice *wlandev, u8 *msgbuf)
 	p80211req_handlemsg(wlandev, msg);
 
 	/* Pass it down to wlandev via wlandev->mlmerequest */
-	if (wlandev->mlmerequest != NULL)
+	if (wlandev->mlmerequest)
 		wlandev->mlmerequest(wlandev, msg);
 
 	clear_bit(1, &(wlandev->request_pending));
Signature · 1 line
1.9.1
#4 lore raw

PATCH 4/5 staging: wlan-ng: remove unnecessary parentheses

In reply to Sergio Paracuellos

Avoid no necessary parentheses to comply with the standard kernel coding style.

---
 drivers/staging/wlan-ng/p80211req.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/wlan-ng/p80211req.c +2 -2
index 3414fd8..e9fbe18 100644
@@ -132,7 +132,7 @@ int p80211req_dorequest(struct wlandevice *wlandev, u8 *msgbuf)
 	}
 
 	/* Check for busy status */
-	if (test_and_set_bit(1, &(wlandev->request_pending)))
+	if (test_and_set_bit(1, &wlandev->request_pending))
 		return -EBUSY;
 
 	/* Allow p80211 to look at msg and handle if desired. */
@@ -144,7 +144,7 @@ int p80211req_dorequest(struct wlandevice *wlandev, u8 *msgbuf)
 	if (wlandev->mlmerequest)
 		wlandev->mlmerequest(wlandev, msg);
 
-	clear_bit(1, &(wlandev->request_pending));
+	clear_bit(1, &wlandev->request_pending);
 	return 0;	/* if result==0, msg->status still may contain an err */
 }
 
Signature · 1 line
1.9.1
#5 lore raw

PATCH 5/5 staging: wlan-ng: remove unnecessary blank line

In reply to Sergio Paracuellos

Blank lines aren't necessary after an open brace '{'. Clean them in p80211req.c source file to comply with the standard kernel coding style.

---
 drivers/staging/wlan-ng/p80211req.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/wlan-ng/p80211req.c +0 -1
index e9fbe18..c4d8e1b 100644
@@ -171,7 +171,6 @@ static void p80211req_handlemsg(struct wlandevice *wlandev,
 				struct p80211msg *msg)
 {
 	switch (msg->msgcode) {
-
 	case DIDmsg_lnxreq_hostwep:{
 		struct p80211msg_lnxreq_hostwep *req =
 			(struct p80211msg_lnxreq_hostwep *)msg;
Signature · 1 line
1.9.1