Hello,
I have noticed the update suggestion “USB: quirks: simplify quirk handling”.
https://lore.kernel.org/linux-usb/[email protected]/
https://lore.kernel.org/patchwork/patch/1308991/
Thus I converted a patch hunk into the following script variant for
the semantic patch language (according to the software “Coccinelle
1.0.8-00177-g28737419”).
@adjustment@
identifier allocate, object, release;
@@
-if (object)
-{
-release(object);
-object = NULL;
-}
+release(object);
object = allocate(..., sizeof(...), ...);
Now I wonder at the moment why a known patch is not generated.
(An error message is not displayed.)
elfring@Sonne:~/Projekte/Linux/next-patched> spatch drivers/usb/core/quirks.c
~/Projekte/Coccinelle/janitor/simplify_pointer_reset2.cocci
Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci