Commit 495e9d84 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

checkpatch: warn on uapi #includes that #include <uapi/...

Avoid specifying internal uapi #include paths with uapi/...  as
userspace should not use and never see that.

Neaten message line wrapping above.
Signed-off-by: default avatarJoe Perches <>
Acked-by: default avatarDavid Howells <>
Acked-by: default avatarAndy Whitcroft <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 5abe257a
......@@ -2226,8 +2226,11 @@ sub process {
my $path = $1;
if ($path =~ m{//}) {
"malformed #include filename\n" .
"malformed #include filename\n" . $herecurr);
if ($path =~ "^uapi/" && $realfile =~ m@\binclude/uapi/@) {
"No #include in ...include/uapi/... should use a uapi/ path prefix\n" . $herecurr);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment