[PATCH] staging: rts5208: add empty line in general.c

2021-03-15 Thread Hao Peng
Add one empty line upon return for easy reading.

Signed-off-by: Hao Peng 
---
 drivers/staging/rts5208/general.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/rts5208/general.c 
b/drivers/staging/rts5208/general.c
index 0f912b011064..1ddfbc5aecb7 100644
--- a/drivers/staging/rts5208/general.c
+++ b/drivers/staging/rts5208/general.c
@@ -20,6 +20,7 @@ int bit1cnt_long(u32 data)
cnt++;
data >>= 1;
}
+
return cnt;
 }
 
-- 
2.20.1



___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8192e: remove extra lines in rtl819x_BAProc.c

2021-03-15 Thread Hao Peng
Remove extra lines in rtl819x_BAProc.c.

Signed-off-by: Hao Peng 
---
 drivers/staging/rtl8192e/rtl819x_BAProc.c | 6 --
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c 
b/drivers/staging/rtl8192e/rtl819x_BAProc.c
index f692ad7f9bbc..adc2304ae155 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -162,7 +162,6 @@ static struct sk_buff *rtllib_DELBA(struct rtllib_device 
*ieee, u8 *dst,
*tag++ = ACT_CAT_BA;
*tag++ = ACT_DELBA;
 
-
put_unaligned_le16(DelbaParamSet.shortData, tag);
tag += 2;
 
@@ -182,7 +181,6 @@ static void rtllib_send_ADDBAReq(struct rtllib_device 
*ieee, u8 *dst,
struct sk_buff *skb;
 
skb = rtllib_ADDBA(ieee, dst, pBA, 0, ACT_ADDBAREQ);
-
if (skb) {
RT_TRACE(COMP_DBG, ">to send ADDBAREQ!\n");
softmac_mgmt_xmit(skb, ieee);
@@ -344,7 +342,6 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct 
sk_buff *skb)
goto OnADDBARsp_Reject;
}
 
-
if (!GetTs(ieee, (struct ts_common_info **)(), dst,
   (u8)(pBaParamSet->field.TID), TX_DIR, false)) {
netdev_warn(ieee->dev, "%s(): can't get TS\n", __func__);
@@ -356,7 +353,6 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct 
sk_buff *skb)
pPendingBA = >TxPendingBARecord;
pAdmittedBA = >TxAdmittedBARecord;
 
-
if (pAdmittedBA->bValid) {
netdev_dbg(ieee->dev, "%s(): ADDBA response already admitted\n",
   __func__);
@@ -375,7 +371,6 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct 
sk_buff *skb)
DeActivateBAEntry(ieee, pPendingBA);
}
 
-
if (*pStatusCode == ADDBA_STATUS_SUCCESS) {
if (pBaParamSet->field.BAPolicy == BA_POLICY_DELAYED) {
pTS->bAddBaReqDelayed = true;
@@ -384,7 +379,6 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct 
sk_buff *skb)
goto OnADDBARsp_Reject;
}
 
-
pAdmittedBA->DialogToken = *pDialogToken;
pAdmittedBA->BaTimeoutValue = *pBaTimeoutVal;
pAdmittedBA->BaStartSeqCtrl = pPendingBA->BaStartSeqCtrl;
-- 
2.20.1



___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8192e: remove extra space in rtl819x_BAProc.c

2021-03-15 Thread Hao Peng
Remove extra spaces in rtl819x_BAProc.c.

Signed-off-by: Hao Peng 
---
 drivers/staging/rtl8192e/rtl819x_BAProc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c 
b/drivers/staging/rtl8192e/rtl819x_BAProc.c
index 2d5e4a0330c6..f692ad7f9bbc 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -45,7 +45,7 @@ static u8 TxTsDeleteBA(struct rtllib_device *ieee, struct 
tx_ts_record *pTxTs)
 static u8 RxTsDeleteBA(struct rtllib_device *ieee, struct rx_ts_record *pRxTs)
 {
struct ba_record *pBa = >RxAdmittedBARecord;
-   u8  bSendDELBA = false;
+   u8 bSendDELBA = false;
 
if (pBa->bValid) {
DeActivateBAEntry(ieee, pBa);
@@ -314,7 +314,7 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct 
sk_buff *skb)
u8 *dst = NULL, *pDialogToken = NULL, *tag = NULL;
u16 *pStatusCode = NULL, *pBaTimeoutVal = NULL;
union ba_param_set *pBaParamSet = NULL;
-   u16 ReasonCode;
+   u16 ReasonCode;
 
if (skb->len < sizeof(struct rtllib_hdr_3addr) + 9) {
netdev_warn(ieee->dev, "Invalid skb len in BARSP(%d / %d)\n",
-- 
2.20.1



___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: remove extra lines

2021-03-11 Thread Hao Peng
Remove extra lines in many functions in hal_intf.c.

Signed-off-by: Hao Peng 
---
 drivers/staging/rtl8723bs/hal/hal_intf.c | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c 
b/drivers/staging/rtl8723bs/hal/hal_intf.c
index 9fb377633852..e74e9c0608ee 100644
--- a/drivers/staging/rtl8723bs/hal/hal_intf.c
+++ b/drivers/staging/rtl8723bs/hal/hal_intf.c
@@ -111,7 +111,6 @@ uint rtw_hal_init(struct adapter *padapter)
RT_TRACE(_module_hal_init_c_, _drv_err_, ("-rtl871x_hal_init:status = 
0x%x\n", status));
 
return status;
-
 }
 
 uint rtw_hal_deinit(struct adapter *padapter)
@@ -180,7 +179,6 @@ void rtw_hal_enable_interrupt(struct adapter *padapter)
padapter->HalFunc.enable_interrupt(padapter);
else
DBG_871X("%s: HalFunc.enable_interrupt is NULL!\n", __func__);
-
 }
 
 void rtw_hal_disable_interrupt(struct adapter *padapter)
@@ -189,7 +187,6 @@ void rtw_hal_disable_interrupt(struct adapter *padapter)
padapter->HalFunc.disable_interrupt(padapter);
else
DBG_871X("%s: HalFunc.disable_interrupt is NULL!\n", __func__);
-
 }
 
 u8 rtw_hal_check_ips_status(struct adapter *padapter)
@@ -269,7 +266,6 @@ s32 rtw_hal_init_recv_priv(struct adapter *padapter)
 
 void rtw_hal_free_recv_priv(struct adapter *padapter)
 {
-
if (padapter->HalFunc.free_recv_priv)
padapter->HalFunc.free_recv_priv(padapter);
 }
@@ -358,7 +354,6 @@ void rtw_hal_dm_watchdog(struct adapter *padapter)
 {
if (padapter->HalFunc.hal_dm_watchdog)
padapter->HalFunc.hal_dm_watchdog(padapter);
-
 }
 
 void rtw_hal_dm_watchdog_in_lps(struct adapter *padapter)
@@ -422,7 +417,6 @@ s32 rtw_hal_macid_sleep(struct adapter *padapter, u32 macid)
 {
u8 support;
 
-
support = false;
rtw_hal_get_def_var(padapter, HAL_DEF_MACID_SLEEP, );
if (false == support)
@@ -437,7 +431,6 @@ s32 rtw_hal_macid_wakeup(struct adapter *padapter, u32 
macid)
 {
u8 support;
 
-
support = false;
rtw_hal_get_def_var(padapter, HAL_DEF_MACID_SLEEP, );
if (false == support)
-- 
2.20.1



___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: remove extra space

2021-03-11 Thread Hao Peng
Remove extra space in hal_intf.c.

Signed-off-by: Hao Peng 
---
 drivers/staging/rtl8723bs/hal/hal_intf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c 
b/drivers/staging/rtl8723bs/hal/hal_intf.c
index ac3066a91c84..9fb377633852 100644
--- a/drivers/staging/rtl8723bs/hal/hal_intf.c
+++ b/drivers/staging/rtl8723bs/hal/hal_intf.c
@@ -116,7 +116,7 @@ uint rtw_hal_init(struct adapter *padapter)
 
 uint rtw_hal_deinit(struct adapter *padapter)
 {
-   uintstatus = _SUCCESS;
+   uint status = _SUCCESS;
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
 
status = padapter->HalFunc.hal_deinit(padapter);
-- 
2.20.1



___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: add initial value

2021-03-10 Thread Hao Peng
Add initial value for some uninitialized variable and array.

Signed-off-by: Hao Peng 
---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c 
b/drivers/staging/rtl8723bs/core/rtw_ap.c
index b6f944b37b08..ceea160db38a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -206,8 +206,8 @@ void expire_timeout_chk(struct adapter *padapter)
struct sta_info *psta = NULL;
struct sta_priv *pstapriv = >stapriv;
u8 chk_alive_num = 0;
-   char chk_alive_list[NUM_STA];
-   int i;
+   char chk_alive_list[NUM_STA] = {0};
+   int i = 0;
 
spin_lock_bh(>auth_list_lock);
 
@@ -308,7 +308,7 @@ void expire_timeout_chk(struct adapter *padapter)
}
}
if (pmlmeext->active_keep_alive_check) {
-   int stainfo_offset;
+   int stainfo_offset = 0;
 
stainfo_offset = rtw_stainfo_offset(pstapriv, 
psta);
if (stainfo_offset_valid(stainfo_offset))
-- 
2.20.1



___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel