From: Lance Richardson <lrichard@redhat.com>
To: linux-sparse@vger.kernel.org
Subject: [PATCH v2] sparse: ignore __assume_aligned__ attribute
Date: Wed, 28 Sep 2016 14:41:05 -0400 [thread overview]
Message-ID: <1475088065-31142-1-git-send-email-lrichard@redhat.com> (raw)
The __assume_aligned__ attribute can be safely ignored, add it
to the list of ignored attributes and add a test to verify that
this attribute is ignored.
Signed-off-by: Lance Richardson <lrichard@redhat.com>
---
v2: Added test case.
parse.c | 2 ++
validation/attr_aligned.c | 5 +++++
2 files changed, 7 insertions(+)
create mode 100644 validation/attr_aligned.c
diff --git a/parse.c b/parse.c
index 4e38f3f..634f109 100644
--- a/parse.c
+++ b/parse.c
@@ -510,6 +510,8 @@ const char *ignored_attributes[] = {
"__always_inline__",
"artificial",
"__artificial__",
+ "assume_aligned",
+ "__assume_aligned__",
"bounded",
"__bounded__",
"cdecl",
diff --git a/validation/attr_aligned.c b/validation/attr_aligned.c
new file mode 100644
index 0000000..af2c363
--- /dev/null
+++ b/validation/attr_aligned.c
@@ -0,0 +1,5 @@
+void *foo(void) __attribute__((__assume_aligned__(4096)));
+/*
+ * check-name: attribute assume_aligned
+ */
+
--
2.5.5
next reply other threads:[~2016-09-28 18:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-28 18:41 Lance Richardson [this message]
2016-09-28 20:27 ` [PATCH v2] sparse: ignore __assume_aligned__ attribute 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=1475088065-31142-1-git-send-email-lrichard@redhat.com \
--to=lrichard@redhat.com \
--cc=linux-sparse@vger.kernel.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).