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 84dabed..9f44dd0 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 17d881d..99e3b68 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 f708dbf..f060e54 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 695a5c9..c6018f0 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 e832f16..06a7e40 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 8f2c9a6..a0d7998 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;