Re: [Cocci] changing of_get_mac_address() to pass a buffer

2021-04-05 Thread Julia Lawall
On Mon, 5 Apr 2021, Michael Walle wrote: > Hi Mansour, > > Am 2021-04-04 19:48, schrieb Mansour Moufid: > > On Thu, Apr 1, 2021 at 4:13 AM Michael Walle wrote: > > > > > > Hi, > > > > > > so first I need to say I've never used coccinelle before, > > > so please bear with me ;) > > > > > > To

Re: [Cocci] changing of_get_mac_address() to pass a buffer

2021-04-05 Thread Michael Walle
Hi Mansour, Am 2021-04-04 19:48, schrieb Mansour Moufid: On Thu, Apr 1, 2021 at 4:13 AM Michael Walle wrote: Hi, so first I need to say I've never used coccinelle before, so please bear with me ;) To make of_get_mac_address() work with DSA ports (and a nvmem provider) I'd need to change

Re: [Cocci] Excluding quotes from strings of #define directives

2021-04-05 Thread Markus Elfring
>> I hoped that the specified constraint for the metavariable ā€œeā€ would mean >> that expressions which contain a double quotation character should be >> excluded >> for my source code analysis approach. >> Would you like to check the observed software functionality once more? > > There is perhaps

Re: [Cocci] Checking support for compound expressions (according to #define directives)

2021-04-05 Thread Markus Elfring
>> I would like to avoid the repetition of parsing efforts as much as possible. >> Under which circumstances can replacement lists be taken better into account? > > Why does my suggestion involve a repetition of parsing effort? The selection of the applied programming interfaces has got

Re: [Cocci] Checking support for compound expressions (according to #define directives)

2021-04-05 Thread Julia Lawall
On Mon, 5 Apr 2021, Markus Elfring wrote: > >> I would like to avoid the repetition of parsing efforts as much as > >> possible. > >> Under which circumstances can replacement lists be taken better into > >> account? > > > > Why does my suggestion involve a repetition of parsing effort? > >

Re: [Cocci] Checking support for compound expressions (according to #define directives)

2021-04-05 Thread Julia Lawall
On Mon, 5 Apr 2021, Markus Elfring wrote: > >> @display@ > >> identifier i =~ "^(?:[A-Z]+_){3,3}[A-Z]+", x; > >> constant c =~ "\""; > >> @@ > >> *#define i x c > >> > >> > >> elfring@Sonne:~/Projekte/Coccinelle/janitor> spatch --parse-cocci > >> show_define_usage6.cocci > >> ā€¦ > >> minus:

Re: [Cocci] Checking support for compound expressions (according to #define directives)

2021-04-05 Thread Julia Lawall
On Mon, 5 Apr 2021, Markus Elfring wrote: > > Thanks for the simpler examples. > > Would you like to support another search pattern by the means of > the semantic patch language? > > > @display@ > identifier i =~ "^(?:[A-Z]+_){3,3}[A-Z]+", x; > constant c =~ "\""; > @@ > *#define i x c > > >