[Cocci] Capturing all array initializers?

2019-03-26 Thread Michael Stefaniuc
Hello, I'm trying to do this transformation, from: const WCHAR wstr[] = {'u','t','f','1','6',' ','s','t','r','i','n','g','\0'}; to: const WCHAR wstr[] = u"utf16 string"; I had hoped to be able to use an expression list for the array initializer, but that produces a parse error. I know

Re: [Cocci] [PATCH] scripts: coccinelle: Fix description of badty.cocci

2019-03-26 Thread Julia Lawall
On Tue, 26 Mar 2019, Michael Stefaniuc wrote: > Summary was copy and pasted from array_size.cocci. > > Signed-off-by: Michael Stefaniuc > --- > scripts/coccinelle/misc/badty.cocci | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/coccinelle/misc/badty.cocci >

[Cocci] [PATCH] scripts: coccinelle: Fix description of badty.cocci

2019-03-26 Thread Michael Stefaniuc
Summary was copy and pasted from array_size.cocci. Signed-off-by: Michael Stefaniuc --- scripts/coccinelle/misc/badty.cocci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/coccinelle/misc/badty.cocci b/scripts/coccinelle/misc/badty.cocci index

Re: [Cocci] RFC catching hidden code in if conditions

2019-03-26 Thread Markus Elfring
> Noticed that the nuveau driver uses a fair number of > if (var=val,boolean-condition){} > which while legal C-code just makes it hard to read > - and some seems buggy actually. Do you find another analysis approach nicer for the semantic patch language than the existing check “ASSIGN_IN_IF” by

Re: [Cocci] [PATCH] coccinelle: put_device: reduce false positives

2019-03-26 Thread Julia Lawall
On Tue, 26 Mar 2019, Dan Carpenter wrote: > On Tue, Mar 26, 2019 at 10:38:43AM +0100, Julia Lawall wrote: > > > > > > On Tue, 26 Mar 2019, Dan Carpenter wrote: > > > > > On Sat, Mar 23, 2019 at 09:06:54PM +0100, Julia Lawall wrote: > > > > > > > > > > > > On Sat, 23 Mar 2019, Markus Elfring

Re: [Cocci] [PATCH] coccinelle: put_device: reduce false positives

2019-03-26 Thread Dan Carpenter
On Tue, Mar 26, 2019 at 10:38:43AM +0100, Julia Lawall wrote: > > > On Tue, 26 Mar 2019, Dan Carpenter wrote: > > > On Sat, Mar 23, 2019 at 09:06:54PM +0100, Julia Lawall wrote: > > > > > > > > > On Sat, 23 Mar 2019, Markus Elfring wrote: > > > > > > > > Don't complain about a return when this

Re: [Cocci] [v5] coccinelle: semantic code search for missing put_device()

2019-03-26 Thread Julia Lawall
On Tue, 26 Mar 2019, Masahiro Yamada wrote: > On Tue, Mar 26, 2019 at 6:06 PM Markus Elfring wrote: > > > > > When I searched "Wen Yang", v6 did not show up for some reasons. > > > https://lore.kernel.org/patchwork/project/lkml/list/?series==22638=*=== > > > > I find such a situation also

Re: [Cocci] [PATCH] coccinelle: put_device: reduce false positives

2019-03-26 Thread Julia Lawall
On Tue, 26 Mar 2019, Dan Carpenter wrote: > On Sat, Mar 23, 2019 at 09:06:54PM +0100, Julia Lawall wrote: > > > > > > On Sat, 23 Mar 2019, Markus Elfring wrote: > > > > > > Don't complain about a return when this function returns ">dev". > > > > > > Would this information qualify to add the tag

Re: [Cocci] [v5] coccinelle: semantic code search for missing put_device()

2019-03-26 Thread Markus Elfring
>> So, I just thought v5 was the latest one >> and I was completely missing the context. > > I think it is a minor detail Additional implementation details were discussed also for this script of the semantic patch language. > that will have no impact in practice. It will take another while to

Re: [Cocci] [v5] coccinelle: semantic code search for missing put_device()

2019-03-26 Thread Markus Elfring
> When I searched "Wen Yang", v6 did not show up for some reasons. > https://lore.kernel.org/patchwork/project/lkml/list/?series==22638=*=== I find such a situation also interesting somehow. I assume that there was another temporary technical difficulty involved with the Linux mailing list (and

Re: [Cocci] [PATCH] coccinelle: put_device: reduce false positives

2019-03-26 Thread Dan Carpenter
On Sat, Mar 23, 2019 at 09:06:54PM +0100, Julia Lawall wrote: > > > On Sat, 23 Mar 2019, Markus Elfring wrote: > > > > Don't complain about a return when this function returns ">dev". > > > > Would this information qualify to add the tag “Fixes” to the commit message? > > Fixes tags relate to

Re: [Cocci] [v5] coccinelle: semantic code search for missing put_device()

2019-03-26 Thread Julia Lawall
On Tue, 26 Mar 2019, Masahiro Yamada wrote: > On Sun, Mar 24, 2019 at 1:19 AM Markus Elfring wrote: > > > > > Applied to linux-kbuild. > > > > A questionable development version was integrated for this SmPL script. > > > Sorry for my bad job. > > I usually use LKML patchwork to find patches.

Re: [Cocci] [v5] coccinelle: semantic code search for missing put_device()

2019-03-26 Thread Masahiro Yamada
On Sun, Mar 24, 2019 at 1:19 AM Markus Elfring wrote: > > > Applied to linux-kbuild. > > A questionable development version was integrated for this SmPL script. Sorry for my bad job. I usually use LKML patchwork to find patches. When I searched "Wen Yang", v6 did not show up for some reasons.