LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 0/6] staging: r8188eu: HAL related cleanups
@ 2021-08-18 23:42 Phillip Potter
  2021-08-18 23:42 ` [PATCH 1/6] staging: r8188eu: remove _dbg_dump_tx_info function Phillip Potter
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Phillip Potter @ 2021-08-18 23:42 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, martin, straube.linux, Larry.Finger

This series provides cleanups related to the driver's HAL layer, by
removing certain code which is no longer necessary.

Phillip Potter (6):
  staging: r8188eu: remove _dbg_dump_tx_info function
  staging: r8188eu: remove unused function dump_txrpt_ccx_88e
  staging: r8188eu: remove txrpt_ccx_sw_88e and txrpt_ccx_qtime_88e
    macros
  staging: r8188eu: remove empty function rtl8188eu_free_xmit_priv
  staging: r8188eu: remove function rtw_hal_free_xmit_priv
  staging: r8188eu: remove free_xmit_priv field from struct hal_ops

 drivers/staging/r8188eu/core/rtw_xmit.c       |  2 -
 drivers/staging/r8188eu/hal/hal_intf.c        |  6 ---
 drivers/staging/r8188eu/hal/rtl8188e_xmit.c   | 53 -------------------
 drivers/staging/r8188eu/hal/rtl8188eu_xmit.c  |  5 --
 drivers/staging/r8188eu/hal/usb_halinit.c     |  1 -
 drivers/staging/r8188eu/include/hal_intf.h    |  2 -
 .../staging/r8188eu/include/rtl8188e_xmit.h   |  9 ----
 7 files changed, 78 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 1/6] staging: r8188eu: remove _dbg_dump_tx_info function
  2021-08-18 23:42 [PATCH 0/6] staging: r8188eu: HAL related cleanups Phillip Potter
@ 2021-08-18 23:42 ` Phillip Potter
  2021-08-19  1:34   ` Fabio M. De Francesco
  2021-08-18 23:42 ` [PATCH 2/6] staging: r8188eu: remove unused function dump_txrpt_ccx_88e Phillip Potter
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: Phillip Potter @ 2021-08-18 23:42 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, martin, straube.linux, Larry.Finger

Remove _dbg_dump_tx_info from hal/rtl8188e_xmit.c as it is just a
dumping function that contains a lot of unclear DBG_88E calls, and has
no other external effect, other than calling a function that ultimately
determines whether or not to dump/trigger the DBG_88E calls. Also remove
its declaration and single call site.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
---
 drivers/staging/r8188eu/hal/rtl8188e_xmit.c   | 31 -------------------
 drivers/staging/r8188eu/hal/rtl8188eu_xmit.c  |  1 -
 .../staging/r8188eu/include/rtl8188e_xmit.h   |  3 --
 3 files changed, 35 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/rtl8188e_xmit.c b/drivers/staging/r8188eu/hal/rtl8188e_xmit.c
index 164ec6650dec..d2b55d581f95 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_xmit.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_xmit.c
@@ -42,34 +42,3 @@ void handle_txrpt_ccx_88e(struct adapter *adapter, u8 *buf)
 					RTW_SCTX_DONE_CCX_PKT_FAIL);
 	}
 }
-
-void _dbg_dump_tx_info(struct adapter *padapter, int frame_tag,
-		       struct tx_desc *ptxdesc)
-{
-	u8 dmp_txpkt;
-	bool dump_txdesc = false;
-	rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DUMP_TXPKT, &(dmp_txpkt));
-
-	if (dmp_txpkt == 1) {/* dump txdesc for data frame */
-		DBG_88E("dump tx_desc for data frame\n");
-		if ((frame_tag & 0x0f) == DATA_FRAMETAG)
-			dump_txdesc = true;
-	} else if (dmp_txpkt == 2) {/* dump txdesc for mgnt frame */
-		DBG_88E("dump tx_desc for mgnt frame\n");
-		if ((frame_tag & 0x0f) == MGNT_FRAMETAG)
-			dump_txdesc = true;
-	}
-
-	if (dump_txdesc) {
-		DBG_88E("=====================================\n");
-		DBG_88E("txdw0(0x%08x)\n", ptxdesc->txdw0);
-		DBG_88E("txdw1(0x%08x)\n", ptxdesc->txdw1);
-		DBG_88E("txdw2(0x%08x)\n", ptxdesc->txdw2);
-		DBG_88E("txdw3(0x%08x)\n", ptxdesc->txdw3);
-		DBG_88E("txdw4(0x%08x)\n", ptxdesc->txdw4);
-		DBG_88E("txdw5(0x%08x)\n", ptxdesc->txdw5);
-		DBG_88E("txdw6(0x%08x)\n", ptxdesc->txdw6);
-		DBG_88E("txdw7(0x%08x)\n", ptxdesc->txdw7);
-		DBG_88E("=====================================\n");
-	}
-}
diff --git a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
index 50c4b9382761..b279309405a2 100644
--- a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
+++ b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
@@ -330,7 +330,6 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag
 	ODM_SetTxAntByTxInfo_88E(&haldata->odmpriv, pmem, pattrib->mac_id);
 
 	rtl8188eu_cal_txdesc_chksum(ptxdesc);
-	_dbg_dump_tx_info(adapt, pxmitframe->frame_tag, ptxdesc);
 	return pull;
 }
 
diff --git a/drivers/staging/r8188eu/include/rtl8188e_xmit.h b/drivers/staging/r8188eu/include/rtl8188e_xmit.h
index ff8b73441c52..d2099da1a41a 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_xmit.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_xmit.h
@@ -153,7 +153,4 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *padapter,
 void dump_txrpt_ccx_88e(void *buf);
 void handle_txrpt_ccx_88e(struct adapter *adapter, u8 *buf);
 
-void _dbg_dump_tx_info(struct adapter *padapter, int frame_tag,
-		       struct tx_desc *ptxdesc);
-
 #endif /* __RTL8188E_XMIT_H__ */
-- 
2.31.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 2/6] staging: r8188eu: remove unused function dump_txrpt_ccx_88e
  2021-08-18 23:42 [PATCH 0/6] staging: r8188eu: HAL related cleanups Phillip Potter
  2021-08-18 23:42 ` [PATCH 1/6] staging: r8188eu: remove _dbg_dump_tx_info function Phillip Potter
@ 2021-08-18 23:42 ` Phillip Potter
  2021-08-19  1:38   ` Fabio M. De Francesco
  2021-08-18 23:42 ` [PATCH 3/6] staging: r8188eu: remove txrpt_ccx_sw_88e and txrpt_ccx_qtime_88e macros Phillip Potter
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: Phillip Potter @ 2021-08-18 23:42 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, martin, straube.linux, Larry.Finger

Remove unused function dump_txrpt_ccx_88e from hal/rtl8188e_xmit.c and
remove its declaration in include/rtl8188e_xmit.h, as this function is
not called from anywhere, and is thus dead code.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
---
 drivers/staging/r8188eu/hal/rtl8188e_xmit.c   | 22 -------------------
 .../staging/r8188eu/include/rtl8188e_xmit.h   |  1 -
 2 files changed, 23 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/rtl8188e_xmit.c b/drivers/staging/r8188eu/hal/rtl8188e_xmit.c
index d2b55d581f95..46b871f3f631 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_xmit.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_xmit.c
@@ -7,28 +7,6 @@
 #include "../include/drv_types.h"
 #include "../include/rtl8188e_hal.h"
 
-void dump_txrpt_ccx_88e(void *buf)
-{
-	struct txrpt_ccx_88e *txrpt_ccx = (struct txrpt_ccx_88e *)buf;
-
-	DBG_88E("%s:\n"
-		"tag1:%u, pkt_num:%u, txdma_underflow:%u, int_bt:%u, int_tri:%u, int_ccx:%u\n"
-		"mac_id:%u, pkt_ok:%u, bmc:%u\n"
-		"retry_cnt:%u, lifetime_over:%u, retry_over:%u\n"
-		"ccx_qtime:%u\n"
-		"final_data_rate:0x%02x\n"
-		"qsel:%u, sw:0x%03x\n",
-		__func__, txrpt_ccx->tag1, txrpt_ccx->pkt_num,
-		txrpt_ccx->txdma_underflow, txrpt_ccx->int_bt,
-		txrpt_ccx->int_tri, txrpt_ccx->int_ccx,
-		txrpt_ccx->mac_id, txrpt_ccx->pkt_ok, txrpt_ccx->bmc,
-		txrpt_ccx->retry_cnt, txrpt_ccx->lifetime_over,
-		txrpt_ccx->retry_over, txrpt_ccx_qtime_88e(txrpt_ccx),
-		txrpt_ccx->final_data_rate, txrpt_ccx->qsel,
-		txrpt_ccx_sw_88e(txrpt_ccx)
-	);
-}
-
 void handle_txrpt_ccx_88e(struct adapter *adapter, u8 *buf)
 {
 	struct txrpt_ccx_88e *txrpt_ccx = (struct txrpt_ccx_88e *)buf;
diff --git a/drivers/staging/r8188eu/include/rtl8188e_xmit.h b/drivers/staging/r8188eu/include/rtl8188e_xmit.h
index d2099da1a41a..20b55e3850ba 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_xmit.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_xmit.h
@@ -150,7 +150,6 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *padapter,
 				 struct xmit_priv *pxmitpriv,
 				 struct xmit_buf *pxmitbuf);
 
-void dump_txrpt_ccx_88e(void *buf);
 void handle_txrpt_ccx_88e(struct adapter *adapter, u8 *buf);
 
 #endif /* __RTL8188E_XMIT_H__ */
-- 
2.31.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 3/6] staging: r8188eu: remove txrpt_ccx_sw_88e and txrpt_ccx_qtime_88e macros
  2021-08-18 23:42 [PATCH 0/6] staging: r8188eu: HAL related cleanups Phillip Potter
  2021-08-18 23:42 ` [PATCH 1/6] staging: r8188eu: remove _dbg_dump_tx_info function Phillip Potter
  2021-08-18 23:42 ` [PATCH 2/6] staging: r8188eu: remove unused function dump_txrpt_ccx_88e Phillip Potter
@ 2021-08-18 23:42 ` Phillip Potter
  2021-08-19  1:56   ` Fabio M. De Francesco
  2021-08-18 23:42 ` [PATCH 4/6] staging: r8188eu: remove empty function rtl8188eu_free_xmit_priv Phillip Potter
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: Phillip Potter @ 2021-08-18 23:42 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, martin, straube.linux, Larry.Finger

Remove txrpt_ccx_sw_88e and txrpt_ccx_qtime_88e macro definitions from
include/rtl8188e_xmit.h, as these were only called from the now removed
dump_txrpt_ccx_88e function, which was itself not called from anywhere
anyway.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
---
 drivers/staging/r8188eu/include/rtl8188e_xmit.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/r8188eu/include/rtl8188e_xmit.h b/drivers/staging/r8188eu/include/rtl8188e_xmit.h
index 20b55e3850ba..e7eb19c4ee9d 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_xmit.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_xmit.h
@@ -133,10 +133,6 @@ struct txrpt_ccx_88e {
 	u8 sw0;
 };
 
-#define txrpt_ccx_sw_88e(txrpt_ccx) ((txrpt_ccx)->sw0 + ((txrpt_ccx)->sw1<<8))
-#define txrpt_ccx_qtime_88e(txrpt_ccx)			\
-	((txrpt_ccx)->ccx_qtime0+((txrpt_ccx)->ccx_qtime1<<8))
-
 void rtl8188e_fill_fake_txdesc(struct adapter *padapter, u8 *pDesc,
 			       u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull);
 s32 rtl8188eu_init_xmit_priv(struct adapter *padapter);
-- 
2.31.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 4/6] staging: r8188eu: remove empty function rtl8188eu_free_xmit_priv
  2021-08-18 23:42 [PATCH 0/6] staging: r8188eu: HAL related cleanups Phillip Potter
                   ` (2 preceding siblings ...)
  2021-08-18 23:42 ` [PATCH 3/6] staging: r8188eu: remove txrpt_ccx_sw_88e and txrpt_ccx_qtime_88e macros Phillip Potter
@ 2021-08-18 23:42 ` Phillip Potter
  2021-08-19  2:00   ` Fabio M. De Francesco
  2021-08-18 23:42 ` [PATCH 5/6] staging: r8188eu: remove function rtw_hal_free_xmit_priv Phillip Potter
  2021-08-18 23:42 ` [PATCH 6/6] staging: r8188eu: remove free_xmit_priv field from struct hal_ops Phillip Potter
  5 siblings, 1 reply; 14+ messages in thread
From: Phillip Potter @ 2021-08-18 23:42 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, martin, straube.linux, Larry.Finger

Remove empty function rtl8188eu_free_xmit_priv from hal/rtl8188eu_xmit.c
and its declaration from include/rtl8188e_xmit.h, as well as the one
place where it is stored in the free_xmit_priv function pointer of the
HalFunc struct inside padapter. This is safe, as the wrapper function
checks for NULL before calling this function via the function pointer.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
---
 drivers/staging/r8188eu/hal/rtl8188eu_xmit.c    | 4 ----
 drivers/staging/r8188eu/hal/usb_halinit.c       | 1 -
 drivers/staging/r8188eu/include/rtl8188e_xmit.h | 1 -
 3 files changed, 6 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
index b279309405a2..d22b16cc5a30 100644
--- a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
+++ b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
@@ -19,10 +19,6 @@ s32	rtl8188eu_init_xmit_priv(struct adapter *adapt)
 	return _SUCCESS;
 }
 
-void	rtl8188eu_free_xmit_priv(struct adapter *adapt)
-{
-}
-
 static u8 urb_zero_packet_chk(struct adapter *adapt, int sz)
 {
 	u8 set_tx_desc_offset;
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 2cd835cb90f6..5cdabf43d4fd 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -2243,7 +2243,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
 	halfunc->inirp_deinit = &rtl8188eu_inirp_deinit;
 
 	halfunc->init_xmit_priv = &rtl8188eu_init_xmit_priv;
-	halfunc->free_xmit_priv = &rtl8188eu_free_xmit_priv;
 
 	halfunc->init_recv_priv = &rtl8188eu_init_recv_priv;
 	halfunc->free_recv_priv = &rtl8188eu_free_recv_priv;
diff --git a/drivers/staging/r8188eu/include/rtl8188e_xmit.h b/drivers/staging/r8188eu/include/rtl8188e_xmit.h
index e7eb19c4ee9d..f1f2ccfc765e 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_xmit.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_xmit.h
@@ -136,7 +136,6 @@ struct txrpt_ccx_88e {
 void rtl8188e_fill_fake_txdesc(struct adapter *padapter, u8 *pDesc,
 			       u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull);
 s32 rtl8188eu_init_xmit_priv(struct adapter *padapter);
-void rtl8188eu_free_xmit_priv(struct adapter *padapter);
 s32 rtl8188eu_hal_xmit(struct adapter *padapter, struct xmit_frame *frame);
 s32 rtl8188eu_mgnt_xmit(struct adapter *padapter, struct xmit_frame *frame);
 s32 rtl8188eu_xmit_buf_handler(struct adapter *padapter);
-- 
2.31.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 5/6] staging: r8188eu: remove function rtw_hal_free_xmit_priv
  2021-08-18 23:42 [PATCH 0/6] staging: r8188eu: HAL related cleanups Phillip Potter
                   ` (3 preceding siblings ...)
  2021-08-18 23:42 ` [PATCH 4/6] staging: r8188eu: remove empty function rtl8188eu_free_xmit_priv Phillip Potter
@ 2021-08-18 23:42 ` Phillip Potter
  2021-08-19  2:08   ` Fabio M. De Francesco
  2021-08-18 23:42 ` [PATCH 6/6] staging: r8188eu: remove free_xmit_priv field from struct hal_ops Phillip Potter
  5 siblings, 1 reply; 14+ messages in thread
From: Phillip Potter @ 2021-08-18 23:42 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, martin, straube.linux, Larry.Finger

Remove function rtw_hal_free_xmit_priv in hal/hal_intf.c and its
declaration in include/hal_intf.h, as well as the single call line in
core/rtw_xmit.c. This function now essentially checks a function
pointer which will always be NULL (due to previous patches) and
therefore will never be called.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
---
 drivers/staging/r8188eu/core/rtw_xmit.c    | 2 --
 drivers/staging/r8188eu/hal/hal_intf.c     | 6 ------
 drivers/staging/r8188eu/include/hal_intf.h | 1 -
 3 files changed, 9 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index cdfcf94e4986..69f997f44c07 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -220,8 +220,6 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
 	u32 max_xmit_extbuf_size = MAX_XMIT_EXTBUF_SZ;
 	u32 num_xmit_extbuf = NR_XMIT_EXTBUFF;
 
-	rtw_hal_free_xmit_priv(padapter);
-
 	rtw_mfree_xmit_priv_lock(pxmitpriv);
 
 	if (!pxmitpriv->pxmit_frame_buf)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 47af081bafcd..a6d589e89aeb 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -226,12 +226,6 @@ s32 rtw_hal_init_xmit_priv(struct adapter *adapt)
 	return _FAIL;
 }
 
-void rtw_hal_free_xmit_priv(struct adapter *adapt)
-{
-	if (adapt->HalFunc.free_xmit_priv)
-		adapt->HalFunc.free_xmit_priv(adapt);
-}
-
 s32 rtw_hal_init_recv_priv(struct adapter *adapt)
 {
 	if (adapt->HalFunc.init_recv_priv)
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 37ddb9745350..8a2420095b84 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -356,7 +356,6 @@ s32	rtw_hal_mgnt_xmit(struct adapter *padapter,
 			  struct xmit_frame *pmgntframe);
 
 s32	rtw_hal_init_xmit_priv(struct adapter *padapter);
-void	rtw_hal_free_xmit_priv(struct adapter *padapter);
 
 s32	rtw_hal_init_recv_priv(struct adapter *padapter);
 void	rtw_hal_free_recv_priv(struct adapter *padapter);
-- 
2.31.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 6/6] staging: r8188eu: remove free_xmit_priv field from struct hal_ops
  2021-08-18 23:42 [PATCH 0/6] staging: r8188eu: HAL related cleanups Phillip Potter
                   ` (4 preceding siblings ...)
  2021-08-18 23:42 ` [PATCH 5/6] staging: r8188eu: remove function rtw_hal_free_xmit_priv Phillip Potter
@ 2021-08-18 23:42 ` Phillip Potter
  2021-08-19  3:14   ` Fabio M. De Francesco
  5 siblings, 1 reply; 14+ messages in thread
From: Phillip Potter @ 2021-08-18 23:42 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, martin, straube.linux, Larry.Finger

Remove free_xmit_priv function pointer field from struct hal_ops definition
in include/hal_intf.h, as it is now no longer used anywhere in the driver.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
---
 drivers/staging/r8188eu/include/hal_intf.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 8a2420095b84..fa252540e596 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -139,7 +139,6 @@ struct hal_ops {
 	u32	(*inirp_deinit)(struct adapter *padapter);
 
 	s32	(*init_xmit_priv)(struct adapter *padapter);
-	void	(*free_xmit_priv)(struct adapter *padapter);
 
 	s32	(*init_recv_priv)(struct adapter *padapter);
 	void	(*free_recv_priv)(struct adapter *padapter);
-- 
2.31.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/6] staging: r8188eu: remove _dbg_dump_tx_info function
  2021-08-18 23:42 ` [PATCH 1/6] staging: r8188eu: remove _dbg_dump_tx_info function Phillip Potter
@ 2021-08-19  1:34   ` Fabio M. De Francesco
  0 siblings, 0 replies; 14+ messages in thread
From: Fabio M. De Francesco @ 2021-08-19  1:34 UTC (permalink / raw)
  To: gregkh, Phillip Potter
  Cc: linux-staging, linux-kernel, martin, straube.linux, Larry.Finger

On Thursday, August 19, 2021 1:42:48 AM CEST Phillip Potter wrote:
> Remove _dbg_dump_tx_info from hal/rtl8188e_xmit.c as it is just a
> dumping function that contains a lot of unclear DBG_88E calls, and has
> no other external effect, other than calling a function that ultimately
> determines whether or not to dump/trigger the DBG_88E calls. Also remove
> its declaration and single call site.
> 
> Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
> ---
>  drivers/staging/r8188eu/hal/rtl8188e_xmit.c   | 31 -------------------
>  drivers/staging/r8188eu/hal/rtl8188eu_xmit.c  |  1 -
>  .../staging/r8188eu/include/rtl8188e_xmit.h   |  3 --
>  3 files changed, 35 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/hal/rtl8188e_xmit.c b/drivers/staging/r8188eu/hal/rtl8188e_xmit.c
> index 164ec6650dec..d2b55d581f95 100644
> --- a/drivers/staging/r8188eu/hal/rtl8188e_xmit.c
> +++ b/drivers/staging/r8188eu/hal/rtl8188e_xmit.c
> @@ -42,34 +42,3 @@ void handle_txrpt_ccx_88e(struct adapter *adapter, u8 *buf)
>  					RTW_SCTX_DONE_CCX_PKT_FAIL);
>  	}
>  }
> -
> -void _dbg_dump_tx_info(struct adapter *padapter, int frame_tag,
> -		       struct tx_desc *ptxdesc)
> -{
> -	u8 dmp_txpkt;
> -	bool dump_txdesc = false;
> -	rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DUMP_TXPKT, &(dmp_txpkt));
> -
> -	if (dmp_txpkt == 1) {/* dump txdesc for data frame */
> -		DBG_88E("dump tx_desc for data frame\n");
> -		if ((frame_tag & 0x0f) == DATA_FRAMETAG)
> -			dump_txdesc = true;
> -	} else if (dmp_txpkt == 2) {/* dump txdesc for mgnt frame */
> -		DBG_88E("dump tx_desc for mgnt frame\n");
> -		if ((frame_tag & 0x0f) == MGNT_FRAMETAG)
> -			dump_txdesc = true;
> -	}
> -
> -	if (dump_txdesc) {
> -		DBG_88E("=====================================\n");
> -		DBG_88E("txdw0(0x%08x)\n", ptxdesc->txdw0);
> -		DBG_88E("txdw1(0x%08x)\n", ptxdesc->txdw1);
> -		DBG_88E("txdw2(0x%08x)\n", ptxdesc->txdw2);
> -		DBG_88E("txdw3(0x%08x)\n", ptxdesc->txdw3);
> -		DBG_88E("txdw4(0x%08x)\n", ptxdesc->txdw4);
> -		DBG_88E("txdw5(0x%08x)\n", ptxdesc->txdw5);
> -		DBG_88E("txdw6(0x%08x)\n", ptxdesc->txdw6);
> -		DBG_88E("txdw7(0x%08x)\n", ptxdesc->txdw7);
> -		DBG_88E("=====================================\n");
> -	}
> -}
> diff --git a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
> index 50c4b9382761..b279309405a2 100644
> --- a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
> +++ b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
> @@ -330,7 +330,6 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag
>  	ODM_SetTxAntByTxInfo_88E(&haldata->odmpriv, pmem, pattrib->mac_id);
>  
>  	rtl8188eu_cal_txdesc_chksum(ptxdesc);
> -	_dbg_dump_tx_info(adapt, pxmitframe->frame_tag, ptxdesc);
>  	return pull;
>  }
>  
> diff --git a/drivers/staging/r8188eu/include/rtl8188e_xmit.h b/drivers/staging/r8188eu/include/rtl8188e_xmit.h
> index ff8b73441c52..d2099da1a41a 100644
> --- a/drivers/staging/r8188eu/include/rtl8188e_xmit.h
> +++ b/drivers/staging/r8188eu/include/rtl8188e_xmit.h
> @@ -153,7 +153,4 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *padapter,
>  void dump_txrpt_ccx_88e(void *buf);
>  void handle_txrpt_ccx_88e(struct adapter *adapter, u8 *buf);
>  
> -void _dbg_dump_tx_info(struct adapter *padapter, int frame_tag,
> -		       struct tx_desc *ptxdesc);
> -
>  #endif /* __RTL8188E_XMIT_H__ */
> -- 
> 2.31.1
> 
At a quick look it looks good. 

Built with "make C=2 -j8 drivers/staging/r8188eu/ W=1"
on x86-64, it does not introduce any errors or warnings, so...

Acked-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>

Thanks,

Fabio





^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/6] staging: r8188eu: remove unused function dump_txrpt_ccx_88e
  2021-08-18 23:42 ` [PATCH 2/6] staging: r8188eu: remove unused function dump_txrpt_ccx_88e Phillip Potter
@ 2021-08-19  1:38   ` Fabio M. De Francesco
  0 siblings, 0 replies; 14+ messages in thread
From: Fabio M. De Francesco @ 2021-08-19  1:38 UTC (permalink / raw)
  To: gregkh, Phillip Potter
  Cc: linux-staging, linux-kernel, martin, straube.linux, Larry.Finger

On Thursday, August 19, 2021 1:42:49 AM CEST Phillip Potter wrote:
> Remove unused function dump_txrpt_ccx_88e from hal/rtl8188e_xmit.c and
> remove its declaration in include/rtl8188e_xmit.h, as this function is
> not called from anywhere, and is thus dead code.
> 
> Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
> ---
>  drivers/staging/r8188eu/hal/rtl8188e_xmit.c   | 22 -------------------
>  .../staging/r8188eu/include/rtl8188e_xmit.h   |  1 -
>  2 files changed, 23 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/hal/rtl8188e_xmit.c b/drivers/staging/r8188eu/hal/rtl8188e_xmit.c
> index d2b55d581f95..46b871f3f631 100644
> --- a/drivers/staging/r8188eu/hal/rtl8188e_xmit.c
> +++ b/drivers/staging/r8188eu/hal/rtl8188e_xmit.c
> @@ -7,28 +7,6 @@
>  #include "../include/drv_types.h"
>  #include "../include/rtl8188e_hal.h"
>  
> -void dump_txrpt_ccx_88e(void *buf)
> -{
> -	struct txrpt_ccx_88e *txrpt_ccx = (struct txrpt_ccx_88e *)buf;
> -
> -	DBG_88E("%s:\n"
> -		"tag1:%u, pkt_num:%u, txdma_underflow:%u, int_bt:%u, int_tri:%u, int_ccx:%u\n"
> -		"mac_id:%u, pkt_ok:%u, bmc:%u\n"
> -		"retry_cnt:%u, lifetime_over:%u, retry_over:%u\n"
> -		"ccx_qtime:%u\n"
> -		"final_data_rate:0x%02x\n"
> -		"qsel:%u, sw:0x%03x\n",
> -		__func__, txrpt_ccx->tag1, txrpt_ccx->pkt_num,
> -		txrpt_ccx->txdma_underflow, txrpt_ccx->int_bt,
> -		txrpt_ccx->int_tri, txrpt_ccx->int_ccx,
> -		txrpt_ccx->mac_id, txrpt_ccx->pkt_ok, txrpt_ccx->bmc,
> -		txrpt_ccx->retry_cnt, txrpt_ccx->lifetime_over,
> -		txrpt_ccx->retry_over, txrpt_ccx_qtime_88e(txrpt_ccx),
> -		txrpt_ccx->final_data_rate, txrpt_ccx->qsel,
> -		txrpt_ccx_sw_88e(txrpt_ccx)
> -	);
> -}
> -
>  void handle_txrpt_ccx_88e(struct adapter *adapter, u8 *buf)
>  {
>  	struct txrpt_ccx_88e *txrpt_ccx = (struct txrpt_ccx_88e *)buf;
> diff --git a/drivers/staging/r8188eu/include/rtl8188e_xmit.h b/drivers/staging/r8188eu/include/rtl8188e_xmit.h
> index d2099da1a41a..20b55e3850ba 100644
> --- a/drivers/staging/r8188eu/include/rtl8188e_xmit.h
> +++ b/drivers/staging/r8188eu/include/rtl8188e_xmit.h
> @@ -150,7 +150,6 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *padapter,
>  				 struct xmit_priv *pxmitpriv,
>  				 struct xmit_buf *pxmitbuf);
>  
> -void dump_txrpt_ccx_88e(void *buf);
>  void handle_txrpt_ccx_88e(struct adapter *adapter, u8 *buf);
>  
>  #endif /* __RTL8188E_XMIT_H__ */
> -- 
> 2.31.1
> 
At a quick look it looks good. 

Built with "make C=2 -j8 drivers/staging/r8188eu/ W=1"
on x86-64, it does not introduce any errors or warnings, so...

Acked-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>

Thanks,

Fabio




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/6] staging: r8188eu: remove txrpt_ccx_sw_88e and txrpt_ccx_qtime_88e macros
  2021-08-18 23:42 ` [PATCH 3/6] staging: r8188eu: remove txrpt_ccx_sw_88e and txrpt_ccx_qtime_88e macros Phillip Potter
@ 2021-08-19  1:56   ` Fabio M. De Francesco
  0 siblings, 0 replies; 14+ messages in thread
From: Fabio M. De Francesco @ 2021-08-19  1:56 UTC (permalink / raw)
  To: gregkh, Phillip Potter
  Cc: linux-staging, linux-kernel, martin, straube.linux, Larry.Finger

On Thursday, August 19, 2021 1:42:50 AM CEST Phillip Potter wrote:
> Remove txrpt_ccx_sw_88e and txrpt_ccx_qtime_88e macro definitions from
> include/rtl8188e_xmit.h, as these were only called from the now removed
> dump_txrpt_ccx_88e function, which was itself not called from anywhere
> anyway.
> 
> Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
> ---
>  drivers/staging/r8188eu/include/rtl8188e_xmit.h | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/include/rtl8188e_xmit.h b/drivers/staging/r8188eu/include/rtl8188e_xmit.h
> index 20b55e3850ba..e7eb19c4ee9d 100644
> --- a/drivers/staging/r8188eu/include/rtl8188e_xmit.h
> +++ b/drivers/staging/r8188eu/include/rtl8188e_xmit.h
> @@ -133,10 +133,6 @@ struct txrpt_ccx_88e {
>  	u8 sw0;
>  };
>  
> -#define txrpt_ccx_sw_88e(txrpt_ccx) ((txrpt_ccx)->sw0 + ((txrpt_ccx)->sw1<<8))
> -#define txrpt_ccx_qtime_88e(txrpt_ccx)			\
> -	((txrpt_ccx)->ccx_qtime0+((txrpt_ccx)->ccx_qtime1<<8))
> -
>  void rtl8188e_fill_fake_txdesc(struct adapter *padapter, u8 *pDesc,
>  			       u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull);
>  s32 rtl8188eu_init_xmit_priv(struct adapter *padapter);
> -- 
> 2.31.1
> 
At a quick look it looks good. 

Built with "make C=2 -j8 drivers/staging/r8188eu/ W=1"
on x86-64, it does not introduce any errors or warnings, so...

Acked-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>

Thanks,

Fabio




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/6] staging: r8188eu: remove empty function rtl8188eu_free_xmit_priv
  2021-08-18 23:42 ` [PATCH 4/6] staging: r8188eu: remove empty function rtl8188eu_free_xmit_priv Phillip Potter
@ 2021-08-19  2:00   ` Fabio M. De Francesco
  0 siblings, 0 replies; 14+ messages in thread
From: Fabio M. De Francesco @ 2021-08-19  2:00 UTC (permalink / raw)
  To: gregkh, Phillip Potter
  Cc: linux-staging, linux-kernel, martin, straube.linux, Larry.Finger

On Thursday, August 19, 2021 1:42:51 AM CEST Phillip Potter wrote:
> Remove empty function rtl8188eu_free_xmit_priv from hal/rtl8188eu_xmit.c
> and its declaration from include/rtl8188e_xmit.h, as well as the one
> place where it is stored in the free_xmit_priv function pointer of the
> HalFunc struct inside padapter. This is safe, as the wrapper function
> checks for NULL before calling this function via the function pointer.
> 
> Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
> ---
>  drivers/staging/r8188eu/hal/rtl8188eu_xmit.c    | 4 ----
>  drivers/staging/r8188eu/hal/usb_halinit.c       | 1 -
>  drivers/staging/r8188eu/include/rtl8188e_xmit.h | 1 -
>  3 files changed, 6 deletions(-)
> 
It looks good, so...

Acked-by: Fabio M. De Francesco

Thanks,

Fabio



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 5/6] staging: r8188eu: remove function rtw_hal_free_xmit_priv
  2021-08-18 23:42 ` [PATCH 5/6] staging: r8188eu: remove function rtw_hal_free_xmit_priv Phillip Potter
@ 2021-08-19  2:08   ` Fabio M. De Francesco
  0 siblings, 0 replies; 14+ messages in thread
From: Fabio M. De Francesco @ 2021-08-19  2:08 UTC (permalink / raw)
  To: gregkh, Phillip Potter
  Cc: linux-staging, linux-kernel, martin, straube.linux, Larry.Finger

On Thursday, August 19, 2021 1:42:52 AM CEST Phillip Potter wrote:
> Remove function rtw_hal_free_xmit_priv in hal/hal_intf.c and its
> declaration in include/hal_intf.h, as well as the single call line in
> core/rtw_xmit.c. This function now essentially checks a function
> pointer which will always be NULL (due to previous patches) and
> therefore will never be called.
> 
> Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
> ---
>  drivers/staging/r8188eu/core/rtw_xmit.c    | 2 --
>  drivers/staging/r8188eu/hal/hal_intf.c     | 6 ------
>  drivers/staging/r8188eu/include/hal_intf.h | 1 -
>  3 files changed, 9 deletions(-)

It looks good. 

Built with "make C=2 -j8 drivers/staging/r8188eu/ W=1"
on x86-64, it does not introduce errors or new warnings, so...

Acked-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>

Thanks,

Fabio




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 6/6] staging: r8188eu: remove free_xmit_priv field from struct hal_ops
  2021-08-18 23:42 ` [PATCH 6/6] staging: r8188eu: remove free_xmit_priv field from struct hal_ops Phillip Potter
@ 2021-08-19  3:14   ` Fabio M. De Francesco
  2021-08-20 21:56     ` Phillip Potter
  0 siblings, 1 reply; 14+ messages in thread
From: Fabio M. De Francesco @ 2021-08-19  3:14 UTC (permalink / raw)
  To: gregkh, Phillip Potter
  Cc: linux-staging, linux-kernel, martin, straube.linux, Larry.Finger

On Thursday, August 19, 2021 1:42:53 AM CEST Phillip Potter wrote:
> Remove free_xmit_priv function pointer field from struct hal_ops definition
> in include/hal_intf.h, as it is now no longer used anywhere in the driver.
> 
> Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
> ---
>  drivers/staging/r8188eu/include/hal_intf.h | 1 -
>  1 file changed, 1 deletion(-)

This entry could have been removed in patch 4/6 or 5/6, but I guess 
it's okay to do that here as well. Perhaps the three patches from 4/6 
to 6/6 could have been merged into one (because since 4/6 was 
immediately clear that this operation has no use at all).

Aside from the above considerations, it looks good. So...

Acked by: Fabio M. De Francesco <fmdefrancesco@gmail.com>

Thanks,

Fabio





^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 6/6] staging: r8188eu: remove free_xmit_priv field from struct hal_ops
  2021-08-19  3:14   ` Fabio M. De Francesco
@ 2021-08-20 21:56     ` Phillip Potter
  0 siblings, 0 replies; 14+ messages in thread
From: Phillip Potter @ 2021-08-20 21:56 UTC (permalink / raw)
  To: Fabio M. De Francesco
  Cc: linux-staging, linux-kernel, martin, straube.linux, Larry.Finger,
	Greg KH

On Thu, 2021-08-19 at 05:14 +0200, Fabio M. De Francesco wrote:
> On Thursday, August 19, 2021 1:42:53 AM CEST Phillip Potter wrote:
> > Remove free_xmit_priv function pointer field from struct hal_ops
> > definition
> > in include/hal_intf.h, as it is now no longer used anywhere in the
> > driver.
> > 
> > Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
> > ---
> >  drivers/staging/r8188eu/include/hal_intf.h | 1 -
> >  1 file changed, 1 deletion(-)
> 
> This entry could have been removed in patch 4/6 or 5/6, but I guess 
> it's okay to do that here as well. Perhaps the three patches from 4/6
> to 6/6 could have been merged into one (because since 4/6 was 
> immediately clear that this operation has no use at all).
> 
> Aside from the above considerations, it looks good. So...
> 
> Acked by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> 
> Thanks,
> 
> Fabio
> 
> 
> 
> 

Dear Fabio,

Thank you for your feedback and acknowledgements for this series, much
appreciated.

Regards,
Phil


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-08-20 21:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 23:42 [PATCH 0/6] staging: r8188eu: HAL related cleanups Phillip Potter
2021-08-18 23:42 ` [PATCH 1/6] staging: r8188eu: remove _dbg_dump_tx_info function Phillip Potter
2021-08-19  1:34   ` Fabio M. De Francesco
2021-08-18 23:42 ` [PATCH 2/6] staging: r8188eu: remove unused function dump_txrpt_ccx_88e Phillip Potter
2021-08-19  1:38   ` Fabio M. De Francesco
2021-08-18 23:42 ` [PATCH 3/6] staging: r8188eu: remove txrpt_ccx_sw_88e and txrpt_ccx_qtime_88e macros Phillip Potter
2021-08-19  1:56   ` Fabio M. De Francesco
2021-08-18 23:42 ` [PATCH 4/6] staging: r8188eu: remove empty function rtl8188eu_free_xmit_priv Phillip Potter
2021-08-19  2:00   ` Fabio M. De Francesco
2021-08-18 23:42 ` [PATCH 5/6] staging: r8188eu: remove function rtw_hal_free_xmit_priv Phillip Potter
2021-08-19  2:08   ` Fabio M. De Francesco
2021-08-18 23:42 ` [PATCH 6/6] staging: r8188eu: remove free_xmit_priv field from struct hal_ops Phillip Potter
2021-08-19  3:14   ` Fabio M. De Francesco
2021-08-20 21:56     ` Phillip Potter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).