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(-)
--
2.41.0
Rename variable pTS in function rtllib_rx_ADDBAReq() to rx_ts
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2:Resending in smaller patch series
drivers/staging/rtl8192e/rtl819x_BAProc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
index 1eff30533f47..2748ab59545c 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -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;
--
2.41.0
Rename variable pRxTs in function rtllib_rx_DELBA() to rx_ts
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2:Resending in smaller patch series
drivers/staging/rtl8192e/rtl819x_BAProc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
index 2748ab59545c..39a5da44b8eb 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -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;
--
2.41.0
Rename variable pRxTs in function rtllib_ts_init_del_ba() to rx_ts
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2:Resending in smaller patch series
drivers/staging/rtl8192e/rtl819x_BAProc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
index 39a5da44b8eb..da2e53dea8e0 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -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);
}
}
--
2.41.0
Rename variable pBa in function rx_ts_delete_ba() to rx_ts
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2:Resending in smaller patch series
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 0e3372868f97..1eff30533f47 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -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) {
--
2.41.0
On Sun, Aug 13, 2023 at 08:55:21AM +0200, Greg KH wrote:
> On Sat, Aug 12, 2023 at 11:50:31PM -0700, Tree Davies wrote:
> > Rename variable pTS in function rtllib_rx_ADDBAReq() to rx_ts
> > to fix checkpatch warning Avoid CamelCase.
> >
> > Signed-off-by: Tree Davies <[email protected]>
> > ---
> > v2:Resending in smaller patch series
> > drivers/staging/rtl8192e/rtl819x_BAProc.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
> > index 1eff30533f47..2748ab59545c 100644
> > --- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
> > +++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
> > @@ -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
Thanks Greg, will fix.
~Tree
Rename variable pRxTs in function RxPktPendingTimeout() to rx_ts
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2:Resending in smaller patch series
drivers/staging/rtl8192e/rtl819x_TSProc.c | 32 +++++++++++------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index 24a8b9fc0168..1c78134fc625 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -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)
);
}
--
2.41.0
Rename varialbe pRxTs in function rtllib_rx_ba_inact_timeout() to rx_ts
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2:Resending in smaller patch series
drivers/staging/rtl8192e/rtl819x_BAProc.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
index da2e53dea8e0..d3f1454ba5b0 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -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);
}
--
2.41.0
On Sat, Aug 12, 2023 at 11:50:31PM -0700, Tree Davies wrote:
> Rename variable pTS in function rtllib_rx_ADDBAReq() to rx_ts
> to fix checkpatch warning Avoid CamelCase.
>
> Signed-off-by: Tree Davies <[email protected]>
> ---
> v2:Resending in smaller patch series
> drivers/staging/rtl8192e/rtl819x_BAProc.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
> index 1eff30533f47..2748ab59545c 100644
> --- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
> +++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
> @@ -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