> 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
;
-}
..
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
> 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
> 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
> 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
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
> 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
>> 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.
>> 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