Re: [Cocci] how to replace obsolete #ifdef's

2019-06-05 Thread Julia Lawall
On Wed, 5 Jun 2019, Enrico Weigelt, metux IT consult wrote: > On 05.06.19 20:52, Julia Lawall wrote: > > Hi, > > > In principle you can remove some initializations and add them back. > > How can I match/remote on that "#ifdef ..." ? > > Tried that, but got similar errors like Markus got (see hi

Re: [Cocci] how to replace obsolete #ifdef's

2019-06-05 Thread Enrico Weigelt, metux IT consult
On 05.06.19 20:52, Julia Lawall wrote: Hi, In principle you can remove some initializations and add them back. How can I match/remote on that "#ifdef ..." ? Tried that, but got similar errors like Markus got (see his recent mail). It seems that spatch currently just doesn't understand prep

Re: [Cocci] how to replace obsolete #ifdef's

2019-06-05 Thread Julia Lawall
On Wed, 5 Jun 2019, Enrico Weigelt, metux IT consult wrote: > Hi folks, > > > is there a way to replace obsolete #ifdef's via spatch ? > > Here's my scenario: > > In the linux kernel we have many places where drivers statically assign > pointers to match tables (eg. for oftree or acpi) into a g

Re: [Cocci] splitting and fingerprinting findings

2019-06-05 Thread Julia Lawall
On Wed, 5 Jun 2019, Enrico Weigelt, metux IT consult wrote: > Hi folks, > > > I'd like to hack up some scripts that automatically scan and report > findings on a daily basis, eg. on the linux-next tree. Obviously, > nobody can seriously read this all at once, especially not on a > daily basis.

[Cocci] splitting and fingerprinting findings

2019-06-05 Thread Enrico Weigelt, metux IT consult
Hi folks, I'd like to hack up some scripts that automatically scan and report findings on a daily basis, eg. on the linux-next tree. Obviously, nobody can seriously read this all at once, especially not on a daily basis. Therefore I need to: * split the findings (eg. by ruleset or affected fil

Re: [Cocci] How to replace obsolete #ifdef's?

2019-06-05 Thread Markus Elfring
> Just wrapping the assignment into the macro call turned out to be easy. This feedback seems to be promising. > But I haven't found a way to remove the now #ifdef :( I get the following test result for a corresponding SmPL transformation approach. @replacement@ identifier value; @@ -#ifdef C

Re: Coccinelle: Searching for “when done” in function comments

2019-06-05 Thread Markus Elfring
ch are provided by 20 source files of the software “Linux next-20190605”. Will this source code analysis result trigger further development efforts around detection of unique wordings in these descriptions? Regards, Markus

[Cocci] how to replace obsolete #ifdef's

2019-06-05 Thread Enrico Weigelt, metux IT consult
Hi folks, is there a way to replace obsolete #ifdef's via spatch ? Here's my scenario: In the linux kernel we have many places where drivers statically assign pointers to match tables (eg. for oftree or acpi) into a global driver struct - sometimes this is enclosed into some #ifdef CONFIG_...,