X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=scripts%2Fcheckpatch.pl;h=4d2c7dfdaabd44abd21e53072eee8f8f884890e8;hb=e022e7eb90f3edb83f9ff77825eda3d1b3a2f2e0;hp=1d6e4c541370c832840f540399d5f7627488399c;hpb=6842d98de7bb726dfddc719cb9ae022b26a0f2b8;p=~andy%2Flinux diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 1d6e4c54137..4d2c7dfdaab 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2226,8 +2226,11 @@ sub process { my $path = $1; if ($path =~ m{//}) { ERROR("MALFORMED_INCLUDE", - "malformed #include filename\n" . - $herecurr); + "malformed #include filename\n" . $herecurr); + } + if ($path =~ "^uapi/" && $realfile =~ m@\binclude/uapi/@) { + ERROR("UAPI_INCLUDE", + "No #include in ...include/uapi/... should use a uapi/ path prefix\n" . $herecurr); } }