]> Git Repo - linux.git/commitdiff
headers_check: don't warn about c++ guards
authorArnd Bergmann <[email protected]>
Wed, 18 May 2016 16:07:29 +0000 (18:07 +0200)
committerDave Airlie <[email protected]>
Tue, 24 May 2016 04:12:48 +0000 (14:12 +1000)
A recent addition to the DRM tree for 4.7 added 'extern "C"' guards
for c++ to all the DRM headers, and that now causes warnings
in 'make headers_check':

usr/include/drm/amdgpu_drm.h:38: userspace cannot reference function or variable defined in the kernel
usr/include/drm/drm.h:63: userspace cannot reference function or variable defined in the kernel
usr/include/drm/drm.h:699: userspace cannot reference function or variable defined in the kernel
usr/include/drm/drm_fourcc.h:30: userspace cannot reference function or variable defined in the kernel
usr/include/drm/drm_mode.h:33: userspace cannot reference function or variable defined in the kernel
usr/include/drm/drm_sarea.h:38: userspace cannot reference function or variable defined in the kernel
usr/include/drm/exynos_drm.h:21: userspace cannot reference function or variable defined in the kernel
usr/include/drm/i810_drm.h:7: userspace cannot reference function or variable defined in the kernel

This changes the headers_check.pl script to not warn about this.
I'm listing the merge commit as introducing the problem, because
there are several patches in this branch that each do this for
one file.

Signed-off-by: Arnd Bergmann <[email protected]>
Fixes: 7c10ddf87472 ("Merge branch 'drm-uapi-extern-c-fixes' of https://github.com/evelikov/linux into drm-next")
Reviewed-by: Emil Velikov <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
scripts/headers_check.pl

index 62320f93e903edeceab7c7e621b750647d0ca75a..8b2da054cdc30a0ddeaf1d59dee73d220083d57c 100755 (executable)
@@ -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 " .
This page took 0.044393 seconds and 4 git commands to generate.