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: 9120931 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3CE899F1D3 for ; Wed, 18 May 2016 16:09:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3535620211 for ; Wed, 18 May 2016 16:09:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D6AE52035D for ; Wed, 18 May 2016 16:09:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932929AbcERQJM (ORCPT ); Wed, 18 May 2016 12:09:12 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:59783 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932871AbcERQIk (ORCPT ); Wed, 18 May 2016 12:08:40 -0400 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 Cc: Arnd Bergmann , Russell King , Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Kukjin Kim , Krzysztof Kozlowski , Matthias Brugger , Ben Skeggs , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-mediatek@lists.infradead.org, nouveau@lists.freedesktop.org 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:GVrd8RhmDeRcHN+5+Ktd63gqwa4gJ3by9zkRhoxZaTwZhT5olQp mEOcii1XyW0b7KEjrKPwDW0yjRd+GUfd91e3oPoDMr8cNpUDELgtZghp7PplRxVxbtbYja5 DG3u0dQFpZYE+jL5Gwtf+/yCjbe/CYR5/JLjhpdU5EenkC3ktmkXYBEH4cpDvlLSzfHb8SL Dd9vBlz/AUcNlLQ9lFpaw== X-UI-Out-Filterresults: notjunk:1; V01:K0:sAP0I6DN8+8=:PHHnE5R9tGlv3HczsdDuSj gnPJ4ZL/yEyAsLRYhjrE+gfo0xs61ETmOjCyQuxZFxUVxjIW6Pbp70M0IQQxhJZPcnXS9JMMc 6IjNO9FxrWBMmfeVbq5+pnqsxjt/m1/oDOD/V+c/60ptIMl6Nt8EGpGo42AUwfuiVOc8U7OyZ mtjJnT6YbNWXQ2387CG7tfWIiwKcJbHojNiMJyKMjocHo3GZE5uIkET5sqKtSa7GVg96wXbNS tLiKv6dYx24exrDWfPyf50cm6NS3Px8ZKHW4u9xmF/S3xxF1/wlGP1toJvLwTPbyNYj7P+x8K SJzP7B3d41e1SxB8UouK77snSSNmlNyQ4Zd2BEBvq6nszFH5B+7Yv5gki1mABXnhYMtKXpk9G 7I+gNfR0kG698gD8j4kuFfC1yxdEMgzQl1Kk8yd/h2SsRtllDHVPD14WT5Wssoa5n2ZFzzwVV 0vK92OlA+86Au0JGqQNmVv4iZfuYtaGRJo66xo3o7M0mBzL1U+4dH3o+lYlBR/hyrBVzb8Iqt 8G2kcwskFK9lziHPeHFDLJeLDsKLYXg9GPe2u01PtngPqvk1fsly+4dH5iw/v1sYAjGs5iZDY hYyuce4UDkFqByCqe4hSA0eUhw/wfBkfv9AxTk1E9QdsJ9TY9YDrg3lfGxsGwVCuFciTSCH++ em8YqrMxxr20YiZ4rHVSHa1mgjPCPAlAdfm2cnU0Mhj3ywwHmYE7++QiMwDpIeM4WU+cv8joP uerqd3YAWGHhRUzV Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 " .