History

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.

David Rientjes committed 12 years ago

Commit 7e4915e1 parent d2e248e1 file · +6 −0Browse files

Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all

Unified · Split

scripts/checkpatch.pl+6−0
@@ -4113,6 +4113,12 @@ sub process { · 4112 unmodified lines
41134113 "$1 uses number as first arg, sizeof is generally wrong\n" . $herecurr);
41144114 }
41154115
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+
41164122 # check for multiple semicolons
41174123 if ($line =~ /;\s*;\s*$/) {
41184124 if (WARN("ONE_SEMICOLON",