Skip to contentSkip to conversation

Staging: ks7010: Add required and preferred spaces around operators

PATCH New Shiva Kerdel 1 participant 1 message Feb 16, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: ks7010: Add required and preferred spaces around operators

Spaces should be added around operators to improve readability and are required in some cases.

---
 drivers/staging/ks7010/ks_hostif.c     |  2 +-
 drivers/staging/ks7010/ks_hostif.h     | 64 +++++++++++++++++-----------------
 drivers/staging/ks7010/ks_wlan.h       |  4 +--
 drivers/staging/ks7010/ks_wlan_ioctl.h | 64 +++++++++++++++++-----------------
 drivers/staging/ks7010/ks_wlan_net.c   |  4 +--
 drivers/staging/ks7010/michael_mic.c   |  8 ++---
 6 files changed, 73 insertions(+), 73 deletions(-)
drivers/staging/ks7010/ks_hostif.c +1 -1
index 4f430a0c845b..97d7b56c592a 100644
@@ -1101,7 +1101,7 @@ void hostif_event_check(struct ks_wlan_private *priv)
 	priv->hostt.qtail = (priv->hostt.qtail + 1) % SME_EVENT_BUFF_SIZE;
 }
 
-#define CHECK_ALINE(size) (size%4 ? (size+(4-(size%4))):size)
+#define CHECK_ALINE(size) (size % 4 ? (size + (4 - (size % 4))) : size)
 
 int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet)
 {
drivers/staging/ks7010/ks_hostif.h +32 -32

82 lines not on this page · raw message

drivers/staging/ks7010/ks_wlan.h +2 -2
index c7fa508bffe4..350622673ff9 100644
@@ -36,7 +36,7 @@
 
 #ifdef KS_WLAN_DEBUG
 #define DPRINTK(n, fmt, args...) \
-                 if (KS_WLAN_DEBUG>(n)) printk(KERN_NOTICE "%s: "fmt, __FUNCTION__, ## args)
+                 if (KS_WLAN_DEBUG > (n)) printk(KERN_NOTICE "%s: "fmt, __FUNCTION__, ## args)
 #else
 #define DPRINTK(n, fmt, args...)
 #endif
@@ -94,7 +94,7 @@ enum {
 #define SME_WEP_VAL2        (1<<6)
 #define SME_WEP_VAL3        (1<<7)
 #define SME_WEP_VAL4        (1<<8)
-#define SME_WEP_VAL_MASK    (SME_WEP_VAL1|SME_WEP_VAL2|SME_WEP_VAL3|SME_WEP_VAL4)
+#define SME_WEP_VAL_MASK    (SME_WEP_VAL1 | SME_WEP_VAL2 | SME_WEP_VAL3 | SME_WEP_VAL4)
 #define SME_RSN             (1<<9)
 #define SME_RSN_MULTICAST   (1<<10)
 #define SME_RSN_UNICAST	    (1<<11)
drivers/staging/ks7010/ks_wlan_ioctl.h +32 -32

75 lines not on this page · raw message

drivers/staging/ks7010/ks_wlan_net.c +2 -2
index c7503a9306cd..abc644178fa2 100644
@@ -2453,7 +2453,7 @@ static int ks_wlan_data_read(struct net_device *dev,
 #if 0
 /*------------------------------------------------------------------*/
 /* Private handler : get wep string */
-#define WEP_ASCII_BUFF_SIZE (17+64*4+1)
+#define WEP_ASCII_BUFF_SIZE (17 + 64 * 4 + 1)
 static int ks_wlan_get_wep_ascii(struct net_device *dev,
 				 struct iw_request_info *info,
 				 struct iw_point *dwrq, char *extra)
@@ -3394,7 +3394,7 @@ int ks_wlan_close(struct net_device *dev)
 
 /* Operational parameters that usually are not changed. */
 /* Time in jiffies before concluding the transmitter is hung. */
-#define TX_TIMEOUT  (3*HZ)
+#define TX_TIMEOUT  (3 * HZ)
 static const unsigned char dummy_addr[] = {
 	0x00, 0x0b, 0xe3, 0x00, 0x00, 0x00
 };
drivers/staging/ks7010/michael_mic.c +4 -4
index 2f535c08e172..f6e70fa2a12f 100644
@@ -14,11 +14,11 @@
 #include "michael_mic.h"
 
 // Rotation functions on 32 bit values
-#define ROL32(A, n)	(((A) << (n)) | (((A)>>(32-(n))) & ((1UL << (n)) - 1)))
-#define ROR32(A, n)	ROL32((A), 32-(n))
+#define ROL32(A, n)	(((A) << (n)) | (((A) >> (32 - (n))) & ((1UL << (n)) - 1)))
+#define ROR32(A, n)	ROL32((A), 32 - (n))
 // Convert from Byte[] to UInt32 in a portable way
-#define getUInt32(A, B)	((uint32_t)(A[B+0] << 0) \
-		+ (A[B+1] << 8) + (A[B+2] << 16) + (A[B+3] << 24))
+#define getUInt32(A, B)	((uint32_t)(A[B + 0] << 0) \
+		+ (A[B + 1] << 8) + (A[B + 2] << 16) + (A[B + 3] << 24))
 
 // Convert from UInt32 to Byte[] in a portable way
 #define putUInt32(A, B, C)					\
Signature · 1 line
2.11.1