]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: rtl8723au: delete successive assignments to the same location
authorJiayi Ye <yejiayily@gmail.com>
Sat, 25 Oct 2014 12:07:52 +0000 (20:07 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Oct 2014 10:42:37 +0000 (18:42 +0800)
Successive assignments to the same location is meaningless and can be
deleted. The Coccinelle semantic patch was used to find cases.

@@
expression e1,e2,e3;
@@

(
 (<+...e1++...+>)=e2;
|
 (<+...e1--...+>)=e2;
|
 (<+...++e1...+>)=e2;
|
 (<+...--e1...+>)=e2;
|
e1=e2;
e1 = <+...e1...+>;
|
*e1=e2;
*e1=e3;
)

Signed-off-by: Jiayi Ye <yejiayily@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_mlme_ext.c
drivers/staging/rtl8723au/hal/usb_halinit.c
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c

index 86f5217afe9328ccb03642f70b0dd73b427332b7..10f8031e29cfc143cb0896041cb63b2364a7e73b 100644 (file)
@@ -2339,8 +2339,6 @@ static int update_hidden_ssid(u8 *ies, u32 ies_len, u8 hidden_ssid_mode)
                switch (hidden_ssid_mode) {
                case 1:
                        next_ie = ssid_ie + 2 + ssid_len_ori;
-                       remain_len = 0;
-
                        remain_len = ies_len -(next_ie-ies);
 
                        ssid_ie[1] = 0;
index a5de03d45aa9fe75e9b4c190ebe26e0b3b7107bf..6c1dcf0b0d7ded4fbfa7791bdd7f7b01e7251d3d 100644 (file)
@@ -1485,7 +1485,6 @@ void rtl8723a_update_ramask(struct rtw_adapter *padapter,
        }
 
        /* mask &= 0x0fffffff; */
-       rate_bitmap = 0x0fffffff;
        rate_bitmap = ODM_Get_Rate_Bitmap23a(pHalData, mac_id, mask,
                                             rssi_level);
        DBG_8723A("%s => mac_id:%d, networkType:0x%02x, "
index 2f01714bc9e29c0a6b6deabacd20234416a9f860..e154de9b656b7466ea43f99d61a1b1cff734dcd1 100644 (file)
@@ -2363,7 +2363,6 @@ void rtw_cfg80211_indicate_sta_assoc(struct rtw_adapter *padapter,
                        ie_offset = offsetof(struct ieee80211_mgmt,
                                             u.reassoc_req.variable);
 
-               sinfo.filled = 0;
                sinfo.filled = STATION_INFO_ASSOC_REQ_IES;
                sinfo.assoc_req_ies = pmgmt_frame + ie_offset;
                sinfo.assoc_req_ies_len = frame_len - ie_offset;