* sparse: add noclone as an ignored attribute
@ 2013-02-11 1:49 Randy Dunlap
2013-02-21 23:35 ` Christopher Li
0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2013-02-11 1:49 UTC (permalink / raw)
To: linux-sparse, Christopher Li
From: Randy Dunlap <rdunlap@infradead.org>
Add attribute "noclone" or "__noclone" or "__noclone__" as an
ignored attribute. Fixes this sparse warning:
arch/x86/kvm/vmx.c:6268:13: error: attribute '__noclone__': unknown attribute
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
parse.c | 3 +++
1 file changed, 3 insertions(+)
--- sparse-2013-0210.orig/parse.c
+++ sparse-2013-0210/parse.c
@@ -541,6 +541,9 @@ const char *ignored_attributes[] = {
"__naked__",
"no_instrument_function",
"__no_instrument_function__",
+ "noclone",
+ "__noclone",
+ "__noclone__",
"noinline",
"__noinline__",
"nonnull",
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: sparse: add noclone as an ignored attribute
2013-02-11 1:49 sparse: add noclone as an ignored attribute Randy Dunlap
@ 2013-02-21 23:35 ` Christopher Li
2013-02-22 0:20 ` sparse patch v2: " Randy Dunlap
0 siblings, 1 reply; 4+ messages in thread
From: Christopher Li @ 2013-02-21 23:35 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linux-sparse
On Sun, Feb 10, 2013 at 5:49 PM, Randy Dunlap <rdunlap@infradead.org> wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
>
> Add attribute "noclone" or "__noclone" or "__noclone__" as an
> ignored attribute. Fixes this sparse warning:
>
> arch/x86/kvm/vmx.c:6268:13: error: attribute '__noclone__': unknown attribute
The change looks good. Can you add a test case for the noclone attribute
in the validations directory? I am happy to apply it.
Chris
^ permalink raw reply [flat|nested] 4+ messages in thread
* sparse patch v2: add noclone as an ignored attribute
2013-02-21 23:35 ` Christopher Li
@ 2013-02-22 0:20 ` Randy Dunlap
2013-02-22 0:56 ` Christopher Li
0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2013-02-22 0:20 UTC (permalink / raw)
To: Christopher Li; +Cc: linux-sparse
From: Randy Dunlap <rdunlap@infradead.org>
Add attribute "noclone" or "__noclone" or "__noclone__" as an
ignored attribute. Fixes this sparse warning:
arch/x86/kvm/vmx.c:6268:13: error: attribute '__noclone__': unknown attribute
Also add test case for 'noclone': validation/attr-noclone.c.
'make check' says for this test case:
TEST attribute noclone (attr-noclone.c)
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
parse.c | 3 +++
validation/attr-noclone.c | 9 +++++++++
2 files changed, 12 insertions(+)
--- sparse-2013-0210.orig/parse.c
+++ sparse-2013-0210/parse.c
@@ -541,6 +541,9 @@ const char *ignored_attributes[] = {
"__naked__",
"no_instrument_function",
"__no_instrument_function__",
+ "noclone",
+ "__noclone",
+ "__noclone__",
"noinline",
"__noinline__",
"nonnull",
--- /dev/null
+++ sparse-2013-0210/validation/attr-noclone.c
@@ -0,0 +1,9 @@
+#define noclone __attribute__((__noclone__))
+
+static void noclone bar(void)
+{
+}
+
+/*
+ * check-name: attribute noclone
+ */
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-22 0:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-11 1:49 sparse: add noclone as an ignored attribute Randy Dunlap
2013-02-21 23:35 ` Christopher Li
2013-02-22 0:20 ` sparse patch v2: " Randy Dunlap
2013-02-22 0:56 ` Christopher Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).