Skip to contentSkip to conversation

include: don't collide __bitwise definitions in 4.10

PATCH In review Darrick J. Wong 2 participants 2 messages Feb 21, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 include: don't collide __bitwise definitions in 4.10

Linux 4.10 changed the definition of __bitwise in such a way that xfsprogs' definition is no longer a strict match for it. This causes gcc to complain, so only #define it here if the system hasn't already done it for us.

---
 include/xfs_arch.h |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
include/xfs_arch.h +6 -2
index 6e3172c..12cd43e 100644
@@ -25,10 +25,14 @@
 #endif
 
 #ifdef __CHECKER__
-#define __bitwise		__attribute__((bitwise))
+# ifndef __bitwise
+#  define __bitwise		__attribute__((bitwise))
+# endif
 #define __force			__attribute__((force))
 #else
-#define __bitwise
+# ifndef __bitwise
+#  define __bitwise
+# endif
 #define __force
 #endif
 
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Darrick J. Wong

Linux 4.10 changed the definition of __bitwise in such a way that xfsprogs' definition is no longer a strict match for it. This causes gcc to complain, so only #define it here if the system hasn't already done it for us.

Makes sense, thanks for catching this.

Quoted 26 lines
---
 include/xfs_arch.h |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
include/xfs_arch.h +6 -2
index 6e3172c..12cd43e 100644
@@ -25,10 +25,14 @@
 #endif
 
 #ifdef __CHECKER__
-#define __bitwise		__attribute__((bitwise))
+# ifndef __bitwise
+#  define __bitwise		__attribute__((bitwise))
+# endif
 #define __force			__attribute__((force))
 #else
-#define __bitwise
+# ifndef __bitwise
+#  define __bitwise
+# endif
 #define __force
 #endif