diff options
author | David Rientjes <rientjes@google.com> | 2014-01-23 18:54:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 19:36:57 -0500 |
commit | 7e4915e78992ebd3cc031051dc23063bbf29e749 (patch) | |
tree | 4c57102fdf47e26e466aa923f176552944791313 /scripts | |
parent | d2e248e7b0068b940f3ca1fc26da603536a533db (diff) |
checkpatch: add warning of future __GFP_NOFAIL use
gfp.h and page_alloc.c already specify that __GFP_NOFAIL is deprecated and
no new users should be added.
Add a warning to checkpatch to catch this.
Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 8efce590d4b6..9bb4a421a8d0 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -4113,6 +4113,12 @@ sub process { | |||
4113 | "$1 uses number as first arg, sizeof is generally wrong\n" . $herecurr); | 4113 | "$1 uses number as first arg, sizeof is generally wrong\n" . $herecurr); |
4114 | } | 4114 | } |
4115 | 4115 | ||
4116 | # check for GFP_NOWAIT use | ||
4117 | if ($line =~ /\b__GFP_NOFAIL\b/) { | ||
4118 | WARN("__GFP_NOFAIL", | ||
4119 | "Use of __GFP_NOFAIL is deprecated, no new users should be added\n" . $herecurr); | ||
4120 | } | ||
4121 | |||
4116 | # check for multiple semicolons | 4122 | # check for multiple semicolons |
4117 | if ($line =~ /;\s*;\s*$/) { | 4123 | if ($line =~ /;\s*;\s*$/) { |
4118 | if (WARN("ONE_SEMICOLON", | 4124 | if (WARN("ONE_SEMICOLON", |