Skip to contentSkip to conversation

Staging: rtl8192e: fix coding style issues

PATCH Superseded Anjandev Momi 2 participants 6 messages Sep 22, 2022 Staging

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Staging: rtl8192e: fix coding style issues

This patch series fixes various checkpatch.pl issues: removes unnecessary parentheses, removes multiple blank lines, aligns multiple line function calls to open paranthesis, and adds a blank line after function declaration.

Anjandev Momi (4):
Staging: rtl8192e: remove unnecessary parentheses
Staging: rtl8192e: remove multiple blank lines
Staging: rtl8192e: make alignment match open parenthesis
Staging: rtl8192e: add blank line after function declaration

 drivers/staging/rtl8192e/rtl819x_BAProc.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
Signature · 1 line
2.36.2
#1 lore raw

PATCH v2 1/4 Staging: rtl8192e: remove unnecessary parentheses

This patch removes the following CHECK generated by checkpatch.pl:

	./drivers/staging/rtl8192e/rtl819x_BAProc.c:116: CHECK: Unnecessary
	parentheses around pBA->ba_start_seq_ctrl
	./drivers/staging/rtl8192e/rtl819x_BAProc.c:261: CHECK: Unnecessary
	parentheses around '&pTS'
	./drivers/staging/rtl8192e/rtl819x_BAProc.c:346: CHECK: Unnecessary
	parentheses around '&pTS'
---
 drivers/staging/rtl8192e/rtl819x_BAProc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192e/rtl819x_BAProc.c +3 -3
index 7d04966af..bd7efb8f1 100644
@@ -113,7 +113,7 @@ static struct sk_buff *rtllib_ADDBA(struct rtllib_device *ieee, u8 *Dst,
 	tag += 2;
 
 	if (type == ACT_ADDBAREQ) {
-		memcpy(tag, (u8 *)&(pBA->ba_start_seq_ctrl), 2);
+		memcpy(tag, (u8 *)&pBA->ba_start_seq_ctrl, 2);
 		tag += 2;
 	}
 
@@ -258,7 +258,7 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
 			    ieee->pHTInfo->bCurrentHTSupport);
 		goto OnADDBAReq_Fail;
 	}
-	if (!GetTs(ieee, (struct ts_common_info **)(&pTS), dst,
+	if (!GetTs(ieee, (struct ts_common_info **)&pTS, dst,
 	    (u8)(pBaParamSet->field.tid), RX_DIR, true)) {
 		rc = ADDBA_STATUS_REFUSED;
 		netdev_warn(ieee->dev, "%s(): can't get TS\n", __func__);
@@ -343,7 +343,7 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb)
 		goto OnADDBARsp_Reject;
 	}
 
-	if (!GetTs(ieee, (struct ts_common_info **)(&pTS), dst,
+	if (!GetTs(ieee, (struct ts_common_info **)&pTS, dst,
 		   (u8)(pBaParamSet->field.tid), TX_DIR, false)) {
 		netdev_warn(ieee->dev, "%s(): can't get TS\n", __func__);
 		ReasonCode = DELBA_REASON_UNKNOWN_BA;
Signature · 1 line
2.36.2
#2 lore raw

PATCH v2 2/4 Staging: rtl8192e: remove multiple blank lines

In reply to Anjandev Momi

This patch removes the following checks generated by checkpatch.pl:

	./drivers/staging/rtl8192e/rtl819x_BAProc.c:164: CHECK: Please
	don't use multiple blank lines
	./drivers/staging/rtl8192e/rtl819x_BAProc.c:383: CHECK: Please
	don't use multiple blank lines
---
 drivers/staging/rtl8192e/rtl819x_BAProc.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/rtl8192e/rtl819x_BAProc.c +0 -2
index bd7efb8f1..f36c24c2a 100644
@@ -161,7 +161,6 @@ static struct sk_buff *rtllib_DELBA(struct rtllib_device *ieee, u8 *dst,
 	*tag++ = ACT_CAT_BA;
 	*tag++ = ACT_DELBA;
 
-
 	put_unaligned_le16(DelbaParamSet.short_data, tag);
 	tag += 2;
 
@@ -380,7 +379,6 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb)
 			goto OnADDBARsp_Reject;
 		}
 
-
 		pAdmittedBA->dialog_token = *pDialogToken;
 		pAdmittedBA->ba_timeout_value = *pBaTimeoutVal;
 		pAdmittedBA->ba_start_seq_ctrl = pPendingBA->ba_start_seq_ctrl;
Signature · 1 line
2.36.2
#3 lore raw

PATCH v2 3/4 Staging: rtl8192e: make alignment match open parenthesis

In reply to Anjandev Momi

This patch removes the following checks generated by checkpatch.pl:

	./drivers/staging/rtl8192e/rtl819x_BAProc.c:261: CHECK:
	Alignment should match open parenthesis
	./drivers/staging/rtl8192e/rtl819x_BAProc.c:284: CHECK:
	Alignment should match open parenthesis
	./drivers/staging/rtl8192e/rtl819x_BAProc.c:421: CHECK:
	Alignment should match open parenthesis
	./drivers/staging/rtl8192e/rtl819x_BAProc.c:441: CHECK:
	Alignment should match open parenthesis
---
 drivers/staging/rtl8192e/rtl819x_BAProc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8192e/rtl819x_BAProc.c +4 -4
index f36c24c2a..8d92b3426 100644
@@ -258,7 +258,7 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
 		goto OnADDBAReq_Fail;
 	}
 	if (!GetTs(ieee, (struct ts_common_info **)&pTS, dst,
-	    (u8)(pBaParamSet->field.tid), RX_DIR, true)) {
+		   (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;
@@ -281,7 +281,7 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
 	pBA->ba_start_seq_ctrl = *pBaStartSeqCtrl;
 
 	if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev) ||
-	   (ieee->pHTInfo->IOTAction & HT_IOT_ACT_ALLOW_PEER_AGG_ONE_PKT))
+	    (ieee->pHTInfo->IOTAction & HT_IOT_ACT_ALLOW_PEER_AGG_ONE_PKT))
 		pBA->ba_param_set.field.buffer_size = 1;
 	else
 		pBA->ba_param_set.field.buffer_size = 32;
@@ -418,7 +418,7 @@ int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb)
 	}
 
 	if (!ieee->current_network.qos_data.active ||
-		!ieee->pHTInfo->bCurrentHTSupport) {
+	    !ieee->pHTInfo->bCurrentHTSupport) {
 		netdev_warn(ieee->dev,
 			    "received DELBA while QOS or HT is not supported(%d, %d)\n",
 			    ieee->current_network. qos_data.active,
@@ -438,7 +438,7 @@ int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb)
 		struct rx_ts_record *pRxTs;
 
 		if (!GetTs(ieee, (struct ts_common_info **)&pRxTs, dst,
-		    (u8)pDelBaParamSet->field.tid, RX_DIR, false)) {
+			   (u8)pDelBaParamSet->field.tid, RX_DIR, false)) {
 			netdev_warn(ieee->dev,
 				    "%s(): can't get TS for RXTS. dst:%pM TID:%d\n",
 				    __func__, dst,
Signature · 1 line
2.36.2
#4 lore raw

PATCH v2 4/4 Staging: rtl8192e: add blank line after function declaration

In reply to Anjandev Momi

This patch removes the following check generated by checkpatch.pl

	./drivers/staging/rtl8192e/rtl819x_BAProc.c:65: CHECK: Please
	use a blank line after function/struct/union/enum declarations
---
 drivers/staging/rtl8192e/rtl819x_BAProc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/rtl8192e/rtl819x_BAProc.c +1 -0
index 8d92b3426..67918ef41 100644
@@ -62,6 +62,7 @@ void ResetBaEntry(struct ba_record *pBA)
 	pBA->dialog_token		  = 0;
 	pBA->ba_start_seq_ctrl.short_data = 0;
 }
+
 static struct sk_buff *rtllib_ADDBA(struct rtllib_device *ieee, u8 *Dst,
 				    struct ba_record *pBA,
 				    u16 StatusCode, u8 type)
Signature · 1 line
2.36.2
#5 lore raw
In reply to Anjandev Momi
Quoted 4 lines · Anjandev Momi

This patch series fixes various checkpatch.pl issues: removes unnecessary parentheses, removes multiple blank lines, aligns multiple line function calls to open paranthesis, and adds a blank line after function declaration.

Quoted 12 lines

Anjandev Momi (4):
Staging: rtl8192e: remove unnecessary parentheses
Staging: rtl8192e: remove multiple blank lines
Staging: rtl8192e: make alignment match open parenthesis
Staging: rtl8192e: add blank line after function declaration

 drivers/staging/rtl8192e/rtl819x_BAProc.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
Signature · 1 line
2.36.2

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.

You are receiving this message because of the following common error(s) as indicated below:

- This looks like a new version of a previously submitted patch, but you did not list below the --- line any changes from the previous version. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/SubmittingPatches for what needs to be done here to properly describe this.

If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.

thanks,

greg k-h's patch email bot