All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] staging: rtl8192e: Remove useless parentheses
@ 2017-02-22 15:02 Gargi Sharma
  2017-02-22 15:06 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 2+ messages in thread
From: Gargi Sharma @ 2017-02-22 15:02 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh, Gargi Sharma

Parentheses are not needed on the right side of assignment.

Additionally added space around '+'and '*' to remove
checkpatch issue, space required around '+' and '*'.

Parentheses Removed using the coccinelle script:
@@
binary operator bop = {+,-,>>,<<};
expression e, e1, e2;
@@

e =
-(
        e1 bop e2
-)

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
---
Changes in v2:
	- Add spaces around '*' as well.
---
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 2 +-
 drivers/staging/rtl8192e/rtl819x_HTProc.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 9bc2848..b61e90b 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -886,7 +886,7 @@ static void _rtl92e_dm_tx_power_tracking_cb_thermal(struct net_device *dev)
 		if (tmpCCK40Mindex >= CCK_Table_length)
 			tmpCCK40Mindex = CCK_Table_length-1;
 	} else {
-		tmpval = ((u8)tmpRegA - priv->ThermalMeter[0]);
+		tmpval = (u8)tmpRegA - priv->ThermalMeter[0];
 		if (tmpval >= 6)
 			tmpOFDMindex = tmpCCK20Mindex = 0;
 		else
diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index cded0f4..4ae1d38 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -489,7 +489,7 @@ u8 HTGetHighestMCSRate(struct rtllib_device *ieee, u8 *pMCSRateSet,
 				if ((bitMap%2) != 0) {
 					if (HTMcsToDataRate(ieee, (8*i+j)) >
 					    HTMcsToDataRate(ieee, mcsRate))
-						mcsRate = (8*i+j);
+						mcsRate = 8 * i + j;
 				}
 				bitMap >>= 1;
 			}
-- 
2.7.4



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

* Re: [Outreachy kernel] [PATCH v2] staging: rtl8192e: Remove useless parentheses
  2017-02-22 15:02 [PATCH v2] staging: rtl8192e: Remove useless parentheses Gargi Sharma
@ 2017-02-22 15:06 ` Julia Lawall
  0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2017-02-22 15:06 UTC (permalink / raw)
  To: Gargi Sharma; +Cc: outreachy-kernel, gregkh



On Wed, 22 Feb 2017, Gargi Sharma wrote:

> Parentheses are not needed on the right side of assignment.
>
> Additionally added space around '+'and '*' to remove
> checkpatch issue, space required around '+' and '*'.
>
> Parentheses Removed using the coccinelle script:
> @@
> binary operator bop = {+,-,>>,<<};
> expression e, e1, e2;
> @@
>
> e =
> -(
>         e1 bop e2
> -)
>
> Signed-off-by: Gargi Sharma <gs051095@gmail.com>

Acked-by: Julia Lawall <julia.lawall@lip6.fr>

> ---
> Changes in v2:
> 	- Add spaces around '*' as well.
> ---
>  drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 2 +-
>  drivers/staging/rtl8192e/rtl819x_HTProc.c  | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
> index 9bc2848..b61e90b 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
> +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
> @@ -886,7 +886,7 @@ static void _rtl92e_dm_tx_power_tracking_cb_thermal(struct net_device *dev)
>  		if (tmpCCK40Mindex >= CCK_Table_length)
>  			tmpCCK40Mindex = CCK_Table_length-1;
>  	} else {
> -		tmpval = ((u8)tmpRegA - priv->ThermalMeter[0]);
> +		tmpval = (u8)tmpRegA - priv->ThermalMeter[0];
>  		if (tmpval >= 6)
>  			tmpOFDMindex = tmpCCK20Mindex = 0;
>  		else
> diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> index cded0f4..4ae1d38 100644
> --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
> +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> @@ -489,7 +489,7 @@ u8 HTGetHighestMCSRate(struct rtllib_device *ieee, u8 *pMCSRateSet,
>  				if ((bitMap%2) != 0) {
>  					if (HTMcsToDataRate(ieee, (8*i+j)) >
>  					    HTMcsToDataRate(ieee, mcsRate))
> -						mcsRate = (8*i+j);
> +						mcsRate = 8 * i + j;
>  				}
>  				bitMap >>= 1;
>  			}
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1487775732-5472-1-git-send-email-gs051095%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


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

end of thread, other threads:[~2017-02-22 15:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-22 15:02 [PATCH v2] staging: rtl8192e: Remove useless parentheses Gargi Sharma
2017-02-22 15:06 ` [Outreachy kernel] " Julia Lawall

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.