Re: [PATCH] coccinelle: add style check for assignment in if

2015-08-15 Thread Julia Lawall
My version is below. It adds parentheses in a few more places, and allows assignments without a binary operator (b) in the && cases. Also I threw in a case for things like: if (ret = -ENOENT, !data) Another thing is that the header is not really correct. It should be in the following format:

Re: [PATCH] coccinelle: add style check for assignment in if

2015-08-15 Thread Kris Borer
I apologize, I misunderstood your email. It is the same as RFC v2. On Sat, Aug 15, 2015 at 1:30 PM, Julia Lawall wrote: > > > On Sat, 15 Aug 2015, Kris Borer wrote: > >> Add a semantic patch for fixing some cases of checkpatch.pl error: >> >> ERROR: do not use assignment in if condition >> >> Rev

Re: [PATCH] coccinelle: add style check for assignment in if

2015-08-15 Thread Julia Lawall
On Sat, 15 Aug 2015, Kris Borer wrote: > Add a semantic patch for fixing some cases of checkpatch.pl error: > > ERROR: do not use assignment in if condition > > Reviewed-by: Julia Lawall Sorry, but I'm not done reviewing it. I have a lot of changes to propose. Is this different than the R

[PATCH] coccinelle: add style check for assignment in if

2015-08-15 Thread Kris Borer
Add a semantic patch for fixing some cases of checkpatch.pl error: ERROR: do not use assignment in if condition Reviewed-by: Julia Lawall Signed-off-by: Kris Borer --- scripts/coccinelle/style/assignment_in_if.cocci | 92 + 1 file changed, 92 insertions(+) create mode