Skip to contentSkip to conversation

hypverv/vmbus: include linux/bitops.h

PATCH Applied Arnd Bergmann 2 participants 2 messages Oct 18, 2021 – Oct 19, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hypverv/vmbus: include linux/bitops.h

From: Arnd Bergmann <[email protected]>

On arm64 randconfig builds, hyperv sometimes fails with this error:

In file included from drivers/hv/hv_trace.c:3:
In file included from drivers/hv/hyperv_vmbus.h:16:
In file included from arch/arm64/include/asm/sync_bitops.h:5:
arch/arm64/include/asm/bitops.h:11:2: error: only <linux/bitops.h> can be included directly
In file included from include/asm-generic/bitops/hweight.h:5:
include/asm-generic/bitops/arch_hweight.h:9:9: error: implicit declaration of function '__sw_hweight32' [-Werror,-Wimplicit-function-declaration] include/asm-generic/bitops/atomic.h:17:7: error: implicit declaration of function 'BIT_WORD' [-Werror,-Wimplicit-function-declaration]

Include the correct header first.

---
Not sure what started this, I first saw it on linux-next-20211015

---
 drivers/hv/hyperv_vmbus.h | 1 +
 1 file changed, 1 insertion(+)
drivers/hv/hyperv_vmbus.h +1 -0
index 42f3d9d123a1..d030577ad6a2 100644
@@ -13,6 +13,7 @@
 #define _HYPERV_VMBUS_H
 
 #include <linux/list.h>
+#include <linux/bitops.h>
 #include <asm/sync_bitops.h>
 #include <asm/hyperv-tlfs.h>
 #include <linux/atomic.h>
Signature · 1 line
2.29.2
maintainer Applied
#1 lore raw
Quoted 13 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

On arm64 randconfig builds, hyperv sometimes fails with this error:

In file included from drivers/hv/hv_trace.c:3:
In file included from drivers/hv/hyperv_vmbus.h:16:
In file included from arch/arm64/include/asm/sync_bitops.h:5:
arch/arm64/include/asm/bitops.h:11:2: error: only <linux/bitops.h> can be included directly
In file included from include/asm-generic/bitops/hweight.h:5:
include/asm-generic/bitops/arch_hweight.h:9:9: error: implicit declaration of function '__sw_hweight32' [-Werror,-Wimplicit-function-declaration] include/asm-generic/bitops/atomic.h:17:7: error: implicit declaration of function 'BIT_WORD' [-Werror,-Wimplicit-function-declaration]

Quoted 3 lines

Include the correct header first.

Applied to hyperv-fixes. Thanks.

Quoted 21 lines

---
Not sure what started this, I first saw it on linux-next-20211015

---
 drivers/hv/hyperv_vmbus.h | 1 +
 1 file changed, 1 insertion(+)
drivers/hv/hyperv_vmbus.h +1 -0
index 42f3d9d123a1..d030577ad6a2 100644
@@ -13,6 +13,7 @@
 #define _HYPERV_VMBUS_H
 
 #include <linux/list.h>
+#include <linux/bitops.h>
 #include <asm/sync_bitops.h>
 #include <asm/hyperv-tlfs.h>
 #include <linux/atomic.h>
Signature · 1 line
2.29.2