All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 3/3] staging: rtl8192e: remove unnecessary parentheses
  2021-04-11 11:34 [PATCH v4 0/3] staging: rtl8192e: modified log message Mitali Borkar
@ 2021-04-11 11:35 ` Mitali Borkar
  0 siblings, 0 replies; 9+ messages in thread
From: Mitali Borkar @ 2021-04-11 11:35 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy-kernel, mitali_s

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

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
---

Changes from v3:- No changes.
Changes from v2:- Rectified spelling mistake in subject description.
Changes from v1:- No changes.

 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 89d0e9ec188d..b1fa8e9a4f28 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -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;
-- 
2.30.2


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

* [PATCH v4 0/3] staging: rtl8192e: cleanup patchset for style issues
@ 2021-04-12 11:21 Mitali Borkar
  2021-04-12 11:21 ` [PATCH v4 1/3] staging: rtl8192e: remove parentheses around boolean expression Mitali Borkar
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Mitali Borkar @ 2021-04-12 11:21 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy-kernel, mitali_s

Changes from v3:- Changed subject line to match prefix on the patches.
[PATCH v3 1/3]:- No changes.
[PATCH v3 2/3]:- No changes.
[PATCH V3 3/3]:- No changes.

Changes from v2:-
[PATCH v2 1/3]:- Modified subject description. Changes has been made in
v3.
[PATCH v2 2/3]:- No changes.
[PATCH v2 3/3]:- Rectified spelling mistake in subject description.
Changes has been made in v3.

Changes from v1:-
[PATCH 1/3]:- Removed unnecessary parentheses around boolean expression.
Changes has been made in v2.
[PATCH 2/3]:- No changes.
[PATCH 3/3]:- No changes.

Mitali Borkar (6):
  staging: rtl8192e: remove parentheses around boolean expression
  staging: rtl8192e: remove unnecessary ftrace-like logging
  staging: rtl8192e: remove unnecessary parentheses

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

-- 
2.30.2


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

* [PATCH v4 1/3] staging: rtl8192e: remove parentheses around boolean expression
  2021-04-12 11:21 [PATCH v4 0/3] staging: rtl8192e: cleanup patchset for style issues Mitali Borkar
@ 2021-04-12 11:21 ` Mitali Borkar
  2021-04-12 11:21 ` [PATCH v4 2/3] staging: rtl8192e: remove unnecessary ftrace-like logging Mitali Borkar
  2021-04-12 11:22 ` [PATCH v4 3/3] staging: rtl8192e: remove unnecessary parentheses Mitali Borkar
  2 siblings, 0 replies; 9+ messages in thread
From: Mitali Borkar @ 2021-04-12 11:21 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy-kernel, mitali_s

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

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
---
 
Changes from v3:- No changes.
Changes from v2:- Modified subject description. Changes has been made in
v3.
Changes from v1:- Removed unnecessary parentheses around boolean
expression. Changes has been made in v2.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index b1fa8e9a4f28..431202927036 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -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;
-- 
2.30.2


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

* [PATCH v4 2/3] staging: rtl8192e: remove unnecessary ftrace-like logging
  2021-04-12 11:21 [PATCH v4 0/3] staging: rtl8192e: cleanup patchset for style issues Mitali Borkar
  2021-04-12 11:21 ` [PATCH v4 1/3] staging: rtl8192e: remove parentheses around boolean expression Mitali Borkar
@ 2021-04-12 11:21 ` Mitali Borkar
  2021-04-12 11:22 ` [PATCH v4 3/3] staging: rtl8192e: remove unnecessary parentheses Mitali Borkar
  2 siblings, 0 replies; 9+ messages in thread
From: Mitali Borkar @ 2021-04-12 11:21 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy-kernel, mitali_s

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

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
---
 
Changes from v3:- No changes.
Changes from v2:- No changes.
Changes from v1:- No changes.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 0b1e92f17805..89d0e9ec188d 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -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,
-- 
2.30.2


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

* [PATCH v4 3/3] staging: rtl8192e: remove unnecessary parentheses
  2021-04-12 11:21 [PATCH v4 0/3] staging: rtl8192e: cleanup patchset for style issues Mitali Borkar
  2021-04-12 11:21 ` [PATCH v4 1/3] staging: rtl8192e: remove parentheses around boolean expression Mitali Borkar
  2021-04-12 11:21 ` [PATCH v4 2/3] staging: rtl8192e: remove unnecessary ftrace-like logging Mitali Borkar
@ 2021-04-12 11:22 ` Mitali Borkar
  2021-04-12 20:46     ` Joe Perches
  2 siblings, 1 reply; 9+ messages in thread
From: Mitali Borkar @ 2021-04-12 11:22 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy-kernel, mitali_s

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

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
---
 
Changes from v3:- No changes.
Changes from v2:- Rectified spelling mistake in subject description.
Changes has been made in v3.
Changes from v1:- No changes.

 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 89d0e9ec188d..b1fa8e9a4f28 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -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;
-- 
2.30.2


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

* Re: [PATCH v4 3/3] staging: rtl8192e: remove unnecessary parentheses
  2021-04-12 11:22 ` [PATCH v4 3/3] staging: rtl8192e: remove unnecessary parentheses Mitali Borkar
@ 2021-04-12 20:46     ` Joe Perches
  0 siblings, 0 replies; 9+ messages in thread
From: Joe Perches @ 2021-04-12 20:46 UTC (permalink / raw)
  To: Mitali Borkar, gregkh
  Cc: linux-staging, linux-kernel, outreachy-kernel, mitali_s

On Mon, 2021-04-12 at 16:52 +0530, Mitali Borkar wrote:
> Removed unnecessary parentheses because they must be used only when it
> is necessary or they improve readability.
> Reported by checkpatch.

I gave you feedback about the memset changes.
Please use it.
https://lore.kernel.org/lkml/f5fe04d62b22eb5e09c299e769d9b9d8917f119c.camel@perches.com/

> Changes from v3:- No changes.
> Changes from v2:- Rectified spelling mistake in subject description.
> Changes has been made in v3.
> Changes from v1:- No changes.
[]
> diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
[]
> @@ -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(&pHTInfo->SelfHTCap, 0, sizeof(pHTInfo->SelfHTCap);

etc...


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

* Re: [PATCH v4 3/3] staging: rtl8192e: remove unnecessary parentheses
@ 2021-04-12 20:46     ` Joe Perches
  0 siblings, 0 replies; 9+ messages in thread
From: Joe Perches @ 2021-04-12 20:46 UTC (permalink / raw)
  To: Mitali Borkar, gregkh
  Cc: linux-staging, linux-kernel, outreachy-kernel, mitali_s

On Mon, 2021-04-12 at 16:52 +0530, Mitali Borkar wrote:
> Removed unnecessary parentheses because they must be used only when it
> is necessary or they improve readability.
> Reported by checkpatch.

I gave you feedback about the memset changes.
Please use it.
https://lore.kernel.org/lkml/f5fe04d62b22eb5e09c299e769d9b9d8917f119c.camel@perches.com/

> Changes from v3:- No changes.
> Changes from v2:- Rectified spelling mistake in subject description.
> Changes has been made in v3.
> Changes from v1:- No changes.
[]
> diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
[]
> @@ -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(&pHTInfo->SelfHTCap, 0, sizeof(pHTInfo->SelfHTCap);

etc...



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

* Re: [PATCH v4 3/3] staging: rtl8192e: remove unnecessary parentheses
  2021-04-12 20:46     ` Joe Perches
@ 2021-04-13  2:03       ` Mitali Borkar
  -1 siblings, 0 replies; 9+ messages in thread
From: Mitali Borkar @ 2021-04-13  2:03 UTC (permalink / raw)
  To: Joe Perches, gregkh
  Cc: linux-staging, linux-kernel, outreachy-kernel, mitali_s

On Mon, Apr 12, 2021 at 01:46:54PM -0700, Joe Perches wrote:
> On Mon, 2021-04-12 at 16:52 +0530, Mitali Borkar wrote:
> > Removed unnecessary parentheses because they must be used only when it
> > is necessary or they improve readability.
> > Reported by checkpatch.
> 
> I gave you feedback about the memset changes.
> Please use it.
> https://lore.kernel.org/lkml/f5fe04d62b22eb5e09c299e769d9b9d8917f119c.camel@perches.com/
>
I am sorry Sir, I missed this. I will make required changes now.

> > Changes from v3:- No changes.
> > Changes from v2:- Rectified spelling mistake in subject description.
> > Changes has been made in v3.
> > Changes from v1:- No changes.
> []
> > diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> []
> > @@ -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(&pHTInfo->SelfHTCap, 0, sizeof(pHTInfo->SelfHTCap);
> 
> etc...
> 

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

* Re: [PATCH v4 3/3] staging: rtl8192e: remove unnecessary parentheses
@ 2021-04-13  2:03       ` Mitali Borkar
  0 siblings, 0 replies; 9+ messages in thread
From: Mitali Borkar @ 2021-04-13  2:03 UTC (permalink / raw)
  To: Joe Perches, gregkh
  Cc: linux-staging, linux-kernel, outreachy-kernel, mitali_s

On Mon, Apr 12, 2021 at 01:46:54PM -0700, Joe Perches wrote:
> On Mon, 2021-04-12 at 16:52 +0530, Mitali Borkar wrote:
> > Removed unnecessary parentheses because they must be used only when it
> > is necessary or they improve readability.
> > Reported by checkpatch.
> 
> I gave you feedback about the memset changes.
> Please use it.
> https://lore.kernel.org/lkml/f5fe04d62b22eb5e09c299e769d9b9d8917f119c.camel@perches.com/
>
I am sorry Sir, I missed this. I will make required changes now.

> > Changes from v3:- No changes.
> > Changes from v2:- Rectified spelling mistake in subject description.
> > Changes has been made in v3.
> > Changes from v1:- No changes.
> []
> > diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> []
> > @@ -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(&pHTInfo->SelfHTCap, 0, sizeof(pHTInfo->SelfHTCap);
> 
> etc...
> 


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

end of thread, other threads:[~2021-04-13 14:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-12 11:21 [PATCH v4 0/3] staging: rtl8192e: cleanup patchset for style issues Mitali Borkar
2021-04-12 11:21 ` [PATCH v4 1/3] staging: rtl8192e: remove parentheses around boolean expression Mitali Borkar
2021-04-12 11:21 ` [PATCH v4 2/3] staging: rtl8192e: remove unnecessary ftrace-like logging Mitali Borkar
2021-04-12 11:22 ` [PATCH v4 3/3] staging: rtl8192e: remove unnecessary parentheses Mitali Borkar
2021-04-12 20:46   ` Joe Perches
2021-04-12 20:46     ` Joe Perches
2021-04-13  2:03     ` Mitali Borkar
2021-04-13  2:03       ` Mitali Borkar
  -- strict thread matches above, loose matches on Subject: below --
2021-04-11 11:34 [PATCH v4 0/3] staging: rtl8192e: modified log message Mitali Borkar
2021-04-11 11:35 ` [PATCH v4 3/3] staging: rtl8192e: remove unnecessary parentheses Mitali Borkar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.