Skip to contentSkip to conversation

Removed unnecessary parentheses from assignment statements

PATCH New Tina Johnson 1 participant 5 messages Mar 9, 2015 Staging

lore
Share & tools
lore
#0 lore raw

cover Removed unnecessary parentheses from assignment statements

The patchset removes unnecessary parentheses around the right side of assignment statements.

Tina Johnson (4):
drivers: staging: rtl8188eu: core: Removed unnecessary parentheses
drivers: staging: rtl8712: Removed unnecessary parentheses
drivers: staging: rtl8723au: core: Removed unnecessary parentheses
drivers: staging: rtl8723au: hal: Removed unnecessary parentheses

 drivers/staging/rtl8188eu/core/rtw_security.c       |    4 ++--
 drivers/staging/rtl8712/rtl871x_security.c          |    4 ++--
 drivers/staging/rtl8723au/core/rtw_security.c       |    4 ++--
 drivers/staging/rtl8723au/hal/HalDMOutSrc8723A_CE.c |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/4 drivers: staging: rtl8188eu: core: Removed unnecessary parentheses

Parentheses around the right side of an assignment statement are unnecessary and hence removed. Coccinelle was used to produce the patch:

@rule1@
identifier x,y;
constant c;
@@

(

x =
-(
y << c
-)
;
|
x =
-(
y >> c
-)
;
|
x =
-(
y + c
-)
;
|
x =
-(
y - c
-)
;

)

---
 drivers/staging/rtl8188eu/core/rtw_security.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8188eu/core/rtw_security.c +2 -2
index f8981f5..cc66997 100644
@@ -1122,7 +1122,7 @@ static int aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen)
 	num_blocks = plen / 16;
 
 	/* Find start of payload */
-	payload_index = (hdrlen + 8);
+	payload_index = hdrlen + 8;
 
 	/* Calculate MIC */
 	aes128k128d(key, mic_iv, aes_out);
@@ -1366,7 +1366,7 @@ static int aes_decipher(u8 *key, uint	hdrlen,
 	num_blocks = (plen-8) / 16;
 
 	/* Find start of payload */
-	payload_index = (hdrlen + 8);
+	payload_index = hdrlen + 8;
 
 	/* Calculate MIC */
 	aes128k128d(key, mic_iv, aes_out);
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 2/4 drivers: staging: rtl8712: Removed unnecessary parentheses

In reply to Tina Johnson

Parentheses around the right side of an assignment statement are unnecessary and hence removed. Coccinelle was used to produce the patch:

@rule1@
identifier x,y;
constant c;
@@

(

x =
-(
y << c
-)
;
|
x =
-(
y >> c
-)
;
|
x =
-(
y + c
-)
;
|
x =
-(
y - c
-)
;

)

---
 drivers/staging/rtl8712/rtl871x_security.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8712/rtl871x_security.c +2 -2
index 4d5a288..a178c23 100644
@@ -1086,7 +1086,7 @@ static sint aes_cipher(u8 *key, uint	hdrlen,
 	payload_remainder = plen % 16;
 	num_blocks = plen / 16;
 	/* Find start of payload */
-	payload_index = (hdrlen + 8);
+	payload_index = hdrlen + 8;
 	/* Calculate MIC */
 	aes128k128d(key, mic_iv, aes_out);
 	bitwise_xor(aes_out, mic_header1, chain_buffer);
@@ -1292,7 +1292,7 @@ static sint aes_decipher(u8 *key, uint	hdrlen,
 	payload_remainder = (plen - 8) % 16;
 	num_blocks = (plen - 8) / 16;
 	/* Find start of payload */
-	payload_index = (hdrlen + 8);
+	payload_index = hdrlen + 8;
 	/* Calculate MIC */
 	aes128k128d(key, mic_iv, aes_out);
 	bitwise_xor(aes_out, mic_header1, chain_buffer);
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH 3/4 drivers: staging: rtl8723au: core: Removed unnecessary parentheses

In reply to Tina Johnson

Parentheses around the right side of an assignment statement are unnecessary and hence removed. Coccinelle was used to produce the patch:

@rule1@
identifier x,y;
constant c;
@@

(

x =
-(
y << c
-)
;
|
x =
-(
y >> c
-)
;
|
x =
-(
y + c
-)
;
|
x =
-(
y - c
-)
;

)

---
 drivers/staging/rtl8723au/core/rtw_security.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723au/core/rtw_security.c +2 -2
index 715a474..0610d5f 100644
@@ -1193,7 +1193,7 @@ static int aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen)
 	num_blocks = plen / 16;
 
 	/* Find start of payload */
-	payload_index = (hdrlen + 8);
+	payload_index = hdrlen + 8;
 
 	/* Calculate MIC */
 	aes128k128d(key, mic_iv, aes_out);
@@ -1466,7 +1466,7 @@ static int aes_decipher(u8 *key, uint	hdrlen,
 	num_blocks = (plen-8) / 16;
 
 	/* Find start of payload */
-	payload_index = (hdrlen + 8);
+	payload_index = hdrlen + 8;
 
 	/* Calculate MIC */
 	aes128k128d(key, mic_iv, aes_out);
Signature · 1 line
1.7.10.4
#4 lore raw

PATCH 4/4 drivers: staging: rtl8723au: hal: Removed unnecessary parentheses

In reply to Tina Johnson

Parentheses around the right side of an assignment statement are unnecessary and hence removed. Coccinelle was used to produce the patch:

@rule1@
identifier x,y;
constant c;
@@

(

x =
-(
y << c
-)
;
|
x =
-(
y >> c
-)
;
|
x =
-(
y + c
-)
;
|
x =
-(
y - c
-)
;

)

---
 drivers/staging/rtl8723au/hal/HalDMOutSrc8723A_CE.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723au/hal/HalDMOutSrc8723A_CE.c +1 -1
index ba37374..3f9ec9e0 100644
@@ -222,7 +222,7 @@ odm_TXPowerTrackingCallback_ThermalMeter_92C(struct rtw_adapter *Adapter)
 			}
 
 			if (CCK_index > (CCK_TABLE_SIZE-1))
-				CCK_index = (CCK_TABLE_SIZE-1);
+				CCK_index = CCK_TABLE_SIZE-1;
 			else if (CCK_index < 0)
 				CCK_index = 0;
 		}
Signature · 1 line
1.7.10.4