Re: [Cocci] Continuation for a code search after a common SmPL rule?

2019-05-20 Thread Markus Elfring
>> Can the splitting and recombination of such rules become more convenient >> with extensions for the Coccinelle software? > > In general it can't. This feedback seems to fit to the current software situation. > Coccinelle doesn't have the goal of minimizing the number of characters > in te sem

Re: [Cocci] Continuation for a code search after a common SmPL rule?

2019-05-20 Thread Julia Lawall
On Tue, 21 May 2019, Markus Elfring wrote: > Message repetition from 2019-05-16 because of a temporary technical difficulty > with the mailing list services: > > = > > Hello, > > The semantic patch language can handle several rules which can contain > remarkable amounts of source code searc

[Cocci] Continuation for a code search after a common SmPL rule?

2019-05-20 Thread Markus Elfring
Message repetition from 2019-05-16 because of a temporary technical difficulty with the mailing list services: = Hello, The semantic patch language can handle several rules which can contain remarkable amounts of source code search specifications. It can happen then that a few of these SmPL

Re: Coccinelle: semantic patch for missing of_node_put

2019-05-20 Thread Markus Elfring
> On the other hand, I don't know if the one that seemed to cause a crash > really caused a crash. It was detected by syzkaller, and it is also > possible that git bisect ended up at the wrong place. Do you refer to any known bug report here? > In any case, forgetting an of_node_put will normal

Re: [Cocci] Coccinelle: semantic patch for missing of_node_put

2019-05-20 Thread Julia Lawall
On Mon, 20 May 2019, Sasha Levin wrote: > On Mon, May 20, 2019 at 11:52:37AM +0200, Julia Lawall wrote: > > > > > > On Mon, 20 May 2019, Pavel Machek wrote: > > > > > Hi! > > > > > > > A semantic patch has no access to comments. The only thing I can see to > > > > do is to use python to intera

Re: Coccinelle: semantic patch for missing of_node_put

2019-05-20 Thread Sasha Levin
On Mon, May 20, 2019 at 11:52:37AM +0200, Julia Lawall wrote: On Mon, 20 May 2019, Pavel Machek wrote: Hi! > A semantic patch has no access to comments. The only thing I can see to > do is to use python to interact with some external tools. For example, > you could write some code to colle

Re: [Cocci] Coccinelle: semantic patch for missing of_node_put

2019-05-20 Thread Julia Lawall
On Mon, 20 May 2019, Pavel Machek wrote: > Hi! > > > A semantic patch has no access to comments. The only thing I can see to > > do is to use python to interact with some external tools. For example, > > you could write some code to collect the comments in a file and the lines > > on which th

Re: [Cocci] Coccinelle: semantic patch for missing of_node_put

2019-05-20 Thread Markus Elfring
> $ spatch --tokens-c drivers/of/base.c 2>&1 | grep "Tag3 " | grep > "of_node_put() on it when done." | awk -F " - " '{print $1}' | grep -o > "of_[[:print:]]*" This command example points some details out for further software development considerations. 1. I find it questionable that releva

Re: Coccinelle: semantic patch for missing of_node_put

2019-05-20 Thread Julia Lawall
On Mon, 20 May 2019, Pavel Machek wrote: > Hi! > > > A semantic patch has no access to comments. The only thing I can see to > > do is to use python to interact with some external tools. For example, > > you could write some code to collect the comments in a file and the lines > > on which th

Re: Coccinelle: semantic patch for missing of_node_put

2019-05-20 Thread Pavel Machek
Hi! > A semantic patch has no access to comments. The only thing I can see to > do is to use python to interact with some external tools. For example, > you could write some code to collect the comments in a file and the lines > on which they occur, and then get the comment that most closely pre