mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 09:02:21 -04:00
staging: rtl8723bs: remove unnecessary void * casts in rtw_mlme_ext.c
Remove redundant (void *) casts when calling memcpy/memset and other helpers. These casts are unnecessary since C implicitly converts to void * and they only add noise. No functional change. Signed-off-by: Siwanan Bungtong <horstaufmental@gmail.com> Link: https://patch.msgid.link/20260210030607.1430567-5-horstaufmental@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
52e3776055
commit
ee98bf1583
@@ -526,7 +526,7 @@ unsigned int OnProbeReq(struct adapter *padapter, union recv_frame *precv_frame)
|
||||
if (is_valid_p2p_probereq)
|
||||
goto _issue_probersp;
|
||||
|
||||
if ((ielen != 0 && false == !memcmp((void *)(p+2), (void *)cur->ssid.ssid, cur->ssid.ssid_length))
|
||||
if ((ielen != 0 && false == !memcmp((p+2), cur->ssid.ssid, cur->ssid.ssid_length))
|
||||
|| (ielen == 0 && pmlmeinfo->hidden_ssid_mode)
|
||||
)
|
||||
return _SUCCESS;
|
||||
@@ -792,7 +792,7 @@ unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame)
|
||||
} else { /* shared system or auto authentication */
|
||||
if (seq == 1) {
|
||||
/* prepare for the challenging txt... */
|
||||
memset((void *)pstat->chg_txt, 78, 128);
|
||||
memset(pstat->chg_txt, 78, 128);
|
||||
|
||||
pstat->state &= ~WIFI_FW_AUTH_NULL;
|
||||
pstat->state |= WIFI_FW_AUTH_STATE;
|
||||
@@ -807,7 +807,7 @@ unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame)
|
||||
goto auth_fail;
|
||||
}
|
||||
|
||||
if (!memcmp((void *)(p + 2), pstat->chg_txt, 128)) {
|
||||
if (!memcmp((p + 2), pstat->chg_txt, 128)) {
|
||||
pstat->state &= (~WIFI_FW_AUTH_STATE);
|
||||
pstat->state |= WIFI_FW_AUTH_SUCCESS;
|
||||
/* challenging txt is correct... */
|
||||
@@ -894,7 +894,7 @@ unsigned int OnAuthClient(struct adapter *padapter, union recv_frame *precv_fram
|
||||
if (!p)
|
||||
goto authclnt_fail;
|
||||
|
||||
memcpy((void *)(pmlmeinfo->chg_txt), (void *)(p + 2), len);
|
||||
memcpy(pmlmeinfo->chg_txt, p + 2, len);
|
||||
pmlmeinfo->auth_seq = 3;
|
||||
issue_auth(padapter, NULL, 0);
|
||||
set_link_timer(pmlmeext, REAUTH_TO);
|
||||
@@ -1009,7 +1009,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
||||
goto OnAssocReqFail;
|
||||
} else {
|
||||
/* check if ssid match */
|
||||
if (memcmp((void *)(p+2), cur->ssid.ssid, cur->ssid.ssid_length))
|
||||
if (memcmp(p+2, cur->ssid.ssid, cur->ssid.ssid_length))
|
||||
status = WLAN_STATUS_CHALLENGE_FAIL;
|
||||
|
||||
if (ie_len != cur->ssid.ssid_length)
|
||||
@@ -1339,7 +1339,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
||||
|
||||
asoc_class2_error:
|
||||
|
||||
issue_deauth(padapter, (void *)GetAddr2Ptr(pframe), status);
|
||||
issue_deauth(padapter, GetAddr2Ptr(pframe), status);
|
||||
|
||||
return _FAIL;
|
||||
|
||||
@@ -2717,9 +2717,9 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
|
||||
fctrl = &(pwlanhdr->frame_control);
|
||||
*(fctrl) = 0;
|
||||
|
||||
memcpy((void *)GetAddr1Ptr(pwlanhdr), pstat->hwaddr, ETH_ALEN);
|
||||
memcpy((void *)GetAddr2Ptr(pwlanhdr), myid(&(padapter->eeprompriv)), ETH_ALEN);
|
||||
memcpy((void *)GetAddr3Ptr(pwlanhdr), get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN);
|
||||
memcpy(GetAddr1Ptr(pwlanhdr), pstat->hwaddr, ETH_ALEN);
|
||||
memcpy(GetAddr2Ptr(pwlanhdr), myid(&(padapter->eeprompriv)), ETH_ALEN);
|
||||
memcpy(GetAddr3Ptr(pwlanhdr), get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN);
|
||||
|
||||
|
||||
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
||||
|
||||
Reference in New Issue
Block a user