mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
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 <[email protected]> Cc: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
d2e248e7b0
commit
7e4915e789
1 file changed
+6
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user