linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] sparse: ignore __assume_aligned__ attribute
@ 2016-09-28 18:41 Lance Richardson
  2016-09-28 20:27 ` Christopher Li
  0 siblings, 1 reply; 2+ messages in thread
From: Lance Richardson @ 2016-09-28 18:41 UTC (permalink / raw)
  To: linux-sparse

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] sparse: ignore __assume_aligned__ attribute
  2016-09-28 18:41 [PATCH v2] sparse: ignore __assume_aligned__ attribute Lance Richardson
@ 2016-09-28 20:27 ` Christopher Li
  0 siblings, 0 replies; 2+ messages in thread
From: Christopher Li @ 2016-09-28 20:27 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Linux-Sparse

On Wed, Sep 28, 2016 at 11:41 AM, Lance Richardson <lrichard@redhat.com> wrote:
> 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.

That looks good. I might duplicate one test case  for "assume_aligned"
in the finial commit.

Thanks

Chris

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-28 20:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-28 18:41 [PATCH v2] sparse: ignore __assume_aligned__ attribute Lance Richardson
2016-09-28 20:27 ` 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).