1234567891011121314151617181920212223242526272829 |
- From: Felix Fietkau <[email protected]>
- Date: Thu, 22 Oct 2020 22:00:03 +0200
- Subject: [PATCH] compiler.h: only include asm/rwonce.h for kernel code
- This header file is not in uapi, which makes any user space code that includes
- linux/compiler.h to fail with the error 'asm/rwonce.h: No such file or directory'
- Fixes: e506ea451254 ("compiler.h: Split {READ,WRITE}_ONCE definitions out into rwonce.h")
- Signed-off-by: Felix Fietkau <[email protected]>
- ---
- --- a/include/linux/compiler.h
- +++ b/include/linux/compiler.h
- @@ -202,6 +202,8 @@ void ftrace_likely_update(struct ftrace_
- __v; \
- })
-
- +#include <asm/rwonce.h>
- +
- #endif /* __KERNEL__ */
-
- /*
- @@ -243,6 +245,4 @@ static inline void *offset_to_ptr(const
- */
- #define prevent_tail_call_optimization() mb()
-
- -#include <asm/rwonce.h>
- -
- #endif /* __LINUX_COMPILER_H */
|