[PATCH v2] sparse: ignore __assume_aligned__ attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux