From patchwork Wed May 18 16:07:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102326 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp2722003qge; Wed, 18 May 2016 09:08:39 -0700 (PDT) X-Received: by 10.36.53.84 with SMTP id k81mr5946060ita.59.1463587719017; Wed, 18 May 2016 09:08:39 -0700 (PDT) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id oy2si8260699igc.75.2016.05.18.09.08.38; Wed, 18 May 2016 09:08:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 73BB56E883; Wed, 18 May 2016 16:08:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5A2BE891B5; Wed, 18 May 2016 16:08:14 +0000 (UTC) Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0M8u6u-1ar0nB0bhk-00CAGH; Wed, 18 May 2016 18:07:46 +0200 From: Arnd Bergmann To: David Airlie Subject: [PATCH 1/5] headers_check: don't warn about c++ guards Date: Wed, 18 May 2016 18:07:29 +0200 Message-Id: <1463587653-3035181-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1463587653-3035181-1-git-send-email-arnd@arnd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U+cv8joP uerqd3YAWGHhRUzV Cc: Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, Arnd Bergmann , nouveau@lists.freedesktop.org, Seung-Woo Kim , Russell King , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Alex Deucher , Kyungmin Park , Kukjin Kim , linux-mediatek@lists.infradead.org, Ben Skeggs , Matthias Brugger , =?utf-8?q?Christian_K?= =?utf-8?b?w7ZuaWc=?= , linux-arm-kernel@lists.infradead.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Fixes: 7c10ddf87472 ("Merge branch 'drm-uapi-extern-c-fixes' of https://github.com/evelikov/linux into drm-next") --- scripts/headers_check.pl | 4 ++++ 1 file changed, 4 insertions(+) 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 " .