mirror of https://gitee.com/openkylin/linux.git
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: Joe Perches <joe@perches.com> Acked-by: David Howells <dhowells@redhat.com> Acked-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
5abe257af8
commit
495e9d8460
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue