[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210512184850.3526677-2-Liam.Howlett@Oracle.com>
Date:   Wed, 12 May 2021 18:48:52 +0000
From:   Liam Howlett <liam.howlett@...cle.com>
To:     "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Matthew Wilcox <willy@...radead.org>
CC:     Liam Howlett <liam.howlett@...cle.com>
Subject: [PATCH 2/4] radix tree test suite: Add __must_be_array() support
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@...cle.com>
---
 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
Powered by blists - more mailing lists