1 /// Use WARN(1,...) rather than printk followed by WARN_ON(1)
4 // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2.
5 // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2.
6 // URL: http://coccinelle.lip6.fr/
8 // Options: -no_includes -include_headers
23 @r1 depends on context || report || org@
30 @script:python depends on org@
34 cocci.print_main("printk + WARN_ON can be just WARN",p)
36 @script:python depends on report@
40 msg = "SUGGESTION: printk + WARN_ON can be just WARN"
41 coccilib.report.print_report(p[0],msg)
43 @ok1 depends on patch@
54 expression list ok1.es;
62 // --------------------------------------------------------------------
72 @r2 depends on context || report || org@
79 @script:python depends on org@
83 cocci.print_main("printk + WARN_ON_ONCE can be just WARN_ONCE",p)
85 @script:python depends on report@
89 msg = "SUGGESTION: printk + WARN_ON_ONCE can be just WARN_ONCE"
90 coccilib.report.print_report(p[0],msg)
92 @ok2 depends on patch@
103 expression list ok2.es;