summaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorDavid Rientjes2014-01-24 00:54:42 +0100
committerLinus Torvalds2014-01-24 01:36:57 +0100
commit7e4915e78992ebd3cc031051dc23063bbf29e749 (patch)
tree4c57102fdf47e26e466aa923f176552944791313 /scripts/checkpatch.pl
parentcheckpatch: warn only on "space before semicolon" at end of line (diff)
downloadkernel-qcow2-linux-7e4915e78992ebd3cc031051dc23063bbf29e749.tar.gz
kernel-qcow2-linux-7e4915e78992ebd3cc031051dc23063bbf29e749.tar.xz
kernel-qcow2-linux-7e4915e78992ebd3cc031051dc23063bbf29e749.zip
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/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl6
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 {
"$1 uses number as first arg, sizeof is generally wrong\n" . $herecurr);
}
+# check for GFP_NOWAIT use
+ if ($line =~ /\b__GFP_NOFAIL\b/) {
+ WARN("__GFP_NOFAIL",
+ "Use of __GFP_NOFAIL is deprecated, no new users should be added\n" . $herecurr);
+ }
+
# check for multiple semicolons
if ($line =~ /;\s*;\s*$/) {
if (WARN("ONE_SEMICOLON",