[PATCH v3 01/30] Add an assembly guard around linux/bitops.h
Simon Glass
sjg at chromium.org
Wed Nov 4 17:57:14 CET 2020
This file can be included by any header but it includes C code. Guard it
to avoid errors when compiling ASL, etc.
Signed-off-by: Simon Glass <sjg at chromium.org>
Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
---
(no changes since v1)
include/linux/bitops.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index 6b509dce58a..16f28993f5e 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -1,7 +1,7 @@
#ifndef _LINUX_BITOPS_H
#define _LINUX_BITOPS_H
-#ifndef USE_HOSTCC
+#if !defined(USE_HOSTCC) && !defined(__ASSEMBLY__)
#include <asm/types.h>
#include <asm-generic/bitsperlong.h>
@@ -218,6 +218,6 @@ static inline void generic_clear_bit(int nr, volatile unsigned long *addr)
*p &= ~mask;
}
-#endif /* !USE_HOSTCC */
+#endif /* !USE_HOSTCC && !__ASSEMBLY__ */
#endif
--
2.29.1.341.ge80a0c044ae-goog
More information about the U-Boot
mailing list