diff options
| author | Joe Perches <joe@perches.com> | 2012-12-20 18:05:37 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-20 20:40:20 -0500 |
| commit | 495e9d84607cda966ba6d223d5eb9df0070cd21a (patch) | |
| tree | 208667895c3646fe4fa1bb7322d0ed1f51880ca5 /scripts | |
| parent | 5abe257af8b95857b95fa0ba694530b446ae32d8 (diff) | |
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>
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/checkpatch.pl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 1d6e4c541370..4d2c7dfdaabd 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
| @@ -2226,8 +2226,11 @@ sub process { | |||
| 2226 | my $path = $1; | 2226 | my $path = $1; |
| 2227 | if ($path =~ m{//}) { | 2227 | if ($path =~ m{//}) { |
| 2228 | ERROR("MALFORMED_INCLUDE", | 2228 | ERROR("MALFORMED_INCLUDE", |
| 2229 | "malformed #include filename\n" . | 2229 | "malformed #include filename\n" . $herecurr); |
| 2230 | $herecurr); | 2230 | } |
| 2231 | if ($path =~ "^uapi/" && $realfile =~ m@\binclude/uapi/@) { | ||
| 2232 | ERROR("UAPI_INCLUDE", | ||
| 2233 | "No #include in ...include/uapi/... should use a uapi/ path prefix\n" . $herecurr); | ||
| 2231 | } | 2234 | } |
| 2232 | } | 2235 | } |
| 2233 | 2236 | ||
