From: Jiayi Ye Date: Sat, 25 Oct 2014 12:07:52 +0000 (+0800) Subject: staging: rtl8723au: delete successive assignments to the same location X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8a0aa750c1e8626808775bb7a55d6ae6bb1111cd;p=openwrt%2Fstaging%2Fblogic.git staging: rtl8723au: delete successive assignments to the same location 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 Reviewed-by: Josh Triplett Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index 86f5217afe93..10f8031e29cf 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -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; diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c b/drivers/staging/rtl8723au/hal/usb_halinit.c index a5de03d45aa9..6c1dcf0b0d7d 100644 --- a/drivers/staging/rtl8723au/hal/usb_halinit.c +++ b/drivers/staging/rtl8723au/hal/usb_halinit.c @@ -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, " diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index 2f01714bc9e2..e154de9b656b 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c @@ -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;