* [PATCH 0/5] staging: rtl8192e: rtllib_tx: code cleanup patches on the rtllib_tx.c file
@ 2022-10-24 12:25 Aaron Lawrence
2022-10-24 12:26 ` [PATCH 1/5] Staging: rtl8192e: rtllib_tx: fixed multiple blank lines Aaron Lawrence
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Aaron Lawrence @ 2022-10-24 12:25 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel
Multiple patches regarding the cleanup of code in the rtllib_tx.c file.
Fixes were applied according to the report generated by the checkpatch
script on said file, aside from the CamelCase issues.
Aaron Lawrence (5):
Staging: rtl8192e: rtllib_tx: fixed multiple blank lines
Staging: rtl8192e: rtllib_tx: fixed alignment matching open
parenthesis
Staging: rtl8192e: rtllib_tx: added spaces around operators
Staging: rtl8192e: rtllib_tx: fixed lines ending with an open
parenthesis
Staging: rtl8192e: rtllib_tx: removed unnecessary blank line before a
close brace
drivers/staging/rtl8192e/rtllib_tx.c | 42 ++++++++++++----------------
1 file changed, 18 insertions(+), 24 deletions(-)
--
2.38.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/5] Staging: rtl8192e: rtllib_tx: fixed multiple blank lines
2022-10-24 12:25 [PATCH 0/5] staging: rtl8192e: rtllib_tx: code cleanup patches on the rtllib_tx.c file Aaron Lawrence
@ 2022-10-24 12:26 ` Aaron Lawrence
2022-10-24 12:26 ` [PATCH 2/5] Staging: rtl8192e: rtllib_tx: fixed alignment matching open parenthesis Aaron Lawrence
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Aaron Lawrence @ 2022-10-24 12:26 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel
Multiple blank lines are condensed into a single blank line as per
the Linux kernel coding-style regulations. The issues were flagged
by the checkpatch script.
Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
---
drivers/staging/rtl8192e/rtllib_tx.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index e307020580a0..abb5b57d142b 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -191,7 +191,6 @@ int rtllib_encrypt_fragment(struct rtllib_device *ieee, struct sk_buff *frag,
return 0;
}
-
void rtllib_txb_free(struct rtllib_txb *txb)
{
if (unlikely(!txb))
@@ -475,7 +474,6 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,
tcb_desc->bRTSBW = false;
}
-
static void rtllib_txrate_selectmode(struct rtllib_device *ieee,
struct cb_desc *tcb_desc)
{
@@ -582,7 +580,6 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
goto success;
}
-
if (likely(ieee->raw_tx == 0)) {
if (unlikely(skb->len < SNAP_SIZE + sizeof(u16))) {
netdev_warn(ieee->dev, "skb too small (%d).\n",
@@ -895,7 +892,6 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
tcb_desc->bTxDisableRateFallBack = 1;
}
-
tcb_desc->RATRIndex = 7;
tcb_desc->bTxUseDriverAssingedRate = 1;
} else {
@@ -920,7 +916,6 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
tcb_desc->bTxDisableRateFallBack = 1;
}
-
tcb_desc->RATRIndex = 7;
tcb_desc->bTxUseDriverAssingedRate = 1;
tcb_desc->bdhcp = 1;
--
2.38.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/5] Staging: rtl8192e: rtllib_tx: fixed alignment matching open parenthesis
2022-10-24 12:25 [PATCH 0/5] staging: rtl8192e: rtllib_tx: code cleanup patches on the rtllib_tx.c file Aaron Lawrence
2022-10-24 12:26 ` [PATCH 1/5] Staging: rtl8192e: rtllib_tx: fixed multiple blank lines Aaron Lawrence
@ 2022-10-24 12:26 ` Aaron Lawrence
2022-10-24 12:27 ` [PATCH 3/5] Staging: rtl8192e: rtllib_tx: added spaces around operators Aaron Lawrence
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Aaron Lawrence @ 2022-10-24 12:26 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel
Aligned multiple statements to match the open parenthesis on the
line before it as per the Linux kernel coding-style regulations.
The issues were flagged by the checkpatch script.
Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
---
drivers/staging/rtl8192e/rtllib_tx.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index abb5b57d142b..38dfdcf99fec 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -290,7 +290,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,
return;
if (pHTInfo->bCurrentAMPDUEnable) {
if (!GetTs(ieee, (struct ts_common_info **)(&pTxTs), hdr->addr1,
- skb->priority, TX_DIR, true)) {
+ skb->priority, TX_DIR, true)) {
netdev_info(ieee->dev, "%s: can't get TS\n", __func__);
return;
}
@@ -306,7 +306,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,
goto FORCED_AGG_SETTING;
} else if (!pTxTs->bUsingBa) {
if (SN_LESS(pTxTs->TxAdmittedBARecord.ba_start_seq_ctrl.field.seq_num,
- (pTxTs->TxCurSeq+1)%4096))
+ (pTxTs->TxCurSeq+1)%4096))
pTxTs->bUsingBa = true;
else
goto FORCED_AGG_SETTING;
@@ -442,7 +442,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,
u8 HTOpMode = pHTInfo->current_op_mode;
if ((pHTInfo->bCurBW40MHz && (HTOpMode == 2 ||
- HTOpMode == 3)) ||
+ HTOpMode == 3)) ||
(!pHTInfo->bCurBW40MHz && HTOpMode == 3)) {
tcb_desc->rts_rate = MGN_24M;
tcb_desc->bRTSEnable = true;
@@ -501,7 +501,7 @@ static u16 rtllib_query_seqnum(struct rtllib_device *ieee, struct sk_buff *skb,
struct tx_ts_record *pTS = NULL;
if (!GetTs(ieee, (struct ts_common_info **)(&pTS), dst,
- skb->priority, TX_DIR, true))
+ skb->priority, TX_DIR, true))
return 0;
seqnum = pTS->TxCurSeq;
pTS->TxCurSeq = (pTS->TxCurSeq+1)%4096;
@@ -618,7 +618,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
udp = (struct udphdr *)((u8 *)ip +
(ip->ihl << 2));
if (((((u8 *)udp)[1] == 68) &&
- (((u8 *)udp)[3] == 67)) ||
+ (((u8 *)udp)[3] == 67)) ||
((((u8 *)udp)[1] == 67) &&
(((u8 *)udp)[3] == 68))) {
bdhcp = true;
@@ -712,11 +712,11 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
/* in case we are a client verify acm is not set for this ac */
while (unlikely(ieee->wmm_acm & (0x01 << skb->priority))) {
netdev_info(ieee->dev, "skb->priority = %x\n",
- skb->priority);
+ skb->priority);
if (wme_downgrade_ac(skb))
break;
netdev_info(ieee->dev, "converted skb->priority = %x\n",
- skb->priority);
+ skb->priority);
}
qos_ctl |= skb->priority;
@@ -813,7 +813,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
if ((qos_activated) && (!bIsMulticast)) {
frag_hdr->seq_ctl =
cpu_to_le16(rtllib_query_seqnum(ieee, skb_frag,
- header.addr1));
+ header.addr1));
frag_hdr->seq_ctl =
cpu_to_le16(le16_to_cpu(frag_hdr->seq_ctl)<<4 | i);
} else {
--
2.38.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/5] Staging: rtl8192e: rtllib_tx: added spaces around operators
2022-10-24 12:25 [PATCH 0/5] staging: rtl8192e: rtllib_tx: code cleanup patches on the rtllib_tx.c file Aaron Lawrence
2022-10-24 12:26 ` [PATCH 1/5] Staging: rtl8192e: rtllib_tx: fixed multiple blank lines Aaron Lawrence
2022-10-24 12:26 ` [PATCH 2/5] Staging: rtl8192e: rtllib_tx: fixed alignment matching open parenthesis Aaron Lawrence
@ 2022-10-24 12:27 ` Aaron Lawrence
2022-10-24 12:29 ` [PATCH 4/5] Staging: rtl8192e: rtllib_tx: fixed lines ending with an open parenthesis Aaron Lawrence
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Aaron Lawrence @ 2022-10-24 12:27 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel
Added multiple spaces around operators which needs it as per the
Linux kernel coding-style regulations. The issues were flagged by
the checkpatch script.
Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
---
drivers/staging/rtl8192e/rtllib_tx.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 38dfdcf99fec..fa998cd76917 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -306,7 +306,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,
goto FORCED_AGG_SETTING;
} else if (!pTxTs->bUsingBa) {
if (SN_LESS(pTxTs->TxAdmittedBARecord.ba_start_seq_ctrl.field.seq_num,
- (pTxTs->TxCurSeq+1)%4096))
+ (pTxTs->TxCurSeq + 1) % 4096))
pTxTs->bUsingBa = true;
else
goto FORCED_AGG_SETTING;
@@ -403,7 +403,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,
if (tcb_desc->bBroadcast || tcb_desc->bMulticast)
return;
- if (is_broadcast_ether_addr(skb->data+16))
+ if (is_broadcast_ether_addr(skb->data + 16))
return;
if (ieee->mode < IEEE_N_24G) {
@@ -504,7 +504,7 @@ static u16 rtllib_query_seqnum(struct rtllib_device *ieee, struct sk_buff *skb,
skb->priority, TX_DIR, true))
return 0;
seqnum = pTS->TxCurSeq;
- pTS->TxCurSeq = (pTS->TxCurSeq+1)%4096;
+ pTS->TxCurSeq = (pTS->TxCurSeq + 1) % 4096;
return seqnum;
}
return 0;
@@ -611,7 +611,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
if (skb->len > 282) {
if (ether_type == ETH_P_IP) {
const struct iphdr *ip = (struct iphdr *)
- ((u8 *)skb->data+14);
+ ((u8 *)skb->data + 14);
if (ip->protocol == IPPROTO_UDP) {
struct udphdr *udp;
@@ -815,10 +815,10 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
cpu_to_le16(rtllib_query_seqnum(ieee, skb_frag,
header.addr1));
frag_hdr->seq_ctl =
- cpu_to_le16(le16_to_cpu(frag_hdr->seq_ctl)<<4 | i);
+ cpu_to_le16(le16_to_cpu(frag_hdr->seq_ctl) << 4 | i);
} else {
frag_hdr->seq_ctl =
- cpu_to_le16(ieee->seq_ctrl[0]<<4 | i);
+ cpu_to_le16(ieee->seq_ctrl[0] << 4 | i);
}
/* Put a SNAP header on the first fragment */
if (i == 0) {
--
2.38.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/5] Staging: rtl8192e: rtllib_tx: fixed lines ending with an open parenthesis
2022-10-24 12:25 [PATCH 0/5] staging: rtl8192e: rtllib_tx: code cleanup patches on the rtllib_tx.c file Aaron Lawrence
` (2 preceding siblings ...)
2022-10-24 12:27 ` [PATCH 3/5] Staging: rtl8192e: rtllib_tx: added spaces around operators Aaron Lawrence
@ 2022-10-24 12:29 ` Aaron Lawrence
2022-10-24 12:30 ` [PATCH 5/5] Staging: rtl8192e: rtllib_tx: removed unnecessary blank line before a close brace Aaron Lawrence
2022-10-25 17:21 ` [PATCH 0/5] staging: rtl8192e: rtllib_tx: code cleanup patches on the rtllib_tx.c file Philipp Hortmann
5 siblings, 0 replies; 7+ messages in thread
From: Aaron Lawrence @ 2022-10-24 12:29 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel
Fixed several lines that end with an open parenthesis to not end
with it anymore, as per the Linux kernel coding-style regulations.
The issues were flagged by the checkpatch script.
Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
---
drivers/staging/rtl8192e/rtllib_tx.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index fa998cd76917..4647efb0f868 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -802,8 +802,8 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
* MOREFRAGS bit to the frame control
*/
if (i != nr_frags - 1) {
- frag_hdr->frame_ctl = cpu_to_le16(
- fc | RTLLIB_FCTL_MOREFRAGS);
+ frag_hdr->frame_ctl = cpu_to_le16(fc |
+ RTLLIB_FCTL_MOREFRAGS);
bytes = bytes_per_frag;
} else {
@@ -822,9 +822,9 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
}
/* Put a SNAP header on the first fragment */
if (i == 0) {
- rtllib_put_snap(
- skb_put(skb_frag, SNAP_SIZE +
- sizeof(u16)), ether_type);
+ rtllib_put_snap(skb_put(skb_frag,
+ SNAP_SIZE +
+ sizeof(u16)), ether_type);
bytes -= SNAP_SIZE + sizeof(u16);
}
--
2.38.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] Staging: rtl8192e: rtllib_tx: removed unnecessary blank line before a close brace
2022-10-24 12:25 [PATCH 0/5] staging: rtl8192e: rtllib_tx: code cleanup patches on the rtllib_tx.c file Aaron Lawrence
` (3 preceding siblings ...)
2022-10-24 12:29 ` [PATCH 4/5] Staging: rtl8192e: rtllib_tx: fixed lines ending with an open parenthesis Aaron Lawrence
@ 2022-10-24 12:30 ` Aaron Lawrence
2022-10-25 17:21 ` [PATCH 0/5] staging: rtl8192e: rtllib_tx: code cleanup patches on the rtllib_tx.c file Philipp Hortmann
5 siblings, 0 replies; 7+ messages in thread
From: Aaron Lawrence @ 2022-10-24 12:30 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel
Removed a blank line before a closing brace as it is not necessary
as per the Linux coding-style regulations. The issue was flagged by
the checkpatch script.
Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
---
drivers/staging/rtl8192e/rtllib_tx.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 4647efb0f868..101f44129145 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -954,7 +954,6 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
netif_stop_queue(dev);
stats->tx_errors++;
return 1;
-
}
netdev_tx_t rtllib_xmit(struct sk_buff *skb, struct net_device *dev)
--
2.38.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/5] staging: rtl8192e: rtllib_tx: code cleanup patches on the rtllib_tx.c file
2022-10-24 12:25 [PATCH 0/5] staging: rtl8192e: rtllib_tx: code cleanup patches on the rtllib_tx.c file Aaron Lawrence
` (4 preceding siblings ...)
2022-10-24 12:30 ` [PATCH 5/5] Staging: rtl8192e: rtllib_tx: removed unnecessary blank line before a close brace Aaron Lawrence
@ 2022-10-25 17:21 ` Philipp Hortmann
5 siblings, 0 replies; 7+ messages in thread
From: Philipp Hortmann @ 2022-10-25 17:21 UTC (permalink / raw)
To: Aaron Lawrence, gregkh; +Cc: linux-staging, linux-kernel
On 10/24/22 14:25, Aaron Lawrence wrote:
> Multiple patches regarding the cleanup of code in the rtllib_tx.c file.
> Fixes were applied according to the report generated by the checkpatch
> script on said file, aside from the CamelCase issues.
>
> Aaron Lawrence (5):
> Staging: rtl8192e: rtllib_tx: fixed multiple blank lines
> Staging: rtl8192e: rtllib_tx: fixed alignment matching open
> parenthesis
> Staging: rtl8192e: rtllib_tx: added spaces around operators
> Staging: rtl8192e: rtllib_tx: fixed lines ending with an open
> parenthesis
> Staging: rtl8192e: rtllib_tx: removed unnecessary blank line before a
> close brace
>
> drivers/staging/rtl8192e/rtllib_tx.c | 42 ++++++++++++----------------
> 1 file changed, 18 insertions(+), 24 deletions(-)
>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-10-25 17:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-24 12:25 [PATCH 0/5] staging: rtl8192e: rtllib_tx: code cleanup patches on the rtllib_tx.c file Aaron Lawrence
2022-10-24 12:26 ` [PATCH 1/5] Staging: rtl8192e: rtllib_tx: fixed multiple blank lines Aaron Lawrence
2022-10-24 12:26 ` [PATCH 2/5] Staging: rtl8192e: rtllib_tx: fixed alignment matching open parenthesis Aaron Lawrence
2022-10-24 12:27 ` [PATCH 3/5] Staging: rtl8192e: rtllib_tx: added spaces around operators Aaron Lawrence
2022-10-24 12:29 ` [PATCH 4/5] Staging: rtl8192e: rtllib_tx: fixed lines ending with an open parenthesis Aaron Lawrence
2022-10-24 12:30 ` [PATCH 5/5] Staging: rtl8192e: rtllib_tx: removed unnecessary blank line before a close brace Aaron Lawrence
2022-10-25 17:21 ` [PATCH 0/5] staging: rtl8192e: rtllib_tx: code cleanup patches on the rtllib_tx.c file Philipp Hortmann
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).