libbtrfs: move __bitwise definitions

There are two places defining the checker stub macros, merge them to one
place.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2024-08-06 15:10:22 +02:00
parent 03735ff372
commit 1edc6ac276

View File

@ -43,11 +43,15 @@
#ifdef __CHECKER__
#define __force __attribute__((force))
#define __bitwise__ __attribute__((bitwise))
#define __bitwise __bitwise__
#else
#define __force
#ifndef __bitwise__
#define __bitwise__
#endif
#ifndef __bitwise
#define __bitwise
#endif
#endif
#ifndef __CHECKER__
@ -117,13 +121,6 @@ do { \
#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 /* __CHECKER__ */
#endif /* __bitwise */
typedef u16 __bitwise __le16;
typedef u16 __bitwise __be16;