All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gargi Sharma <gs051095@gmail.com>
To: outreachy-kernel@googlegroups.com
Cc: gregkh@linuxfoundation.org, Gargi Sharma <gs051095@gmail.com>
Subject: [PATCH v2] staging: rtl8192e: Remove useless parentheses
Date: Wed, 22 Feb 2017 20:32:12 +0530	[thread overview]
Message-ID: <1487775732-5472-1-git-send-email-gs051095@gmail.com> (raw)

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



             reply	other threads:[~2017-02-22 15:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-22 15:02 Gargi Sharma [this message]
2017-02-22 15:06 ` [Outreachy kernel] [PATCH v2] staging: rtl8192e: Remove useless parentheses Julia Lawall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487775732-5472-1-git-send-email-gs051095@gmail.com \
    --to=gs051095@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=outreachy-kernel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.