In latest linux api headers, __bitwise is already defined in
/usr/include/linux/types.h.

So kerncompat.h will re-define __bitwise, and cause gcc warning.

Fix it by checking if __bitwise is already define.

Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
---
The patch is based on devel branch with the following head:
commit 64abe9f619b614e589339046b6c45dfb8fa8e2a9
Author: David Sterba <dste...@suse.com>
Date:   Wed Mar 15 12:28:16 2017 +0100

    btrfs-progs: tests: misc/019, use fssum
---
 kerncompat.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kerncompat.h b/kerncompat.h
index 958bea43..fa96715f 100644
--- a/kerncompat.h
+++ b/kerncompat.h
@@ -317,11 +317,13 @@ static inline void assert_trace(const char *assertion, 
const char *filename,
 #define container_of(ptr, type, member) ({                      \
         const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
                (type *)( (char *)__mptr - offsetof(type,member) );})
+#ifndef __bitwise
 #ifdef __CHECKER__
 #define __bitwise __bitwise__
 #else
 #define __bitwise
-#endif
+#endif /* __CHECKER__ */
+#endif /* __bitwise */
 
 /* Alignment check */
 #define IS_ALIGNED(x, a)                (((x) & ((typeof(x))(a) - 1)) == 0)
-- 
2.12.0



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

Reply via email to