Hello,

A patch on a topic like “[next] lkdtm: remove redundant initialization of ret”
caught also my software development attention.
https://lkml.org/lkml/2019/6/14/265
https://lore.kernel.org/patchwork/patch/1088971/
https://lore.kernel.org/lkml/20190614094311.24024-1-colin.k...@canonical.com/


I hoped that the following script for the semantic patch language can point
such an update candidate also out.

@display@
binary operator bo;
expression e1, e2, e3;
identifier var, work;
statement is, es;
type t;
@@
*t var = e1;
 ... when != if (var bo e2) is else es
*var =
(      work(...)
|      e3
)


elfring@Sonne:~/Projekte/Linux/next-patched> spatch 
~/Projekte/Coccinelle/janitor/show_questionable_variable_initialisation1.cocci 
drivers/misc/lkdtm/core.c
…
exn while in timeout_function
Fatal error: exception Coccinelle_modules.Common.Impossible(56)


How do you think about the software situation?

Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to