Skip to contentSkip to conversation

sparse: add noclone as an ignored attribute

PATCH Applied Randy Dunlap 2 participants 4 messages Feb 11, 2013 – Feb 22, 2013 Sparse checker

lore
Share & tools
lore
#0 lore raw

From: Randy Dunlap <[email protected]>

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

---
 parse.c |    3 +++
 1 file changed, 3 insertions(+)
parse.c +3 -0
@@ -541,6 +541,9 @@ const char *ignored_attributes[] = {
 	"__naked__",
 	"no_instrument_function",
 	"__no_instrument_function__",
+	"noclone",
+	"__noclone",
+	"__noclone__",
 	"noinline",
 	"__noinline__",
 	"nonnull",
maintainer
#1 lore raw
Quoted 6 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

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

#2 lore raw

sparse patch v2: add noclone as an ignored attribute

From: Randy Dunlap <[email protected]>

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)

---
 parse.c                   |    3 +++
 validation/attr-noclone.c |    9 +++++++++
 2 files changed, 12 insertions(+)
parse.c +3 -0
@@ -541,6 +541,9 @@ const char *ignored_attributes[] = {
 	"__naked__",
 	"no_instrument_function",
 	"__no_instrument_function__",
+	"noclone",
+	"__noclone",
+	"__noclone__",
 	"noinline",
 	"__noinline__",
 	"nonnull",
validation/attr-noclone.c new file +9 -0
@@ -0,0 +1,9 @@
+#define noclone		__attribute__((__noclone__))
+
+static void noclone bar(void)
+{
+}
+
+/*
+ * check-name: attribute noclone
+ */
maintainer Applied
#3 lore raw

Re: sparse patch v2: add noclone as an ignored attribute

Quoted 4 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

Add attribute "noclone" or "__noclone" or "__noclone__" as an ignored attribute. Fixes this sparse warning:

Thanks, applied.

Chris