Skip to contentSkip to conversation

staging: rtl8192e: remove unnecessary parentheses

PATCH In review Mitali Borkar 2 participants 5 messages Apr 11, 2021 Staging

lore
Share & tools
lore
#0 lore raw

v2 cover staging: rtl8192e: remove unnecessary parentheses

This patch fixes style issues
Changes from v1:-
[Patch 1/3]:- Removed unnecessary parentheses around boolean expressions [Patch 2/3]:- No changes
[Patch 3/3]:- No changes

Mitali Borkar (3):
staging: rtl8192e: remove unnecessary parentheses
staging: rtl8192e: remove unnecessary ftrace-like logging
staging: rtl8192e: remove unncessary parentheses

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.30.2
#1 lore raw

PATCH v2 1/3 staging: rtl8192e: remove unnecessary parentheses

Removed unnecessary parentheses around '!xyz' as '!' has higher precedance than '||'

---

Changes from v1:- removed unnecessary parentheses around boolean expression

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192e/rtl819x_HTProc.c +1 -1
index b1fa8e9a4f28..431202927036 100644
@@ -276,7 +276,7 @@ void HTConstructCapabilityElement(struct rtllib_device *ieee, u8 *posHTCap,
 	struct rt_hi_throughput *pHT = ieee->pHTInfo;
 	struct ht_capab_ele *pCapELE = NULL;
 
-	if ((!posHTCap) || (!pHT)) {
+	if (!posHTCap || !pHT) {
 		netdev_warn(ieee->dev,
 			    "%s(): posHTCap and pHTInfo are null\n", __func__);
 		return;
Signature · 1 line
2.30.2
#2 lore raw

PATCH v2 2/3 staging: rtl8192e: remove unnecessary ftrace-like logging

In reply to Mitali Borkar

Removed unncessary ftrace-like logging by simply deleting that statement as we have other modes of logging like ftrace.
Reported by checkpatch.

---

Changes from v1:- No changes made.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/staging/rtl8192e/rtl819x_HTProc.c +0 -4
index 0b1e92f17805..89d0e9ec188d 100644
@@ -630,7 +630,6 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
 {
 	struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
 
-	netdev_vdbg(ieee->dev, "%s()\n", __func__);
 	pHTInfo->bCurrentHTSupport = false;
 
 	pHTInfo->bCurBW40MHz = false;
@@ -698,7 +697,6 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device *ieee,
 	struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
 	u8	bIOTAction = 0;
 
-	netdev_vdbg(ieee->dev, "%s()\n", __func__);
 	/* unmark bEnableHT flag here is the same reason why unmarked in
 	 * function rtllib_softmac_new_net. WB 2008.09.10
 	 */
@@ -832,8 +830,6 @@ static void HTSetConnectBwModeCallback(struct rtllib_device *ieee)
 {
 	struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
 
-	netdev_vdbg(ieee->dev, "%s()\n", __func__);
-
 	if (pHTInfo->bCurBW40MHz) {
 		if (pHTInfo->CurSTAExtChnlOffset == HT_EXTCHNL_OFFSET_UPPER)
 			ieee->set_chan(ieee->dev,
Signature · 1 line
2.30.2
#3 lore raw

PATCH v2 3/3 staging: rtl8192e: remove unncessary parentheses

In reply to Mitali Borkar

Removed unnecessary parentheses because they must be used only when it is necessary or they improve readability.
Reported by checkpatch.

---

Changes from v1:- No changes.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8192e/rtl819x_HTProc.c +6 -6
index 89d0e9ec188d..b1fa8e9a4f28 100644
@@ -287,7 +287,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;
@@ -646,13 +646,13 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
 	pHTInfo->CurrentMPDUDensity = 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->bSwBwInProgress = false;
@@ -668,7 +668,7 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
 	pHTInfo->IOTRaFunc = 0;
 
 	{
-		u8 *RegHTSuppRateSets = &(ieee->RegHTSuppRateSet[0]);
+		u8 *RegHTSuppRateSets = &ieee->RegHTSuppRateSet[0];
 
 		RegHTSuppRateSets[0] = 0xFF;
 		RegHTSuppRateSets[1] = 0xFF;
Signature · 1 line
2.30.2
maintainer
#4 lore raw
In reply to Mitali Borkar
Quoted 10 lines · Mitali Borkar

This patch fixes style issues
Changes from v1:-
[Patch 1/3]:- Removed unnecessary parentheses around boolean expressions [Patch 2/3]:- No changes
[Patch 3/3]:- No changes

Mitali Borkar (3):
staging: rtl8192e: remove unnecessary parentheses
staging: rtl8192e: remove unnecessary ftrace-like logging
staging: rtl8192e: remove unncessary parentheses

You have two patches in this series that do different things, yet have the same subject line (with a misspelling in one). Please make them unique.

thanks,

greg k-h