Skip to content

Commit

Permalink
Merge tag 'drm-4.7-rc1-headers-fix' of git://people.freedesktop.org/~…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Linus Torvalds committed May 25, 2016
2 parents 24c82fb + 92181d4 commit b462b37
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/headers_check.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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 " .
Expand Down

0 comments on commit b462b37

Please sign in to comment.