| /// Use WARN(1,...) rather than printk followed by WARN_ON(1) |
| // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. |
| // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. |
| // URL: http://coccinelle.lip6.fr/ |
| // Options: --no-includes --include-headers |
| @r1 depends on context || report || org@ |
| @script:python depends on org@ |
| cocci.print_main("printk + WARN_ON can be just WARN",p) |
| @script:python depends on report@ |
| msg = "SUGGESTION: printk + WARN_ON can be just WARN" |
| coccilib.report.print_report(p[0],msg) |
| // -------------------------------------------------------------------- |
| @r2 depends on context || report || org@ |
| @script:python depends on org@ |
| cocci.print_main("printk + WARN_ON_ONCE can be just WARN_ONCE",p) |
| @script:python depends on report@ |
| msg = "SUGGESTION: printk + WARN_ON_ONCE can be just WARN_ONCE" |
| coccilib.report.print_report(p[0],msg) |