All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: David Airlie <airlied@linux.ie>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
	"Russell King" <rmk+kernel@armlinux.org.uk>,
	"Inki Dae" <inki.dae@samsung.com>,
	"Joonyoung Shim" <jy0922.shim@samsung.com>,
	"Seung-Woo Kim" <sw0312.kim@samsung.com>,
	"Kyungmin Park" <kyungmin.park@samsung.com>,
	"Kukjin Kim" <kgene@kernel.org>,
	"Krzysztof Kozlowski" <k.kozlowski@samsung.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Ben Skeggs" <bskeggs@redhat.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	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	[thread overview]
Message-ID: <1463587653-3035181-2-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1463587653-3035181-1-git-send-email-arnd@arndb.de>

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 <arnd@arndb.de>
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 " .
-- 
2.7.0

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: David Airlie <airlied@linux.ie>
Cc: "Krzysztof Kozlowski" <k.kozlowski@samsung.com>,
	linux-samsung-soc@vger.kernel.org,
	"Arnd Bergmann" <arnd@arndb.de>,
	nouveau@lists.freedesktop.org,
	"Seung-Woo Kim" <sw0312.kim@samsung.com>,
	"Russell King" <rmk+kernel@armlinux.org.uk>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Kyungmin Park" <kyungmin.park@samsung.com>,
	"Kukjin Kim" <kgene@kernel.org>,
	linux-mediatek@lists.infradead.org,
	"Ben Skeggs" <bskeggs@redhat.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Christian König" <christian.koenig@amd.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/5] headers_check: don't warn about c++ guards
Date: Wed, 18 May 2016 18:07:29 +0200	[thread overview]
Message-ID: <1463587653-3035181-2-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1463587653-3035181-1-git-send-email-arnd@arndb.de>

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 <arnd@arndb.de>
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 " .
-- 
2.7.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/5] headers_check: don't warn about c++ guards
Date: Wed, 18 May 2016 18:07:29 +0200	[thread overview]
Message-ID: <1463587653-3035181-2-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1463587653-3035181-1-git-send-email-arnd@arndb.de>

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 <arnd@arndb.de>
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 " .
-- 
2.7.0

  reply	other threads:[~2016-05-18 16:09 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18 16:07 [PATCH 0/5] drm: fixes for merge-window regressions Arnd Bergmann
2016-05-18 16:07 ` Arnd Bergmann
2016-05-18 16:07 ` Arnd Bergmann
2016-05-18 16:07 ` Arnd Bergmann [this message]
2016-05-18 16:07   ` [PATCH 1/5] headers_check: don't warn about c++ guards Arnd Bergmann
2016-05-18 16:07   ` Arnd Bergmann
2016-05-18 20:20   ` Emil Velikov
2016-05-18 20:20     ` Emil Velikov
2016-05-18 20:20     ` Emil Velikov
2016-05-18 16:07 ` [PATCH 2/5] drm: mediatek: add CONFIG_OF dependency Arnd Bergmann
2016-05-18 16:07   ` Arnd Bergmann
2016-05-18 16:07   ` Arnd Bergmann
2016-05-19 14:55   ` Matthias Brugger
2016-05-19 14:55     ` Matthias Brugger
2016-05-18 16:07 ` [PATCH 3/5] drm: mediatek: fixup drm_gem_object_lookup API change Arnd Bergmann
2016-05-18 16:07   ` Arnd Bergmann
2016-05-18 16:07   ` Arnd Bergmann
2016-05-19 14:56   ` Matthias Brugger
2016-05-19 14:56     ` Matthias Brugger
2016-05-18 16:07 ` [PATCH 4/5] drm: exynos: mark pm functions as __maybe_unused Arnd Bergmann
2016-05-18 16:07   ` Arnd Bergmann
2016-05-18 16:07   ` Arnd Bergmann
2016-05-18 16:07 ` [PATCH 5/5] drm: remove unused dev variables Arnd Bergmann
2016-05-18 16:07   ` Arnd Bergmann
2016-05-18 16:07   ` Arnd Bergmann
2016-05-18 17:17   ` Daniel Vetter
2016-05-18 17:17     ` Daniel Vetter
2016-05-18 17:17     ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1463587653-3035181-2-git-send-email-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=bskeggs@redhat.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=jy0922.shim@samsung.com \
    --cc=k.kozlowski@samsung.com \
    --cc=kgene@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=sw0312.kim@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.