Staging: rtl8723bs: Do not initialise static to 0.
authorShreeya Patel <shreeya.patel23498@gmail.com>
Sat, 29 Jul 2017 20:08:14 +0000 (01:38 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 30 Jul 2017 15:30:55 +0000 (08:30 -0700)
Do not initialise static to 0.
Static variables by default initialise to 0.

This patch fixes the errors found by checkpatch.

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_mlme.c
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
drivers/staging/rtl8723bs/core/rtw_recv.c
drivers/staging/rtl8723bs/core/rtw_security.c
drivers/staging/rtl8723bs/core/rtw_xmit.c

index 84dabed7aeb63ffc520f28cb19322d53e2b6fc93..9f44dd0204678acbdb0e8a5b6d3f77233726d644 100644 (file)
@@ -1384,7 +1384,7 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net
 /* define REJOIN */
 void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
 {
-       static u8 retry = 0;
+       static u8 retry;
        u8 timer_cancelled;
        struct sta_info *ptarget_sta = NULL, *pcur_sta = NULL;
        struct  sta_priv *pstapriv = &adapter->stapriv;
index 17d881d669109e27836b6998b03e138845fac32d..99e3b682c8345055d5c38b3d59ac7014582e0af0 100644 (file)
@@ -2392,7 +2392,7 @@ s32 dump_mgntframe_and_wait(struct adapter *padapter, struct xmit_frame *pmgntfr
 
 s32 dump_mgntframe_and_wait_ack(struct adapter *padapter, struct xmit_frame *pmgntframe)
 {
-       static u8 seq_no = 0;
+       static u8 seq_no;
        s32 ret = _FAIL;
        u32 timeout_ms = 500;/*   500ms */
        struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
index f708dbf5bfd4a491e10b75b0dd8b4e259d21d0b6..f060e54e11f58b21d9a14f6f7716b398007d400d 100644 (file)
@@ -210,8 +210,8 @@ void pwr_state_check_handler(RTW_TIMER_HDL_ARGS)
 
 void traffic_check_for_leave_lps(struct adapter *padapter, u8 tx, u32 tx_packets)
 {
-       static unsigned long start_time = 0;
-       static u32 xmit_cnt = 0;
+       static unsigned long start_time;
+       static u32 xmit_cnt;
        u8 bLeaveLPS = false;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
index 695a5c958c80f9bd6cefccb17a468361bc99ea11..c6018f07d71205a15c1a80fdd696a02ea502050f 100644 (file)
@@ -1005,7 +1005,7 @@ sint ap2sta_data_frame(
                        if (*psta == NULL) {
 
                                /* for AP multicast issue , modify by yiwei */
-                               static unsigned long send_issue_deauth_time = 0;
+                               static unsigned long send_issue_deauth_time;
 
                                /* DBG_871X("After send deauth , %u ms has elapsed.\n", jiffies_to_msecs(jiffies - send_issue_deauth_time)); */
 
index e832f16997b78d164d1fca62648ffe58a53fca0c..06a7e4059fbb3847edc0b987dce3d632d9697b5f 100644 (file)
@@ -162,7 +162,7 @@ static void arcfour_encrypt(
                dest[i] = src[i] ^ (unsigned char)arcfour_byte(parc4ctx);
 }
 
-static sint bcrc32initialized = 0;
+static sint bcrc32initialized;
 static u32 crc32_table[256];
 
 
@@ -791,9 +791,9 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
                stainfo = rtw_get_stainfo(&padapter->stapriv, &prxattrib->ta[0]);
                if (stainfo != NULL) {
                        if (IS_MCAST(prxattrib->ra)) {
-                               static unsigned long start = 0;
-                               static u32 no_gkey_bc_cnt = 0;
-                               static u32 no_gkey_mc_cnt = 0;
+                               static unsigned long start;
+                               static u32 no_gkey_bc_cnt;
+                               static u32 no_gkey_mc_cnt;
 
                                if (psecuritypriv->binstallGrpkey == false) {
                                        res = _FAIL;
@@ -1882,9 +1882,9 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
                        RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_decrypt: stainfo!= NULL!!!\n"));
 
                        if (IS_MCAST(prxattrib->ra)) {
-                               static unsigned long start = 0;
-                               static u32 no_gkey_bc_cnt = 0;
-                               static u32 no_gkey_mc_cnt = 0;
+                               static unsigned long start;
+                               static u32 no_gkey_bc_cnt;
+                               static u32 no_gkey_mc_cnt;
 
                                /* DBG_871X("rx bc/mc packets, to perform sw rtw_aes_decrypt\n"); */
                                /* prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey; */
index 8f2c9a6658bfc575c2300cce5ecb01b6726065d9..a0d79985f6b90111fd58e78cefcf75167cd40669 100644 (file)
@@ -2301,8 +2301,8 @@ static void do_queue_select(struct adapter        *padapter, struct pkt_attrib *pattrib
  */
 s32 rtw_xmit(struct adapter *padapter, _pkt **ppkt)
 {
-       static unsigned long start = 0;
-       static u32 drop_cnt = 0;
+       static unsigned long start;
+       static u32 drop_cnt;
 
        struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
        struct xmit_frame *pxmitframe = NULL;