From: Zhansaya Bagdauletkyzy Date: Tue, 6 Apr 2021 08:45:23 +0000 (+0600) Subject: staging: rtl8712: add spaces around operators X-Git-Tag: accepted/tizen/unified/20230118.172025~7414^2~202 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=59184278ee664396a34b0c808a8485aa034e5a39;p=platform%2Fkernel%2Flinux-rpi.git staging: rtl8712: add spaces around operators Add spaces around operators to adhere to Linux kernel coding style. Reported by checkpatch. Signed-off-by: Zhansaya Bagdauletkyzy Link: https://lore.kernel.org/r/1fa63e851a6fa403798b95b64d9147c9b3b02c93.1617697237.git.zhansayabagdaulet@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c index 60dd798..6b3c591 100644 --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c @@ -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)); diff --git a/drivers/staging/rtl8712/rtl871x_security.h b/drivers/staging/rtl8712/rtl871x_security.h index b2dda16..8461b7f 100644 --- a/drivers/staging/rtl8712/rtl871x_security.h +++ b/drivers/staging/rtl8712/rtl871x_security.h @@ -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 { diff --git a/drivers/staging/rtl8712/rtl871x_xmit.h b/drivers/staging/rtl8712/rtl871x_xmit.h index cc58c72..1fb395c 100644 --- a/drivers/staging/rtl8712/rtl871x_xmit.h +++ b/drivers/staging/rtl8712/rtl871x_xmit.h @@ -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 { diff --git a/drivers/staging/rtl8712/wifi.h b/drivers/staging/rtl8712/wifi.h index f941efb..a599281 100644 --- a/drivers/staging/rtl8712/wifi.h +++ b/drivers/staging/rtl8712/wifi.h @@ -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 {