diff mbox series

[01/32] Add an assembly guard around linux/bitops.h

Message ID 20200927222538.1.I982d295cd4d9f3b870a9e9693cbe4675ab8a1dea@changeid
State New
Delegated to: Bin Meng
Headers show
Series x86: Allow Coral to boot into Chrome OS | expand

Commit Message

Simon Glass Sept. 28, 2020, 4:25 a.m. UTC
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@chromium.org>
---

 include/linux/bitops.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Bin Meng Oct. 16, 2020, 9:55 a.m. UTC | #1
On Mon, Sep 28, 2020 at 12:26 PM Simon Glass <sjg@chromium.org> wrote:
>
> 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@chromium.org>
> ---
>
>  include/linux/bitops.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff mbox series

Patch

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