Re: [Cocci] drivers/phy/tegra: Completion for exception handling in probe functions with SmPL?

2019-10-30 Thread Markus Elfring
> But I stumble on another unexpected test result. I got more promising results by the following transformation approach. @adjustment exists@ expression object; identifier exit; @@ object = kzalloc(...) ... if (...) -{ kfree(object); goto -exit +release_memory ; -} ..

Re: [Cocci] xusb-tegra186: Adding a function call behind a label with SmPL?

2019-10-30 Thread Julia Lawall
On Wed, 30 Oct 2019, Markus Elfring wrote: > > There is no reason why a patch should be generated in this case. > > As you should know well, A ... B only matches in a transformation case > > if every path from A leads to code matching B. That is not the case in > > your example. > > The except

Re: [Cocci] xusb-tegra186: Adding a function call behind a label with SmPL?

2019-10-30 Thread Markus Elfring
> There is no reason why a patch should be generated in this case. > As you should know well, A ... B only matches in a transformation case > if every path from A leads to code matching B. That is not the case in your > example. The exception handling code should usually be executed at the end o

Re: [Cocci] xusb-tegra186: Adding a function call behind a label with SmPL?

2019-10-30 Thread Markus Elfring
> But I stumble on another unexpected test result. I would like point out that the following simple (?) transformation approach does not generate the expected diff hunk at the moment. @addition@ expression object; @@ object = kzalloc(...) ... when any device_unregister(...); out: +kfree(objec

Re: [Cocci] xusb-tegra186: Renaming known jump labels with SmPL?

2019-10-30 Thread Markus Elfring
> But I stumble on another unexpected test result. I have tried a related tiny transformation approach out. @renaming@ @@ -out +exit : return ERR_PTR(...); I got a diff hunk like the following then. elfring@Sonne:~/Projekte/Linux/next-patched> spatch drivers/phy/tegra/xusb-tegra186.c ~/Pro

Re: [Cocci] [PATCH v5] coccicheck: Support search for SmPL scripts within selected directory hierarchy

2019-10-30 Thread Markus Elfring
I got the impression that you are struggling with difficulties (for unknown reasons) around adding space characters at some places. How would you like to improve this situation? > *Allow defining the environment variable “COCCI” as a directory to search > SmPL scripts. > > *Start a corresponding

Re: [Cocci] drivers/phy/tegra: Completion for exception handling in probe functions with SmPL?

2019-10-30 Thread Markus Elfring
> Will any search pattern variations become more interesting for corresponding > automatic software transformations? I hoped to achieve something together with the semantic patch language by the following transformation approach. @adjustment@ expression object; identifier exit; @@ object = kzall

Re: [Cocci] [v4] coccicheck: Support search for SmPL scripts within selected directory hierarchy

2019-10-30 Thread Markus Elfring
>> Please reconsider also the section “Using Coccinelle with a single semantic >> patch”: >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/dev-tools/coccinelle.rst?id=f877bee5ea0b56c39cd0a243e113a577b5a4ef92#n151 > > Could we add new lines? Yes, of course.

Re: [Cocci] [v4] coccicheck: Support search for SmPL scripts within selected directory hierarchy

2019-10-30 Thread Markus Elfring
>> Would you like to update the provided software documentation together with >> the small extension of this bash script? > > I'd like to but i don't have rights to update. I suggest to take another look at change possibilities for affected documents. >> Update candidates: * https://git.kernel