summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-25 09:37:50 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-25 09:37:50 -0700
commitb462b37b08be1b6a4e380d78b978ec1ff84e2783 (patch)
tree8728f728c85f9c94d0158a634581b3f90d50d65b
parent24c82fbb86c675bc265d2bd815d17c4861c50580 (diff)
parent92181d47ee74749bdf902f080dab9fa9ef44b37f (diff)
downloadlinux-b462b37b08be1b6a4e380d78b978ec1ff84e2783.tar.gz
Merge tag 'drm-4.7-rc1-headers-fix' of git://people.freedesktop.org/~airlied/linux
Pull header warning fix from Dave Airlie: "Here is the C++ guards warning fix from Arnd" [ Background: there are 'extern "C" { }' guards in include/uapi for the GPU headers. They should arguably be wrapped somehow, but as it is they caused checkpatch to warn because it would trigger on the 'extern' and think it's exporting a function or variable from the kernel to user space. This just fixes checkpatch. Whether we wrap the C++ guards some way in the future will be an independent issue. ] * tag 'drm-4.7-rc1-headers-fix' of git://people.freedesktop.org/~airlied/linux: headers_check: don't warn about c++ guards
-rwxr-xr-xscripts/headers_check.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl
index 62320f93e903..8b2da054cdc3 100755
--- a/scripts/headers_check.pl
+++ b/scripts/headers_check.pl
@@ -69,6 +69,10 @@ sub check_declarations
if ($line =~ m/^void seqbuf_dump\(void\);/) {
return;
}
+ # drm headers are being C++ friendly
+ if ($line =~ m/^extern "C"/) {
+ return;
+ }
if ($line =~ m/^(\s*extern|unsigned|char|short|int|long|void)\b/) {
printf STDERR "$filename:$lineno: " .
"userspace cannot reference function or " .