Skip to contentSkip to conversation

Staging: rtl8192e: Series-A Rename struct rx_ts_record references

PATCH New Tree Davies 2 participants 10 messages Aug 13, 2023 Staging

lore
Share & tools
lore
#0 lore raw

cover Staging: rtl8192e: Series-A Rename struct rx_ts_record references

This is the First series, Series-A, of a 3 part patch-series, which should be applied in the order of A, B and then C.

This 3 part patch series fixes checkpatch warning Avoid CamelCase, for all references of struct rx_ts_record, and renames them to rx_ts for consistency and readability. Each patch renames references for a single function.

These 6 patches were previously sent as patches 1 through 6, of 16, on 8/12/2023 - 16:15:06 EST, but the email submission process was interupted/throttled - thus why this is a 3 part series. Although patches are the same, they are marked v2.

Thank you in advance to the reviewers
~ Tree

Tree Davies (6):
Staging: rtl8192e: Rename variable pBa in function rx_ts_delete_ba()
Staging: rtl8192e: Rename variable pTS in function
rtllib_rx_ADDBAReq()
Staging: rtl8192e: Rename variable pRxTs in function rtllib_rx_DELBA()
Staging: rtl8192e: Rename variable pRxTs in function

    rtllib_ts_init_del_ba()

Staging: rtl8192e: Rename variable pRxTs in function
rtllib_rx_ba_inact_timeout()
Staging: rtl8192e: Rename variable pRxTs in function
RxPktPendingTimeout()

 drivers/staging/rtl8192e/rtl819x_BAProc.c | 36 +++++++++++------------
 drivers/staging/rtl8192e/rtl819x_TSProc.c | 32 ++++++++++----------
 2 files changed, 34 insertions(+), 34 deletions(-)
Signature · 1 line
2.41.0
#1 lore raw

PATCH v2 1/6 Staging: rtl8192e: Rename variable pBa in function rx_ts_delete_ba()

Rename variable pBa in function rx_ts_delete_ba() to rx_ts to fix checkpatch warning Avoid CamelCase.

---
v2:Resending in smaller patch series

 drivers/staging/rtl8192e/rtl819x_BAProc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192e/rtl819x_BAProc.c +2 -2
index 0e3372868f97..1eff30533f47 100644
@@ -41,9 +41,9 @@ static u8 tx_ts_delete_ba(struct rtllib_device *ieee, struct tx_ts_record *pTxTs
 	return bSendDELBA;
 }
 
-static u8 rx_ts_delete_ba(struct rtllib_device *ieee, struct rx_ts_record *pRxTs)
+static u8 rx_ts_delete_ba(struct rtllib_device *ieee, struct rx_ts_record *rx_ts)
 {
-	struct ba_record *pBa = &pRxTs->rx_admitted_ba_record;
+	struct ba_record *pBa = &rx_ts->rx_admitted_ba_record;
 	u8			bSendDELBA = false;
 
 	if (pBa->b_valid) {
Signature · 1 line
2.41.0
maintainer
#2 lore raw

Re: [PATCH v2 1/6] Staging: rtl8192e: Rename variable pBa in function rx_ts_delete_ba()

Quoted 14 lines · Tree Davies

Rename variable pBa in function rx_ts_delete_ba() to rx_ts to fix checkpatch warning Avoid CamelCase.

---
v2:Resending in smaller patch series

 drivers/staging/rtl8192e/rtl819x_BAProc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192e/rtl819x_BAProc.c +0 -0
index 0e3372868f97..1eff30533f47 100644

drivers/staging/rtl8192e/rtl819x_BAProc.c static u8 tx_ts_delete_ba(struct rtllib_device *ieee, struct tx_ts_record *pTxTs · line 46

Quoted 8 lines
drivers/staging/rtl8192e/rtl819x_BAProc.c +2 -2
@@ -41,9 +41,9 @@ static u8 tx_ts_delete_ba(struct rtllib_device *ieee, struct tx_ts_record *pTxTs
 	return bSendDELBA;
 }
 
-static u8 rx_ts_delete_ba(struct rtllib_device *ieee, struct rx_ts_record *pRxTs)
+static u8 rx_ts_delete_ba(struct rtllib_device *ieee, struct rx_ts_record *rx_ts)
 {
-	struct ba_record *pBa = &pRxTs->rx_admitted_ba_record;
+	struct ba_record *pBa = &rx_ts->rx_admitted_ba_record;

I think your description is wrong here, you are not renaming the pBa variable.

thanks,

greg k-h

#3 lore raw

PATCH v2 2/6 Staging: rtl8192e: Rename variable pTS in function rtllib_rx_ADDBAReq()

In reply to Tree Davies

Rename variable pTS in function rtllib_rx_ADDBAReq() to rx_ts to fix checkpatch warning Avoid CamelCase.

---
v2:Resending in smaller patch series

 drivers/staging/rtl8192e/rtl819x_BAProc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8192e/rtl819x_BAProc.c +4 -4
index 1eff30533f47..2748ab59545c 100644
@@ -220,7 +220,7 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
 	union ba_param_set *pBaParamSet = NULL;
 	u16 *pBaTimeoutVal = NULL;
 	union sequence_control *pBaStartSeqCtrl = NULL;
-	struct rx_ts_record *pTS = NULL;
+	struct rx_ts_record *rx_ts = NULL;
 
 	if (skb->len < sizeof(struct rtllib_hdr_3addr) + 9) {
 		netdev_warn(ieee->dev, "Invalid skb len in BAREQ(%d / %d)\n",
@@ -253,13 +253,13 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
 			    ieee->ht_info->bCurrentHTSupport);
 		goto OnADDBAReq_Fail;
 	}
-	if (!GetTs(ieee, (struct ts_common_info **)&pTS, dst,
+	if (!GetTs(ieee, (struct ts_common_info **)&rx_ts, dst,
 		   (u8)(pBaParamSet->field.tid), RX_DIR, true)) {
 		rc = ADDBA_STATUS_REFUSED;
 		netdev_warn(ieee->dev, "%s(): can't get TS\n", __func__);
 		goto OnADDBAReq_Fail;
 	}
-	pBA = &pTS->rx_admitted_ba_record;
+	pBA = &rx_ts->rx_admitted_ba_record;
 
 	if (pBaParamSet->field.ba_policy == BA_POLICY_DELAYED) {
 		rc = ADDBA_STATUS_INVALID_PARAM;
@@ -268,7 +268,7 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
 		goto OnADDBAReq_Fail;
 	}
 
-	rtllib_FlushRxTsPendingPkts(ieee, pTS);
+	rtllib_FlushRxTsPendingPkts(ieee, rx_ts);
 
 	deactivate_ba_entry(ieee, pBA);
 	pBA->dialog_token = *pDialogToken;
Signature · 1 line
2.41.0
maintainer
#4 lore raw

Re: [PATCH v2 2/6] Staging: rtl8192e: Rename variable pTS in function rtllib_rx_ADDBAReq()

Quoted 14 lines · Tree Davies

Rename variable pTS in function rtllib_rx_ADDBAReq() to rx_ts to fix checkpatch warning Avoid CamelCase.

---
v2:Resending in smaller patch series

 drivers/staging/rtl8192e/rtl819x_BAProc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8192e/rtl819x_BAProc.c +0 -0
index 1eff30533f47..2748ab59545c 100644

drivers/staging/rtl8192e/rtl819x_BAProc.c int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb) · line 223

Quoted 5 lines
drivers/staging/rtl8192e/rtl819x_BAProc.c +1 -1
@@ -220,7 +220,7 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
 	union ba_param_set *pBaParamSet = NULL;
 	u16 *pBaTimeoutVal = NULL;
 	union sequence_control *pBaStartSeqCtrl = NULL;
-	struct rx_ts_record *pTS = NULL;
+	struct rx_ts_record *rx_ts = NULL;

This should just be called "ts" as that's what it is being used for, as the original name says.

I've stopped reviewing the series here, please go through and make sure all of your renames make logical sense as that is important when reading the code in the future.

thanks,

greg k-h

#5 lore raw

Re: [PATCH v2 2/6] Staging: rtl8192e: Rename variable pTS in function rtllib_rx_ADDBAReq()

Quoted 24 lines · Greg KH
Quoted 14 lines · Tree Davies

Rename variable pTS in function rtllib_rx_ADDBAReq() to rx_ts to fix checkpatch warning Avoid CamelCase.

---
v2:Resending in smaller patch series

 drivers/staging/rtl8192e/rtl819x_BAProc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8192e/rtl819x_BAProc.c +0 -0
index 1eff30533f47..2748ab59545c 100644

drivers/staging/rtl8192e/rtl819x_BAProc.c int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb) · line 223

Quoted 5 lines
drivers/staging/rtl8192e/rtl819x_BAProc.c +1 -1
@@ -220,7 +220,7 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
 	union ba_param_set *pBaParamSet = NULL;
 	u16 *pBaTimeoutVal = NULL;
 	union sequence_control *pBaStartSeqCtrl = NULL;
-	struct rx_ts_record *pTS = NULL;
+	struct rx_ts_record *rx_ts = NULL;

This should just be called "ts" as that's what it is being used for, as the original name says.

Quoted 7 lines

I've stopped reviewing the series here, please go through and make sure all of your renames make logical sense as that is important when reading the code in the future.

thanks,

greg k-h

Thanks Greg, will fix.
~Tree

#6 lore raw

PATCH v2 3/6 Staging: rtl8192e: Rename variable pRxTs in function rtllib_rx_DELBA()

In reply to Tree Davies

Rename variable pRxTs in function rtllib_rx_DELBA() to rx_ts to fix checkpatch warning Avoid CamelCase.

---
v2:Resending in smaller patch series

 drivers/staging/rtl8192e/rtl819x_BAProc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192e/rtl819x_BAProc.c +3 -3
index 2748ab59545c..39a5da44b8eb 100644
@@ -430,9 +430,9 @@ int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb)
 	pDelBaParamSet = (union delba_param_set *)&delba->payload[2];
 
 	if (pDelBaParamSet->field.initiator == 1) {
-		struct rx_ts_record *pRxTs;
+		struct rx_ts_record *rx_ts;
 
-		if (!GetTs(ieee, (struct ts_common_info **)&pRxTs, dst,
+		if (!GetTs(ieee, (struct ts_common_info **)&rx_ts, dst,
 			   (u8)pDelBaParamSet->field.tid, RX_DIR, false)) {
 			netdev_warn(ieee->dev,
 				    "%s(): can't get TS for RXTS. dst:%pM TID:%d\n",
@@ -441,7 +441,7 @@ int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb)
 			return -1;
 		}
 
-		rx_ts_delete_ba(ieee, pRxTs);
+		rx_ts_delete_ba(ieee, rx_ts);
 	} else {
 		struct tx_ts_record *pTxTs;
 
Signature · 1 line
2.41.0
#7 lore raw

PATCH v2 4/6 Staging: rtl8192e: Rename variable pRxTs in function rtllib_ts_init_del_ba()

In reply to Tree Davies

Rename variable pRxTs in function rtllib_ts_init_del_ba() to rx_ts to fix checkpatch warning Avoid CamelCase.

---
v2:Resending in smaller patch series

 drivers/staging/rtl8192e/rtl819x_BAProc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192e/rtl819x_BAProc.c +3 -3
index 39a5da44b8eb..da2e53dea8e0 100644
@@ -499,11 +499,11 @@ void rtllib_ts_init_del_ba(struct rtllib_device *ieee,
 					(&pTxTs->TxPendingBARecord),
 					 TxRxSelect, DELBA_REASON_END_BA);
 	} else if (TxRxSelect == RX_DIR) {
-		struct rx_ts_record *pRxTs =
+		struct rx_ts_record *rx_ts =
 				 (struct rx_ts_record *)pTsCommonInfo;
-		if (rx_ts_delete_ba(ieee, pRxTs))
+		if (rx_ts_delete_ba(ieee, rx_ts))
 			rtllib_send_DELBA(ieee, pTsCommonInfo->Addr,
-					  &pRxTs->rx_admitted_ba_record,
+					  &rx_ts->rx_admitted_ba_record,
 					  TxRxSelect, DELBA_REASON_END_BA);
 	}
 }
Signature · 1 line
2.41.0
#8 lore raw

PATCH v2 5/6 Staging: rtl8192e: Rename variable pRxTs in function rtllib_rx_ba_inact_timeout()

In reply to Tree Davies

Rename varialbe pRxTs in function rtllib_rx_ba_inact_timeout() to rx_ts to fix checkpatch warning Avoid CamelCase.

---
v2:Resending in smaller patch series

 drivers/staging/rtl8192e/rtl819x_BAProc.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8192e/rtl819x_BAProc.c +6 -6
index da2e53dea8e0..d3f1454ba5b0 100644
@@ -532,13 +532,13 @@ void rtllib_tx_ba_inact_timeout(struct timer_list *t)
 
 void rtllib_rx_ba_inact_timeout(struct timer_list *t)
 {
-	struct rx_ts_record *pRxTs = from_timer(pRxTs, t,
+	struct rx_ts_record *rx_ts = from_timer(rx_ts, t,
 					      rx_admitted_ba_record.timer);
-	struct rtllib_device *ieee = container_of(pRxTs, struct rtllib_device,
-				     RxTsRecord[pRxTs->num]);
+	struct rtllib_device *ieee = container_of(rx_ts, struct rtllib_device,
+				     RxTsRecord[rx_ts->num]);
 
-	rx_ts_delete_ba(ieee, pRxTs);
-	rtllib_send_DELBA(ieee, pRxTs->ts_common_info.Addr,
-			  &pRxTs->rx_admitted_ba_record, RX_DIR,
+	rx_ts_delete_ba(ieee, rx_ts);
+	rtllib_send_DELBA(ieee, rx_ts->ts_common_info.Addr,
+			  &rx_ts->rx_admitted_ba_record, RX_DIR,
 			  DELBA_REASON_TIMEOUT);
 }
Signature · 1 line
2.41.0
#9 lore raw

PATCH v2 6/6 Staging: rtl8192e: Rename variable pRxTs in function RxPktPendingTimeout()

In reply to Tree Davies

Rename variable pRxTs in function RxPktPendingTimeout() to rx_ts to fix checkpatch warning Avoid CamelCase.

---
v2:Resending in smaller patch series

 drivers/staging/rtl8192e/rtl819x_TSProc.c | 32 +++++++++++------------
 1 file changed, 16 insertions(+), 16 deletions(-)
drivers/staging/rtl8192e/rtl819x_TSProc.c +16 -16
index 24a8b9fc0168..1c78134fc625 100644
@@ -10,10 +10,10 @@
 
 static void RxPktPendingTimeout(struct timer_list *t)
 {
-	struct rx_ts_record *pRxTs = from_timer(pRxTs, t,
+	struct rx_ts_record *rx_ts = from_timer(rx_ts, t,
 						     rx_pkt_pending_timer);
-	struct rtllib_device *ieee = container_of(pRxTs, struct rtllib_device,
-						  RxTsRecord[pRxTs->num]);
+	struct rtllib_device *ieee = container_of(rx_ts, struct rtllib_device,
+						  RxTsRecord[rx_ts->num]);
 
 	struct rx_reorder_entry *pReorderEntry = NULL;
 
@@ -22,24 +22,24 @@ static void RxPktPendingTimeout(struct timer_list *t)
 	bool bPktInBuf = false;
 
 	spin_lock_irqsave(&(ieee->reorder_spinlock), flags);
-	if (pRxTs->rx_timeout_indicate_seq != 0xffff) {
-		while (!list_empty(&pRxTs->rx_pending_pkt_list)) {
+	if (rx_ts->rx_timeout_indicate_seq != 0xffff) {
+		while (!list_empty(&rx_ts->rx_pending_pkt_list)) {
 			pReorderEntry = (struct rx_reorder_entry *)
-					list_entry(pRxTs->rx_pending_pkt_list.prev,
+					list_entry(rx_ts->rx_pending_pkt_list.prev,
 					struct rx_reorder_entry, List);
 			if (index == 0)
-				pRxTs->rx_indicate_seq = pReorderEntry->SeqNum;
+				rx_ts->rx_indicate_seq = pReorderEntry->SeqNum;
 
 			if (SN_LESS(pReorderEntry->SeqNum,
-				    pRxTs->rx_indicate_seq) ||
+				    rx_ts->rx_indicate_seq) ||
 			    SN_EQUAL(pReorderEntry->SeqNum,
-				     pRxTs->rx_indicate_seq)) {
+				     rx_ts->rx_indicate_seq)) {
 				list_del_init(&pReorderEntry->List);
 
 				if (SN_EQUAL(pReorderEntry->SeqNum,
-				    pRxTs->rx_indicate_seq))
-					pRxTs->rx_indicate_seq =
-					      (pRxTs->rx_indicate_seq + 1) % 4096;
+				    rx_ts->rx_indicate_seq))
+					rx_ts->rx_indicate_seq =
+					      (rx_ts->rx_indicate_seq + 1) % 4096;
 
 				netdev_dbg(ieee->dev,
 					   "%s(): Indicate SeqNum: %d\n",
@@ -58,7 +58,7 @@ static void RxPktPendingTimeout(struct timer_list *t)
 	}
 
 	if (index > 0) {
-		pRxTs->rx_timeout_indicate_seq = 0xffff;
+		rx_ts->rx_timeout_indicate_seq = 0xffff;
 
 		if (index > REORDER_WIN_SIZE) {
 			netdev_warn(ieee->dev,
@@ -72,9 +72,9 @@ static void RxPktPendingTimeout(struct timer_list *t)
 		bPktInBuf = false;
 	}
 
-	if (bPktInBuf && (pRxTs->rx_timeout_indicate_seq == 0xffff)) {
-		pRxTs->rx_timeout_indicate_seq = pRxTs->rx_indicate_seq;
-		mod_timer(&pRxTs->rx_pkt_pending_timer,  jiffies +
+	if (bPktInBuf && (rx_ts->rx_timeout_indicate_seq == 0xffff)) {
+		rx_ts->rx_timeout_indicate_seq = rx_ts->rx_indicate_seq;
+		mod_timer(&rx_ts->rx_pkt_pending_timer,  jiffies +
 			  msecs_to_jiffies(ieee->ht_info->rx_reorder_pending_time)
 			  );
 	}
Signature · 1 line
2.41.0