staging: lustre: lustre: osc: Modify right hand side of an assignment
PATCH 1/1 staging: lustre: lustre: osc: Modify right hand side of an assignment
This patch modifies an assignment of the form a = (a <op> b);
as: a <op>= b; where <op> is << or >>.
Coccinelle script used:
@@
identifier i;
expression e;
@@
- i = (i >> e);
+ i >>= e;
@@
identifier i;
expression e;
@@
- i = (i << e);
+ i <<= e;
--- drivers/staging/lustre/lustre/osc/osc_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/osc/osc_request.c +1 -1
@@ -3326,7 +3326,7 @@ static int __init osc_init(void) reqsize =1 ;while (reqsize <OST_MAXREQSIZE ) - reqsize = reqsize <<1 ; + reqsize <<=1 ;/* * We don't enlarge the request count in OSC pool according to
Signature · 1 line
2.5.0
Greg KH
maintainerQuoted 17 lines · Janani Ravichandran
This patch modifies an assignment of the form a = (a <op> b);
as: a <op>= b; where <op> is << or >>.
Coccinelle script used:@@
identifier i;
expression e;
@@- i = (i >> e);
+ i >>= e;@@
identifier i;
expression e;
@@
Quoted 7 lines
- i = (i << e);
+ i <<= e;Signed-off-by Janani Ravichandran <[email protected]>--- drivers/staging/lustre/lustre/osc/osc_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
The subject line is very "odd", it doesn't say what you are doing. Well, it does, but it doesn't make much sense.
I understand the changes here, but why are you making them? They aren't "fixing" anything, nor making the code "simpler" or "cleaner" or anything else. We don't have any coding style rules that forces someone to write this type of expression only one way, and I don't want to start doing that either. So I really don't want to accept patches like this.
Yes, I know I already did, sorry, I'll stop that now. There has to be lots of other "real" types of fixes / cleanups that you can do instead, this code needs a lot of work :)
thanks,
greg k-h