From 1edc6ac276ad4a52b106aecdf624ed6d94a8f3fa Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 6 Aug 2024 15:10:22 +0200 Subject: [PATCH] libbtrfs: move __bitwise definitions There are two places defining the checker stub macros, merge them to one place. Signed-off-by: David Sterba --- libbtrfs/kerncompat.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/libbtrfs/kerncompat.h b/libbtrfs/kerncompat.h index b7032b52..94191145 100644 --- a/libbtrfs/kerncompat.h +++ b/libbtrfs/kerncompat.h @@ -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;