Skip to content

Commit

Permalink
scripts/coccinelle: Use PTR_ERR_OR_ZERO
Browse files Browse the repository at this point in the history
PTR_RET is deprecated. Do not recommend its usage anymore.
Use PTR_ERR_OR_ZERO instead.

Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
  • Loading branch information
Sachin Kamat authored and michal42 committed Apr 8, 2014
1 parent 67554fa commit f23a9fa
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/coccinelle/api/ptr_ret.cocci
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// URL: http://coccinelle.lip6.fr/
// Options: --no-includes --include-headers
//
// Keywords: ERR_PTR, PTR_ERR, PTR_RET, PTR_ERR_OR_ZERO
// Keywords: ERR_PTR, PTR_ERR, PTR_ERR_OR_ZERO
// Version min: 2.6.39
//

Expand Down Expand Up @@ -62,35 +62,35 @@ position p3;
p << r1.p1;
@@
coccilib.org.print_todo(p[0], "WARNING: PTR_RET can be used")
coccilib.org.print_todo(p[0], "WARNING: PTR_ERR_OR_ZERO can be used")
@script:python depends on org@
p << r2.p2;
@@
coccilib.org.print_todo(p[0], "WARNING: PTR_RET can be used")
coccilib.org.print_todo(p[0], "WARNING: PTR_ERR_OR_ZERO can be used")
@script:python depends on org@
p << r3.p3;
@@
coccilib.org.print_todo(p[0], "WARNING: PTR_RET can be used")
coccilib.org.print_todo(p[0], "WARNING: PTR_ERR_OR_ZERO can be used")
@script:python depends on report@
p << r1.p1;
@@
coccilib.report.print_report(p[0], "WARNING: PTR_RET can be used")
coccilib.report.print_report(p[0], "WARNING: PTR_ERR_OR_ZERO can be used")
@script:python depends on report@
p << r2.p2;
@@
coccilib.report.print_report(p[0], "WARNING: PTR_RET can be used")
coccilib.report.print_report(p[0], "WARNING: PTR_ERR_OR_ZERO can be used")
@script:python depends on report@
p << r3.p3;
@@
coccilib.report.print_report(p[0], "WARNING: PTR_RET can be used")
coccilib.report.print_report(p[0], "WARNING: PTR_ERR_OR_ZERO can be used")

0 comments on commit f23a9fa

Please sign in to comment.