From: David Rientjes Date: Thu, 23 Jan 2014 23:54:42 +0000 (-0800) Subject: checkpatch: add warning of future __GFP_NOFAIL use X-Git-Tag: v3.14-rc1~108^2~91 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7e4915e78992ebd3cc031051dc23063bbf29e749;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 8efce59..9bb4a421 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",