projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5abe257
)
checkpatch: warn on uapi #includes that #include <uapi/...
author
Joe Perches
<
[email protected]
>
Thu, 20 Dec 2012 23:05:37 +0000
(15:05 -0800)
committer
Linus Torvalds
<
[email protected]
>
Fri, 21 Dec 2012 01:40:20 +0000
(17:40 -0800)
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 <
[email protected]
>
Acked-by: David Howells <
[email protected]
>
Acked-by: Andy Whitcroft <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
scripts/checkpatch.pl
patch
|
blob
|
history
diff --git
a/scripts/checkpatch.pl
b/scripts/checkpatch.pl
index 1d6e4c541370c832840f540399d5f7627488399c..4d2c7dfdaabd44abd21e53072eee8f8f884890e8 100755
(executable)
--- 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);
}
}