[PATCH 2/4] radix tree test suite: Add __must_be_array() support

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

 



Copy __must_be_array() define from include/linux/compiler.h for use in
the radix tree test suite userspace compiles.

Signed-off-by: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx>
---
 tools/testing/radix-tree/linux/kernel.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/testing/radix-tree/linux/kernel.h b/tools/testing/radix-tree/linux/kernel.h
index c400a27e544a..2c3771fff2c0 100644
--- a/tools/testing/radix-tree/linux/kernel.h
+++ b/tools/testing/radix-tree/linux/kernel.h
@@ -30,4 +30,6 @@
 # define fallthrough                    do {} while (0)  /* fallthrough */
 #endif /* __has_attribute */
 
+#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
+
 #endif /* _KERNEL_H */
-- 
2.30.2




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux