staging: rtl8712: add spaces around operators
authorZhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com>
Tue, 6 Apr 2021 08:45:23 +0000 (14:45 +0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Apr 2021 12:15:39 +0000 (14:15 +0200)
Add spaces around operators to adhere to Linux kernel coding style.
Reported by checkpatch.

Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com>
Link: https://lore.kernel.org/r/1fa63e851a6fa403798b95b64d9147c9b3b02c93.1617697237.git.zhansayabagdaulet@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c
drivers/staging/rtl8712/rtl871x_security.h
drivers/staging/rtl8712/rtl871x_xmit.h
drivers/staging/rtl8712/wifi.h

index 60dd798a6e5157c18f2f019ba3d7f30afa2bd574..6b3c5914efb43dfbaadfc9755a27691941052ab6 100644 (file)
@@ -144,7 +144,7 @@ static noinline_for_stack char *translate_scan_wpa(struct iw_request_info *info,
                for (i = 0; i < wpa_len; i++) {
                        n += scnprintf(buf + n, MAX_WPA_IE_LEN - n,
                                                "%02x", wpa_ie[i]);
-                       if (n == MAX_WPA_IE_LEN-1)
+                       if (n == MAX_WPA_IE_LEN - 1)
                                break;
                }
                memset(iwe, 0, sizeof(*iwe));
@@ -164,7 +164,7 @@ static noinline_for_stack char *translate_scan_wpa(struct iw_request_info *info,
                for (i = 0; i < rsn_len; i++) {
                        n += scnprintf(buf + n, MAX_WPA_IE_LEN - n,
                                                "%02x", rsn_ie[i]);
-                       if (n == MAX_WPA_IE_LEN-1)
+                       if (n == MAX_WPA_IE_LEN - 1)
                                break;
                }
                memset(iwe, 0, sizeof(*iwe));
index b2dda16cbd0a9b93f0bc0bceb69350fafa9a873c..8461b7f05359a0d97ab7ae8ff5ad75a8ee28a3a2 100644 (file)
@@ -101,7 +101,7 @@ struct security_priv {
        union pn48 Grprxpn;             /* PN48 used for Grp Key recv. */
        u8 wps_hw_pbc_pressed;/*for hw pbc pressed*/
        u8 wps_phase;/*for wps*/
-       u8 wps_ie[MAX_WPA_IE_LEN<<2];
+       u8 wps_ie[MAX_WPA_IE_LEN << 2];
        int wps_ie_len;
        u8      binstallGrpkey;
        u8      busetkipkey;
@@ -185,7 +185,7 @@ do {\
        txpn._byte_.TSC5 = iv[7];\
 } while (0)
 
-#define ROL32(A, n) (((A) << (n)) | (((A)>>(32-(n)))  & ((1UL << (n)) - 1)))
+#define ROL32(A, n) (((A) << (n)) | (((A) >> (32 - (n)))  & ((1UL << (n)) - 1)))
 #define ROR32(A, n) ROL32((A), 32 - (n))
 
 struct mic_data {
index cc58c72169355ded185a5accc9a38b82acb5e936..1fb395c9d06876eb602cc0c1c3ff328e7150153f 100644 (file)
@@ -42,7 +42,7 @@ do { \
        pattrib_iv[1] = txpn._byte_.TSC1;\
        pattrib_iv[2] = txpn._byte_.TSC2;\
        pattrib_iv[3] = ((keyidx & 0x3) << 6);\
-       txpn.val = (txpn.val == 0xffffff) ? 0 : (txpn.val+1);\
+       txpn.val = (txpn.val == 0xffffff) ? 0 : (txpn.val + 1);\
 } while (0)
 
 /* Fixed the Big Endian bug when doing the Tx.
@@ -53,13 +53,13 @@ do { \
        pattrib_iv[0] = txpn._byte_.TSC1;\
        pattrib_iv[1] = (txpn._byte_.TSC1 | 0x20) & 0x7f;\
        pattrib_iv[2] = txpn._byte_.TSC0;\
-       pattrib_iv[3] = BIT(5) | ((keyidx & 0x3)<<6);\
+       pattrib_iv[3] = BIT(5) | ((keyidx & 0x3) << 6);\
        pattrib_iv[4] = txpn._byte_.TSC2;\
        pattrib_iv[5] = txpn._byte_.TSC3;\
        pattrib_iv[6] = txpn._byte_.TSC4;\
        pattrib_iv[7] = txpn._byte_.TSC5;\
        txpn.val = txpn.val == 0xffffffffffffULL ? 0 : \
-       (txpn.val+1);\
+       (txpn.val + 1);\
 } while (0)
 
 #define AES_IV(pattrib_iv, txpn, keyidx)\
@@ -67,13 +67,13 @@ do { \
        pattrib_iv[0] = txpn._byte_.TSC0;\
        pattrib_iv[1] = txpn._byte_.TSC1;\
        pattrib_iv[2] = 0;\
-       pattrib_iv[3] = BIT(5) | ((keyidx & 0x3)<<6);\
+       pattrib_iv[3] = BIT(5) | ((keyidx & 0x3) << 6);\
        pattrib_iv[4] = txpn._byte_.TSC2;\
        pattrib_iv[5] = txpn._byte_.TSC3;\
        pattrib_iv[6] = txpn._byte_.TSC4;\
        pattrib_iv[7] = txpn._byte_.TSC5;\
        txpn.val = txpn.val == 0xffffffffffffULL ? 0 : \
-       (txpn.val+1);\
+       (txpn.val + 1);\
 } while (0)
 
 struct hw_xmit {
index f941efb1f4e26866bab48daad40468d014fa7f37..a5992818bc5ab8b64e17ae9bf4d74a5e61df0303 100644 (file)
@@ -26,7 +26,7 @@ enum WIFI_FRAME_TYPE {
        WIFI_MGT_TYPE  =        (0),
        WIFI_CTRL_TYPE =        (BIT(2)),
        WIFI_DATA_TYPE =        (BIT(3)),
-       WIFI_QOS_DATA_TYPE      = (BIT(7)|BIT(3)),      /*!< QoS Data */
+       WIFI_QOS_DATA_TYPE      = (BIT(7) | BIT(3)),    /*!< QoS Data */
 };
 
 enum WIFI_FRAME_SUBTYPE {