The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v2 0/3] staging: rtl8192e: rtl819x_HTProc: code cleanup patches on the rtl8192x_HTProc.c file.
@ 2022-10-23  9:40 Aaron Lawrence
  2022-10-23  9:41 ` [PATCH v2 1/3] Staging: rtl8192e: rtl819x_HTProc: fixed missing blank space Aaron Lawrence
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Aaron Lawrence @ 2022-10-23  9:40 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel

Multiple patches regarding the cleanup of code in the rtl819x_HTProc.c
file according to the checkpatch script aside from the CamelCase issues.

Fixed patchset email format in v2.

Aaron Lawrence (3):
  Staging: rtl8192e: rtl819x_HTProc: fixed missing blank space
  Staging: rtl8192e: rtl819x_HTProc: fixed alignment matching open
    parenthesis
  Staging: rtl8192e: rtl819x_HTProc: fixed unnecessary parentheses

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 38 ++++++++++++-----------
 1 file changed, 20 insertions(+), 18 deletions(-)

-- 
2.38.1


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

* [PATCH v2 1/3] Staging: rtl8192e: rtl819x_HTProc: fixed missing blank space
  2022-10-23  9:40 [PATCH v2 0/3] staging: rtl8192e: rtl819x_HTProc: code cleanup patches on the rtl8192x_HTProc.c file Aaron Lawrence
@ 2022-10-23  9:41 ` Aaron Lawrence
  2022-10-23  9:44 ` [PATCH v2 2/3] Staging: rtl8192e: rtl819x_HTProc: fixed alignment matching open parenthesis Aaron Lawrence
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Aaron Lawrence @ 2022-10-23  9:41 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel

Added a missing blank space as per the Linux kernel coding-style
regulations. The issue was flagged by the checkpatch script as a
warning.

Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
---
 drivers/staging/rtl8192e/rtl819x_HTProc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index ef3dca51cf99..b763cf0ba356 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -70,6 +70,7 @@ static u8 LINKSYS_MARVELL_4400N[3] = {0x00, 0x14, 0xa4};
 void HTUpdateDefaultSetting(struct rtllib_device *ieee)
 {
 	struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
+
 	pHTInfo->bRegShortGI20MHz = 1;
 	pHTInfo->bRegShortGI40MHz = 1;
 
-- 
2.38.1


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

* [PATCH v2 2/3] Staging: rtl8192e: rtl819x_HTProc: fixed alignment matching open parenthesis
  2022-10-23  9:40 [PATCH v2 0/3] staging: rtl8192e: rtl819x_HTProc: code cleanup patches on the rtl8192x_HTProc.c file Aaron Lawrence
  2022-10-23  9:41 ` [PATCH v2 1/3] Staging: rtl8192e: rtl819x_HTProc: fixed missing blank space Aaron Lawrence
@ 2022-10-23  9:44 ` Aaron Lawrence
  2022-10-23  9:45 ` [PATCH v2 3/3] Staging: rtl8192e: rtl819x_HTProc: fixed unnecessary parentheses Aaron Lawrence
  2022-10-24  5:45 ` [PATCH v2 0/3] staging: rtl8192e: rtl819x_HTProc: code cleanup patches on the rtl8192x_HTProc.c file Philipp Hortmann
  3 siblings, 0 replies; 5+ messages in thread
From: Aaron Lawrence @ 2022-10-23  9:44 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel

Aligned multiple statements to match open parenthesis as per Linux kernel
coding-style regulations. The issues were flagged by the checkpatch script.

Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
---
 drivers/staging/rtl8192e/rtl819x_HTProc.c | 25 ++++++++++++-----------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index b763cf0ba356..a701be8c2923 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -152,8 +152,8 @@ bool IsHTHalfNmodeAPs(struct rtllib_device *ieee)
 	    (net->ralink_cap_exist))
 		retValue = true;
 	else if (!memcmp(net->bssid, UNKNOWN_BORADCOM, 3) ||
-		!memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) ||
-		!memcmp(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3) ||
+		 !memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) ||
+		 !memcmp(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3) ||
 		(net->broadcom_cap_exist))
 		retValue = true;
 	else if (net->bssht.bd_rt2rt_aggregation)
@@ -540,7 +540,7 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
 			     pPeerHTCap, sizeof(struct ht_capab_ele));
 #endif
 	HTSetConnectBwMode(ieee, (enum ht_channel_width)(pPeerHTCap->ChlWidth),
-			  (enum ht_extchnl_offset)(pPeerHTInfo->ExtChlOffset));
+			   (enum ht_extchnl_offset)(pPeerHTInfo->ExtChlOffset));
 	pHTInfo->cur_tx_bw40mhz = ((pPeerHTInfo->RecommemdedTxWidth == 1) ?
 				 true : false);
 
@@ -566,9 +566,9 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
 
 	pHTInfo->bCurrentAMPDUEnable = pHTInfo->bAMPDUEnable;
 	if (ieee->rtllib_ap_sec_type &&
-	   (ieee->rtllib_ap_sec_type(ieee) & (SEC_ALG_WEP | SEC_ALG_TKIP))) {
+	    (ieee->rtllib_ap_sec_type(ieee) & (SEC_ALG_WEP | SEC_ALG_TKIP))) {
 		if ((pHTInfo->IOTPeer == HT_IOT_PEER_ATHEROS) ||
-				(pHTInfo->IOTPeer == HT_IOT_PEER_UNKNOWN))
+		    (pHTInfo->IOTPeer == HT_IOT_PEER_UNKNOWN))
 			pHTInfo->bCurrentAMPDUEnable = false;
 	}
 
@@ -617,7 +617,8 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
 	else
 		pMcsFilter = MCS_FILTER_ALL;
 	ieee->HTHighestOperaRate = HTGetHighestMCSRate(ieee,
-				   ieee->dot11HTOperationalRateSet, pMcsFilter);
+						       ieee->dot11HTOperationalRateSet,
+						       pMcsFilter);
 	ieee->HTCurrentOperaRate = ieee->HTHighestOperaRate;
 
 	pHTInfo->current_op_mode = pPeerHTInfo->OptMode;
@@ -644,13 +645,13 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
 	pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor;
 
 	memset((void *)(&(pHTInfo->SelfHTCap)), 0,
-		sizeof(pHTInfo->SelfHTCap));
+	       sizeof(pHTInfo->SelfHTCap));
 	memset((void *)(&(pHTInfo->SelfHTInfo)), 0,
-		sizeof(pHTInfo->SelfHTInfo));
+	       sizeof(pHTInfo->SelfHTInfo));
 	memset((void *)(&(pHTInfo->PeerHTCapBuf)), 0,
-		sizeof(pHTInfo->PeerHTCapBuf));
+	       sizeof(pHTInfo->PeerHTCapBuf));
 	memset((void *)(&(pHTInfo->PeerHTInfoBuf)), 0,
-		sizeof(pHTInfo->PeerHTInfoBuf));
+	       sizeof(pHTInfo->PeerHTInfoBuf));
 
 	pHTInfo->sw_bw_in_progress = false;
 
@@ -803,8 +804,8 @@ void HTUseDefaultSetting(struct rtllib_device *ieee)
 		HTFilterMCSRate(ieee, ieee->Regdot11TxHTOperationalRateSet,
 				ieee->dot11HTOperationalRateSet);
 		ieee->HTHighestOperaRate = HTGetHighestMCSRate(ieee,
-					   ieee->dot11HTOperationalRateSet,
-					   MCS_FILTER_ALL);
+							       ieee->dot11HTOperationalRateSet,
+							       MCS_FILTER_ALL);
 		ieee->HTCurrentOperaRate = ieee->HTHighestOperaRate;
 
 	} else {
-- 
2.38.1


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

* [PATCH v2 3/3] Staging: rtl8192e: rtl819x_HTProc: fixed unnecessary parentheses
  2022-10-23  9:40 [PATCH v2 0/3] staging: rtl8192e: rtl819x_HTProc: code cleanup patches on the rtl8192x_HTProc.c file Aaron Lawrence
  2022-10-23  9:41 ` [PATCH v2 1/3] Staging: rtl8192e: rtl819x_HTProc: fixed missing blank space Aaron Lawrence
  2022-10-23  9:44 ` [PATCH v2 2/3] Staging: rtl8192e: rtl819x_HTProc: fixed alignment matching open parenthesis Aaron Lawrence
@ 2022-10-23  9:45 ` Aaron Lawrence
  2022-10-24  5:45 ` [PATCH v2 0/3] staging: rtl8192e: rtl819x_HTProc: code cleanup patches on the rtl8192x_HTProc.c file Philipp Hortmann
  3 siblings, 0 replies; 5+ messages in thread
From: Aaron Lawrence @ 2022-10-23  9:45 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel

Fixed multiple unnecessary parentheses 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/rtl819x_HTProc.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index a701be8c2923..62aa8e893c34 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -285,7 +285,7 @@ void HTConstructCapabilityElement(struct rtllib_device *ieee, u8 *posHTCap,
 		u8	EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};
 
 		memcpy(posHTCap, EWC11NHTCap, sizeof(EWC11NHTCap));
-		pCapELE = (struct ht_capab_ele *)&(posHTCap[4]);
+		pCapELE = (struct ht_capab_ele *)&posHTCap[4];
 		*len = 30 + 2;
 	} else {
 		pCapELE = (struct ht_capab_ele *)posHTCap;
@@ -644,13 +644,13 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
 	pHTInfo->current_mpdu_density = pHTInfo->MPDU_Density;
 	pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor;
 
-	memset((void *)(&(pHTInfo->SelfHTCap)), 0,
+	memset((void *)(&pHTInfo->SelfHTCap), 0,
 	       sizeof(pHTInfo->SelfHTCap));
-	memset((void *)(&(pHTInfo->SelfHTInfo)), 0,
+	memset((void *)(&pHTInfo->SelfHTInfo), 0,
 	       sizeof(pHTInfo->SelfHTInfo));
-	memset((void *)(&(pHTInfo->PeerHTCapBuf)), 0,
+	memset((void *)(&pHTInfo->PeerHTCapBuf), 0,
 	       sizeof(pHTInfo->PeerHTCapBuf));
-	memset((void *)(&(pHTInfo->PeerHTInfoBuf)), 0,
+	memset((void *)(&pHTInfo->PeerHTInfoBuf), 0,
 	       sizeof(pHTInfo->PeerHTInfoBuf));
 
 	pHTInfo->sw_bw_in_progress = false;
@@ -666,7 +666,7 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
 	pHTInfo->iot_ra_func = 0;
 
 	{
-		u8 *RegHTSuppRateSets = &(ieee->RegHTSuppRateSet[0]);
+		u8 *RegHTSuppRateSets = &ieee->RegHTSuppRateSet[0];
 
 		RegHTSuppRateSets[0] = 0xFF;
 		RegHTSuppRateSets[1] = 0xFF;
-- 
2.38.1


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

* Re: [PATCH v2 0/3] staging: rtl8192e: rtl819x_HTProc: code cleanup patches on the rtl8192x_HTProc.c file.
  2022-10-23  9:40 [PATCH v2 0/3] staging: rtl8192e: rtl819x_HTProc: code cleanup patches on the rtl8192x_HTProc.c file Aaron Lawrence
                   ` (2 preceding siblings ...)
  2022-10-23  9:45 ` [PATCH v2 3/3] Staging: rtl8192e: rtl819x_HTProc: fixed unnecessary parentheses Aaron Lawrence
@ 2022-10-24  5:45 ` Philipp Hortmann
  3 siblings, 0 replies; 5+ messages in thread
From: Philipp Hortmann @ 2022-10-24  5:45 UTC (permalink / raw)
  To: Aaron Lawrence, gregkh; +Cc: linux-staging, linux-kernel

On 10/23/22 11:40, Aaron Lawrence wrote:
> Multiple patches regarding the cleanup of code in the rtl819x_HTProc.c
> file according to the checkpatch script aside from the CamelCase issues.
> 
> Fixed patchset email format in v2.
> 
> Aaron Lawrence (3):
>    Staging: rtl8192e: rtl819x_HTProc: fixed missing blank space
>    Staging: rtl8192e: rtl819x_HTProc: fixed alignment matching open
>      parenthesis
>    Staging: rtl8192e: rtl819x_HTProc: fixed unnecessary parentheses
> 
>   drivers/staging/rtl8192e/rtl819x_HTProc.c | 38 ++++++++++++-----------
>   1 file changed, 20 insertions(+), 18 deletions(-)
> 

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>

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

end of thread, other threads:[~2022-10-24  5:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-23  9:40 [PATCH v2 0/3] staging: rtl8192e: rtl819x_HTProc: code cleanup patches on the rtl8192x_HTProc.c file Aaron Lawrence
2022-10-23  9:41 ` [PATCH v2 1/3] Staging: rtl8192e: rtl819x_HTProc: fixed missing blank space Aaron Lawrence
2022-10-23  9:44 ` [PATCH v2 2/3] Staging: rtl8192e: rtl819x_HTProc: fixed alignment matching open parenthesis Aaron Lawrence
2022-10-23  9:45 ` [PATCH v2 3/3] Staging: rtl8192e: rtl819x_HTProc: fixed unnecessary parentheses Aaron Lawrence
2022-10-24  5:45 ` [PATCH v2 0/3] staging: rtl8192e: rtl819x_HTProc: code cleanup patches on the rtl8192x_HTProc.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