build/patch/kernel/archive/sunxi-6.1/patches.megous/8723cs-Fix-some-compilation-warnings.patch

71 lines
3.0 KiB
Diff
Raw Normal View History

From ee3e1f4596e5b68675fdd5f3da827cac5e986243 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sat, 16 Jul 2022 12:08:58 +0200
Subject: [PATCH 137/389] 8723cs: Fix some compilation warnings
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
drivers/staging/rtl8723cs/core/rtw_br_ext.c | 2 +-
drivers/staging/rtl8723cs/core/rtw_sta_mgt.c | 3 +--
drivers/staging/rtl8723cs/core/rtw_tdls.c | 17 +++++++----------
3 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/rtl8723cs/core/rtw_br_ext.c b/drivers/staging/rtl8723cs/core/rtw_br_ext.c
index 7b5934d38446..c32036a4d32a 100644
--- a/drivers/staging/rtl8723cs/core/rtw_br_ext.c
+++ b/drivers/staging/rtl8723cs/core/rtw_br_ext.c
@@ -110,7 +110,7 @@ static __inline__ int __nat25_add_pppoe_tag(struct sk_buff *skb, struct pppoe_ta
/* have a room for new tag */
memmove(((unsigned char *)ph->tag + data_len), (unsigned char *)ph->tag, ph_len);
ph->length = htons(ph_len + data_len);
- memcpy((unsigned char *)ph->tag, tag, data_len);
+ memcpy((unsigned char *)ph->tag, (void*)tag, data_len);
return data_len;
}
diff --git a/drivers/staging/rtl8723cs/core/rtw_sta_mgt.c b/drivers/staging/rtl8723cs/core/rtw_sta_mgt.c
index 28a76fd9749a..e773b58e0fb5 100644
--- a/drivers/staging/rtl8723cs/core/rtw_sta_mgt.c
+++ b/drivers/staging/rtl8723cs/core/rtw_sta_mgt.c
@@ -388,8 +388,7 @@ void rtw_mfree_stainfo(struct sta_info *psta);
void rtw_mfree_stainfo(struct sta_info *psta)
{
- if (&psta->lock != NULL)
- _rtw_spinlock_free(&psta->lock);
+ _rtw_spinlock_free(&psta->lock);
_rtw_free_sta_xmit_priv_lock(&psta->sta_xmitpriv);
_rtw_free_sta_recv_priv_lock(&psta->sta_recvpriv);
diff --git a/drivers/staging/rtl8723cs/core/rtw_tdls.c b/drivers/staging/rtl8723cs/core/rtw_tdls.c
index d557234109be..f05e4fbc59d4 100644
--- a/drivers/staging/rtl8723cs/core/rtw_tdls.c
+++ b/drivers/staging/rtl8723cs/core/rtw_tdls.c
@@ -1075,16 +1075,13 @@ u8 *rtw_tdls_set_wmm_params(_adapter *padapter, u8 *pframe, struct pkt_attrib *p
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
u8 wmm_param_ele[24] = {0};
- if (&pmlmeinfo->WMM_param) {
- _rtw_memcpy(wmm_param_ele, WMM_PARA_OUI, 6);
- if (_rtw_memcmp(&pmlmeinfo->WMM_param, &wmm_param_ele[6], 18) == _TRUE)
- /* Use default WMM Param */
- _rtw_memcpy(wmm_param_ele + 6, (u8 *)&TDLS_WMM_PARAM_IE, sizeof(TDLS_WMM_PARAM_IE));
- else
- _rtw_memcpy(wmm_param_ele + 6, (u8 *)&pmlmeinfo->WMM_param, sizeof(pmlmeinfo->WMM_param));
- return rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, 24, wmm_param_ele, &(pattrib->pktlen));
- } else
- return pframe;
+ _rtw_memcpy(wmm_param_ele, WMM_PARA_OUI, 6);
+ if (_rtw_memcmp(&pmlmeinfo->WMM_param, &wmm_param_ele[6], 18) == _TRUE)
+ /* Use default WMM Param */
+ _rtw_memcpy(wmm_param_ele + 6, (u8 *)&TDLS_WMM_PARAM_IE, sizeof(TDLS_WMM_PARAM_IE));
+ else
+ _rtw_memcpy(wmm_param_ele + 6, (u8 *)&pmlmeinfo->WMM_param, sizeof(pmlmeinfo->WMM_param));
+ return rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, 24, wmm_param_ele, &(pattrib->pktlen));
}
#ifdef CONFIG_WFD
--
2.35.3