diff options
| author | Sachin Kamat <sachin.kamat@linaro.org> | 2014-01-27 01:51:22 -0500 |
|---|---|---|
| committer | Michal Marek <mmarek@suse.cz> | 2014-04-08 11:27:01 -0400 |
| commit | f23a9fa7e81f7df65e0bcf586e028a2db736b9e6 (patch) | |
| tree | c96ac67cad519b9fe9fde96bdcc23c691d01cef0 /scripts | |
| parent | 67554faa7614b93722ed559fc3f914b86bf606ae (diff) | |
scripts/coccinelle: Use PTR_ERR_OR_ZERO
PTR_RET is deprecated. Do not recommend its usage anymore.
Use PTR_ERR_OR_ZERO instead.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/coccinelle/api/ptr_ret.cocci | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/coccinelle/api/ptr_ret.cocci b/scripts/coccinelle/api/ptr_ret.cocci index e18f8402e37c..dd58dab5d411 100644 --- a/scripts/coccinelle/api/ptr_ret.cocci +++ b/scripts/coccinelle/api/ptr_ret.cocci | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | // URL: http://coccinelle.lip6.fr/ | 7 | // URL: http://coccinelle.lip6.fr/ |
| 8 | // Options: --no-includes --include-headers | 8 | // Options: --no-includes --include-headers |
| 9 | // | 9 | // |
| 10 | // Keywords: ERR_PTR, PTR_ERR, PTR_RET, PTR_ERR_OR_ZERO | 10 | // Keywords: ERR_PTR, PTR_ERR, PTR_ERR_OR_ZERO |
| 11 | // Version min: 2.6.39 | 11 | // Version min: 2.6.39 |
| 12 | // | 12 | // |
| 13 | 13 | ||
| @@ -62,35 +62,35 @@ position p3; | |||
| 62 | p << r1.p1; | 62 | p << r1.p1; |
| 63 | @@ | 63 | @@ |
| 64 | 64 | ||
| 65 | coccilib.org.print_todo(p[0], "WARNING: PTR_RET can be used") | 65 | coccilib.org.print_todo(p[0], "WARNING: PTR_ERR_OR_ZERO can be used") |
| 66 | 66 | ||
| 67 | 67 | ||
| 68 | @script:python depends on org@ | 68 | @script:python depends on org@ |
| 69 | p << r2.p2; | 69 | p << r2.p2; |
| 70 | @@ | 70 | @@ |
| 71 | 71 | ||
| 72 | coccilib.org.print_todo(p[0], "WARNING: PTR_RET can be used") | 72 | coccilib.org.print_todo(p[0], "WARNING: PTR_ERR_OR_ZERO can be used") |
| 73 | 73 | ||
| 74 | @script:python depends on org@ | 74 | @script:python depends on org@ |
| 75 | p << r3.p3; | 75 | p << r3.p3; |
| 76 | @@ | 76 | @@ |
| 77 | 77 | ||
| 78 | coccilib.org.print_todo(p[0], "WARNING: PTR_RET can be used") | 78 | coccilib.org.print_todo(p[0], "WARNING: PTR_ERR_OR_ZERO can be used") |
| 79 | 79 | ||
| 80 | @script:python depends on report@ | 80 | @script:python depends on report@ |
| 81 | p << r1.p1; | 81 | p << r1.p1; |
| 82 | @@ | 82 | @@ |
| 83 | 83 | ||
| 84 | coccilib.report.print_report(p[0], "WARNING: PTR_RET can be used") | 84 | coccilib.report.print_report(p[0], "WARNING: PTR_ERR_OR_ZERO can be used") |
| 85 | 85 | ||
| 86 | @script:python depends on report@ | 86 | @script:python depends on report@ |
| 87 | p << r2.p2; | 87 | p << r2.p2; |
| 88 | @@ | 88 | @@ |
| 89 | 89 | ||
| 90 | coccilib.report.print_report(p[0], "WARNING: PTR_RET can be used") | 90 | coccilib.report.print_report(p[0], "WARNING: PTR_ERR_OR_ZERO can be used") |
| 91 | 91 | ||
| 92 | @script:python depends on report@ | 92 | @script:python depends on report@ |
| 93 | p << r3.p3; | 93 | p << r3.p3; |
| 94 | @@ | 94 | @@ |
| 95 | 95 | ||
| 96 | coccilib.report.print_report(p[0], "WARNING: PTR_RET can be used") | 96 | coccilib.report.print_report(p[0], "WARNING: PTR_ERR_OR_ZERO can be used") |
