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: 9120921 Return-Path: X-Original-To: patchwork-linux-mediatek@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 87FB0BF29F for ; Wed, 18 May 2016 16:09:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8BE1E2034F for ; Wed, 18 May 2016 16:09:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9887C20211 for ; Wed, 18 May 2016 16:09:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b342N-00036P-RY; Wed, 18 May 2016 16:09:31 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b341T-0002F8-TY; Wed, 18 May 2016 16:08:37 +0000 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@arndb.de> References: <1463587653-3035181-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:GVr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8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160518_090836_330320_608E5B07 X-CRM114-Status: GOOD ( 12.19 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, Joonyoung Shim , Arnd Bergmann , nouveau@lists.freedesktop.org, Seung-Woo Kim , Russell King , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Inki Dae , Alex Deucher , Kyungmin Park , Kukjin Kim , linux-mediatek@lists.infradead.org, Ben Skeggs , Matthias Brugger , =?UTF-8?q?Christian=20K=C3=B6nig?= , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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") Reviewed-by: Emil Velikov --- 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 " .