staging: unisys: Remove unneeded parentheses on the right hand side of assignment
PATCH 1/1 staging: unisys: Remove unneeded parentheses on the right hand side of assignment
Remove parentheses around the right hand side of assignments as they are not needed. Semantic patch used:
@@
expression a, b, c;
@@
(
a = (b == c)
|
a =
- (
b
- )
)
--- drivers/staging/unisys/visorinput/visorinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/unisys/visorinput/visorinput.c +1 -1
@@ -468,7 +468,7 @@ handle_locking_key(struct input_dev *visorinput_dev,break ; }if (led >=0 ) { -int old_state = (test_bit (led, visorinput_dev->led) !=0 ); +int old_state =test_bit (led, visorinput_dev->led) !=0 ;if (old_state != desired_state) {input_report_key (visorinput_dev, keycode,1 );
Signature · 1 line
2.5.0
Quoted 26 lines · Janani Ravichandran
Remove parentheses around the right hand side of assignments as they are not needed. Semantic patch used:
@@
expression a, b, c;
@@(
a = (b == c)
|
a =
- (
b
- )
)Signed-off-by Janani Ravichandran <[email protected]>--- drivers/staging/unisys/visorinput/visorinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/unisys/visorinput/visorinput.c +0
-0
drivers/staging/unisys/visorinput/visorinput.c handle_locking_key(struct input_dev *visorinput_dev, · line 471
Quoted 5 lines
drivers/staging/unisys/visorinput/visorinput.c +1
-1@@ -468,7 +468,7 @@ handle_locking_key(struct input_dev *visorinput_dev,break ; }if (led >=0 ) { -int old_state = (test_bit (led, visorinput_dev->led) !=0 ); +int old_state =test_bit (led, visorinput_dev->led) !=0 ;
Maybe the parentheses are kind of nice in this case, due to the = on the right hand side.
julia
Quoted 13 lines
drivers/staging/unisys/visorinput/visorinput.c +0
-1if (old_state != desired_state) {input_report_key (visorinput_dev, keycode,1 ); --2.5.0
--
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 [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160211211314.GA4118%40janani-Inspiron-3521.
For more options, visit https://groups.google.com/d/optout.
Quoted 40 lines · Julia Lawall
Quoted 16 lines · Janani Ravichandran
Remove parentheses around the right hand side of assignments as they are not needed. Semantic patch used:
@@
expression a, b, c;
@@(
a = (b == c)
|
a =
- (
b
- )
)Review
Quoted 6 lines
Signed-off-by Janani Ravichandran <[email protected]>--- drivers/staging/unisys/visorinput/visorinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/staging/unisys/visorinput/visorinput.cdrivers/staging/unisys/visorinput/visorinput.c handle_locking_key(struct input_dev *visorinput_dev, · line 471
Quoted 9 lines
index 38d4d5b..b85dc21 100644
drivers/staging/unisys/visorinput/visorinput.c +1
-1@@ -468,7 +468,7 @@ handle_locking_key(struct input_dev *visorinput_dev,break ; }if (led >=0 ) { -int old_state = (test_bit (led, visorinput_dev->led) !=0 ); +int old_state =test_bit (led, visorinput_dev->led) !=0 ;Maybe the parentheses are kind of nice in this case, due to the = on the right hand side.
Quoted 1 line
You're right. I'll leave them as they are.
Janani.
Quoted 20 lines
julia
Quoted 8 lines
drivers/staging/unisys/visorinput/visorinput.c +0
-1if (old_state != desired_state) {input_report_key (visorinput_dev, keycode,1 ); --2.5.0
--
You received this message because you are subscribed to the GoogleGroups "outreachy-kernel" group.
Quoted 1 line
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
Quoted 2 lines
To post to this group, send email to [email protected]. To view this discussion on the web visit
https://groups.google.com/d/msgid/outreachy-kernel/20160211211314.GA4118%40janani-Inspiron-3521
.Quoted 2 lines
For more options, visit https://groups.google.com/d/optout.
Greg KH
maintainerQuoted 2 lines · Janani Ravichandran
Remove parentheses around the right hand side of assignments as they are not needed. Semantic patch used:
<snip>
The subject you used was identical to the previous patch you sent, yet it modified different things, so I wouldn't be able to take this one.
Try putting the filename in the Subject: line if you do this again, something like:
Subject: [PATCH] staging: unisys: visorinput.c: Remove...
thanks,
greg k-h
Quoted 10 lines
The subject you used was identical to the previous patch you sent, yet it modified different things, so I wouldn't be able to take this one.
Try putting the filename in the Subject: line if you do this again, something like:
Subject: [PATCH] staging: unisys:visorinput.c: Remove...
Sure, I will do that next time.
Thanks,
Janani.
Quoted 6 lines
thanks,
greg k-h