[25/94] radix tree test suite: Add __must_be_array() support
diff mbox series

Message ID 20210428153542.2814175-26-Liam.Howlett@Oracle.com
State New, archived
Headers show
Series
  • Introducing the Maple Tree
Related show

Commit Message

Liam Howlett April 28, 2021, 3:35 p.m. UTC
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
---
 tools/testing/radix-tree/linux/kernel.h | 2 ++
 1 file changed, 2 insertions(+)

Patch
diff mbox series

diff --git a/tools/testing/radix-tree/linux/kernel.h b/tools/testing/radix-tree/linux/kernel.h
index 99979aeaa379..e44603a181da 100644
--- a/tools/testing/radix-tree/linux/kernel.h
+++ b/tools/testing/radix-tree/linux/kernel.h
@@ -31,4 +31,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 */