From: David Rientjes Date: Fri, 3 Jan 2014 03:10:17 +0000 (+1100) Subject: checkpatch: add warning of future __GFP_NOFAIL use X-Git-Tag: next-20140106~2^2~89 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bd3786e30cb90e387011bee4b651748f37c982d8;p=karo-tx-linux.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 --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index e5a6a5246fb7..09500845dbba 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4110,6 +4110,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",