linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Christopher Li <sparse@chrisli.org>
Cc: linux-sparse@vger.kernel.org
Subject: sparse patch v2: add noclone as an ignored attribute
Date: Thu, 21 Feb 2013 16:20:49 -0800	[thread overview]
Message-ID: <5126B9E1.1070007@infradead.org> (raw)
In-Reply-To: <CANeU7Qk+5RMN--w_BQpUoX5yh_fkdfme7AxVpm3HXVyZX_inJQ@mail.gmail.com>

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
+ */

  reply	other threads:[~2013-02-22  0:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Randy Dunlap [this message]
2013-02-22  0:56     ` sparse patch v2: " Christopher Li

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=5126B9E1.1070007@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=sparse@chrisli.org \
    /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 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).