* [PATCH 0/6] Fix warning for missing export.h in Hyper-V drivers
@ 2025-06-11 10:04 Naman Jain
2025-06-11 10:04 ` [PATCH 1/6] Drivers: hv: Fix warnings for missing export.h header inclusion Naman Jain
` (7 more replies)
0 siblings, 8 replies; 13+ messages in thread
From: Naman Jain @ 2025-06-11 10:04 UTC (permalink / raw)
To: K . Y . Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H . Peter Anvin, Vitaly Kuznetsov, Sean Christopherson,
Paolo Bonzini, Daniel Lezcano, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Lorenzo Pieralisi,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Bjorn Helgaas, Konstantin Taranov, Leon Romanovsky, Long Li,
Shiraz Saleem, Shradha Gupta, Maxim Levitsky, Peter Zijlstra,
Erni Sri Satya Vennela, Souradeep Chakrabarti
Cc: linux-hyperv, linux-kernel, kvm, netdev, linux-pci
When the kernel is compiled with W=1 option, a warning is reported
if a .c file exports a symbol but does not include export.h header
file. This warning was added in below patch, which merged recently:
commit a934a57a42f6 ("scripts/misc-check: check missing #include <linux/export.h> when W=1")
Fix this issue in Hyper-V drivers. This does not bring any
functional changes.
The one in drivers/hv/vmbus_drv.c is going to be fixed with
https://lore.kernel.org/all/20250611072704.83199-2-namjain@linux.microsoft.com/
so it is not included in this series.
Naman Jain (6):
Drivers: hv: Fix warnings for missing export.h header inclusion
x86/hyperv: Fix warnings for missing export.h header inclusion
KVM: x86: hyper-v: Fix warnings for missing export.h header inclusion
clocksource: hyper-v: Fix warnings for missing export.h header
inclusion
PCI: hv: Fix warnings for missing export.h header inclusion
net: mana: Fix warnings for missing export.h header inclusion
arch/x86/hyperv/hv_init.c | 1 +
arch/x86/hyperv/irqdomain.c | 1 +
arch/x86/hyperv/ivm.c | 1 +
arch/x86/hyperv/nested.c | 1 +
arch/x86/kvm/hyperv.c | 1 +
arch/x86/kvm/kvm_onhyperv.c | 1 +
drivers/clocksource/hyperv_timer.c | 1 +
drivers/hv/channel.c | 1 +
drivers/hv/channel_mgmt.c | 1 +
drivers/hv/hv_proc.c | 1 +
drivers/hv/mshv_common.c | 1 +
drivers/hv/mshv_root_hv_call.c | 1 +
drivers/hv/ring_buffer.c | 1 +
drivers/net/ethernet/microsoft/mana/gdma_main.c | 1 +
drivers/net/ethernet/microsoft/mana/mana_en.c | 1 +
drivers/pci/controller/pci-hyperv-intf.c | 1 +
16 files changed, 16 insertions(+)
base-commit: 475c850a7fdd0915b856173186d5922899d65686
--
2.34.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/6] Drivers: hv: Fix warnings for missing export.h header inclusion
2025-06-11 10:04 [PATCH 0/6] Fix warning for missing export.h in Hyper-V drivers Naman Jain
@ 2025-06-11 10:04 ` Naman Jain
2025-06-11 16:50 ` Nuno Das Neves
2025-06-11 10:04 ` [PATCH 2/6] x86/hyperv: " Naman Jain
` (6 subsequent siblings)
7 siblings, 1 reply; 13+ messages in thread
From: Naman Jain @ 2025-06-11 10:04 UTC (permalink / raw)
To: K . Y . Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H . Peter Anvin, Vitaly Kuznetsov, Sean Christopherson,
Paolo Bonzini, Daniel Lezcano, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Lorenzo Pieralisi,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Bjorn Helgaas, Konstantin Taranov, Leon Romanovsky, Long Li,
Shiraz Saleem, Shradha Gupta, Maxim Levitsky, Peter Zijlstra,
Erni Sri Satya Vennela, Souradeep Chakrabarti
Cc: linux-hyperv, linux-kernel, kvm, netdev, linux-pci
Fix below warning in Hyper-V drivers that comes when kernel is compiled
with W=1 option. Include export.h in driver files to fix it.
* warning: EXPORT_SYMBOL() is used, but #include <linux/export.h>
is missing
Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
---
drivers/hv/channel.c | 1 +
drivers/hv/channel_mgmt.c | 1 +
drivers/hv/hv_proc.c | 1 +
drivers/hv/mshv_common.c | 1 +
drivers/hv/mshv_root_hv_call.c | 1 +
drivers/hv/ring_buffer.c | 1 +
6 files changed, 6 insertions(+)
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 35f26fa1ffe7..7c7c66e0dc3f 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -18,6 +18,7 @@
#include <linux/uio.h>
#include <linux/interrupt.h>
#include <linux/set_memory.h>
+#include <linux/export.h>
#include <asm/page.h>
#include <asm/mshyperv.h>
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index 6e084c207414..65dd299e2944 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -20,6 +20,7 @@
#include <linux/delay.h>
#include <linux/cpu.h>
#include <linux/hyperv.h>
+#include <linux/export.h>
#include <asm/mshyperv.h>
#include <linux/sched/isolation.h>
diff --git a/drivers/hv/hv_proc.c b/drivers/hv/hv_proc.c
index 7d7ecb6f6137..fbb4eb3901bb 100644
--- a/drivers/hv/hv_proc.c
+++ b/drivers/hv/hv_proc.c
@@ -6,6 +6,7 @@
#include <linux/slab.h>
#include <linux/cpuhotplug.h>
#include <linux/minmax.h>
+#include <linux/export.h>
#include <asm/mshyperv.h>
/*
diff --git a/drivers/hv/mshv_common.c b/drivers/hv/mshv_common.c
index 2575e6d7a71f..6f227a8a5af7 100644
--- a/drivers/hv/mshv_common.c
+++ b/drivers/hv/mshv_common.c
@@ -13,6 +13,7 @@
#include <linux/mm.h>
#include <asm/mshyperv.h>
#include <linux/resume_user_mode.h>
+#include <linux/export.h>
#include "mshv.h"
diff --git a/drivers/hv/mshv_root_hv_call.c b/drivers/hv/mshv_root_hv_call.c
index a222a16107f6..c9c274f29c3c 100644
--- a/drivers/hv/mshv_root_hv_call.c
+++ b/drivers/hv/mshv_root_hv_call.c
@@ -9,6 +9,7 @@
#include <linux/kernel.h>
#include <linux/mm.h>
+#include <linux/export.h>
#include <asm/mshyperv.h>
#include "mshv_root.h"
diff --git a/drivers/hv/ring_buffer.c b/drivers/hv/ring_buffer.c
index 3c9b02471760..23ce1fb70de1 100644
--- a/drivers/hv/ring_buffer.c
+++ b/drivers/hv/ring_buffer.c
@@ -18,6 +18,7 @@
#include <linux/slab.h>
#include <linux/prefetch.h>
#include <linux/io.h>
+#include <linux/export.h>
#include <asm/mshyperv.h>
#include "hyperv_vmbus.h"
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/6] x86/hyperv: Fix warnings for missing export.h header inclusion
2025-06-11 10:04 [PATCH 0/6] Fix warning for missing export.h in Hyper-V drivers Naman Jain
2025-06-11 10:04 ` [PATCH 1/6] Drivers: hv: Fix warnings for missing export.h header inclusion Naman Jain
@ 2025-06-11 10:04 ` Naman Jain
2025-06-11 10:04 ` [PATCH 3/6] KVM: x86: hyper-v: " Naman Jain
` (5 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Naman Jain @ 2025-06-11 10:04 UTC (permalink / raw)
To: K . Y . Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H . Peter Anvin, Vitaly Kuznetsov, Sean Christopherson,
Paolo Bonzini, Daniel Lezcano, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Lorenzo Pieralisi,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Bjorn Helgaas, Konstantin Taranov, Leon Romanovsky, Long Li,
Shiraz Saleem, Shradha Gupta, Maxim Levitsky, Peter Zijlstra,
Erni Sri Satya Vennela, Souradeep Chakrabarti
Cc: linux-hyperv, linux-kernel, kvm, netdev, linux-pci
Fix below warning in Hyper-V drivers that comes when kernel is compiled
with W=1 option. Include export.h in driver files to fix it.
* warning: EXPORT_SYMBOL() is used, but #include <linux/export.h>
is missing
Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
---
arch/x86/hyperv/hv_init.c | 1 +
arch/x86/hyperv/irqdomain.c | 1 +
arch/x86/hyperv/ivm.c | 1 +
arch/x86/hyperv/nested.c | 1 +
4 files changed, 4 insertions(+)
diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c
index 3d1d3547095a..afdbda2dd7b7 100644
--- a/arch/x86/hyperv/hv_init.c
+++ b/arch/x86/hyperv/hv_init.c
@@ -34,6 +34,7 @@
#include <linux/syscore_ops.h>
#include <clocksource/hyperv_timer.h>
#include <linux/highmem.h>
+#include <linux/export.h>
void *hv_hypercall_pg;
EXPORT_SYMBOL_GPL(hv_hypercall_pg);
diff --git a/arch/x86/hyperv/irqdomain.c b/arch/x86/hyperv/irqdomain.c
index 31f0d29cbc5e..f7627bc8fe49 100644
--- a/arch/x86/hyperv/irqdomain.c
+++ b/arch/x86/hyperv/irqdomain.c
@@ -10,6 +10,7 @@
#include <linux/pci.h>
#include <linux/irq.h>
+#include <linux/export.h>
#include <asm/mshyperv.h>
static int hv_map_interrupt(union hv_device_id device_id, bool level,
diff --git a/arch/x86/hyperv/ivm.c b/arch/x86/hyperv/ivm.c
index e93a2f488ff7..ade6c665c97e 100644
--- a/arch/x86/hyperv/ivm.c
+++ b/arch/x86/hyperv/ivm.c
@@ -10,6 +10,7 @@
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/cpu.h>
+#include <linux/export.h>
#include <asm/svm.h>
#include <asm/sev.h>
#include <asm/io.h>
diff --git a/arch/x86/hyperv/nested.c b/arch/x86/hyperv/nested.c
index 1083dc8646f9..8ccbb7c4fc27 100644
--- a/arch/x86/hyperv/nested.c
+++ b/arch/x86/hyperv/nested.c
@@ -11,6 +11,7 @@
#include <linux/types.h>
+#include <linux/export.h>
#include <hyperv/hvhdk.h>
#include <asm/mshyperv.h>
#include <asm/tlbflush.h>
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/6] KVM: x86: hyper-v: Fix warnings for missing export.h header inclusion
2025-06-11 10:04 [PATCH 0/6] Fix warning for missing export.h in Hyper-V drivers Naman Jain
2025-06-11 10:04 ` [PATCH 1/6] Drivers: hv: Fix warnings for missing export.h header inclusion Naman Jain
2025-06-11 10:04 ` [PATCH 2/6] x86/hyperv: " Naman Jain
@ 2025-06-11 10:04 ` Naman Jain
2025-06-11 12:58 ` Sean Christopherson
2025-06-11 10:04 ` [PATCH 4/6] clocksource: " Naman Jain
` (4 subsequent siblings)
7 siblings, 1 reply; 13+ messages in thread
From: Naman Jain @ 2025-06-11 10:04 UTC (permalink / raw)
To: K . Y . Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H . Peter Anvin, Vitaly Kuznetsov, Sean Christopherson,
Paolo Bonzini, Daniel Lezcano, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Lorenzo Pieralisi,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Bjorn Helgaas, Konstantin Taranov, Leon Romanovsky, Long Li,
Shiraz Saleem, Shradha Gupta, Maxim Levitsky, Peter Zijlstra,
Erni Sri Satya Vennela, Souradeep Chakrabarti
Cc: linux-hyperv, linux-kernel, kvm, netdev, linux-pci
Fix below warning in Hyper-V drivers that comes when kernel is compiled
with W=1 option. Include export.h in driver files to fix it.
* warning: EXPORT_SYMBOL() is used, but #include <linux/export.h>
is missing
Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
---
arch/x86/kvm/hyperv.c | 1 +
arch/x86/kvm/kvm_onhyperv.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index 24f0318c50d7..09f9de4555dd 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hyperv.c
@@ -33,6 +33,7 @@
#include <linux/sched/cputime.h>
#include <linux/spinlock.h>
#include <linux/eventfd.h>
+#include <linux/export.h>
#include <asm/apicdef.h>
#include <asm/mshyperv.h>
diff --git a/arch/x86/kvm/kvm_onhyperv.c b/arch/x86/kvm/kvm_onhyperv.c
index ded0bd688c65..ba45f8364187 100644
--- a/arch/x86/kvm/kvm_onhyperv.c
+++ b/arch/x86/kvm/kvm_onhyperv.c
@@ -5,6 +5,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kvm_host.h>
+#include <linux/export.h>
#include <asm/mshyperv.h>
#include "hyperv.h"
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/6] clocksource: hyper-v: Fix warnings for missing export.h header inclusion
2025-06-11 10:04 [PATCH 0/6] Fix warning for missing export.h in Hyper-V drivers Naman Jain
` (2 preceding siblings ...)
2025-06-11 10:04 ` [PATCH 3/6] KVM: x86: hyper-v: " Naman Jain
@ 2025-06-11 10:04 ` Naman Jain
2025-07-15 11:27 ` Daniel Lezcano
2025-06-11 10:04 ` [PATCH 5/6] PCI: hv: " Naman Jain
` (3 subsequent siblings)
7 siblings, 1 reply; 13+ messages in thread
From: Naman Jain @ 2025-06-11 10:04 UTC (permalink / raw)
To: K . Y . Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H . Peter Anvin, Vitaly Kuznetsov, Sean Christopherson,
Paolo Bonzini, Daniel Lezcano, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Lorenzo Pieralisi,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Bjorn Helgaas, Konstantin Taranov, Leon Romanovsky, Long Li,
Shiraz Saleem, Shradha Gupta, Maxim Levitsky, Peter Zijlstra,
Erni Sri Satya Vennela, Souradeep Chakrabarti
Cc: linux-hyperv, linux-kernel, kvm, netdev, linux-pci
Fix below warning in Hyper-V clocksource driver that comes when kernel
is compiled with W=1 option. Include export.h in driver files to fix it.
* warning: EXPORT_SYMBOL() is used, but #include <linux/export.h>
is missing
Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
---
drivers/clocksource/hyperv_timer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clocksource/hyperv_timer.c b/drivers/clocksource/hyperv_timer.c
index 09549451dd51..2edc13ca184e 100644
--- a/drivers/clocksource/hyperv_timer.c
+++ b/drivers/clocksource/hyperv_timer.c
@@ -22,6 +22,7 @@
#include <linux/irq.h>
#include <linux/acpi.h>
#include <linux/hyperv.h>
+#include <linux/export.h>
#include <clocksource/hyperv_timer.h>
#include <hyperv/hvhdk.h>
#include <asm/mshyperv.h>
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 5/6] PCI: hv: Fix warnings for missing export.h header inclusion
2025-06-11 10:04 [PATCH 0/6] Fix warning for missing export.h in Hyper-V drivers Naman Jain
` (3 preceding siblings ...)
2025-06-11 10:04 ` [PATCH 4/6] clocksource: " Naman Jain
@ 2025-06-11 10:04 ` Naman Jain
2025-06-11 10:04 ` [PATCH 6/6] net: mana: " Naman Jain
` (2 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Naman Jain @ 2025-06-11 10:04 UTC (permalink / raw)
To: K . Y . Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H . Peter Anvin, Vitaly Kuznetsov, Sean Christopherson,
Paolo Bonzini, Daniel Lezcano, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Lorenzo Pieralisi,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Bjorn Helgaas, Konstantin Taranov, Leon Romanovsky, Long Li,
Shiraz Saleem, Shradha Gupta, Maxim Levitsky, Peter Zijlstra,
Erni Sri Satya Vennela, Souradeep Chakrabarti
Cc: linux-hyperv, linux-kernel, kvm, netdev, linux-pci
Fix below warning in Hyper-V PCI driver that comes when kernel is
compiled with W=1 option. Include export.h in driver files to fix it.
* warning: EXPORT_SYMBOL() is used, but #include <linux/export.h>
is missing
Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
---
drivers/pci/controller/pci-hyperv-intf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/controller/pci-hyperv-intf.c b/drivers/pci/controller/pci-hyperv-intf.c
index cc96be450360..28b3e93d31c0 100644
--- a/drivers/pci/controller/pci-hyperv-intf.c
+++ b/drivers/pci/controller/pci-hyperv-intf.c
@@ -14,6 +14,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/hyperv.h>
+#include <linux/export.h>
struct hyperv_pci_block_ops hvpci_block_ops;
EXPORT_SYMBOL_GPL(hvpci_block_ops);
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 6/6] net: mana: Fix warnings for missing export.h header inclusion
2025-06-11 10:04 [PATCH 0/6] Fix warning for missing export.h in Hyper-V drivers Naman Jain
` (4 preceding siblings ...)
2025-06-11 10:04 ` [PATCH 5/6] PCI: hv: " Naman Jain
@ 2025-06-11 10:04 ` Naman Jain
2025-06-11 11:12 ` [PATCH 0/6] Fix warning for missing export.h in Hyper-V drivers Saurabh Singh Sengar
2025-07-09 23:46 ` Wei Liu
7 siblings, 0 replies; 13+ messages in thread
From: Naman Jain @ 2025-06-11 10:04 UTC (permalink / raw)
To: K . Y . Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H . Peter Anvin, Vitaly Kuznetsov, Sean Christopherson,
Paolo Bonzini, Daniel Lezcano, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Lorenzo Pieralisi,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Bjorn Helgaas, Konstantin Taranov, Leon Romanovsky, Long Li,
Shiraz Saleem, Shradha Gupta, Maxim Levitsky, Peter Zijlstra,
Erni Sri Satya Vennela, Souradeep Chakrabarti
Cc: linux-hyperv, linux-kernel, kvm, netdev, linux-pci
Fix below warning in Hyper-V's MANA drivers that comes when kernel is
compiled with W=1 option. Include export.h in driver files to fix it.
* warning: EXPORT_SYMBOL() is used, but #include <linux/export.h>
is missing
Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
---
drivers/net/ethernet/microsoft/mana/gdma_main.c | 1 +
drivers/net/ethernet/microsoft/mana/mana_en.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c
index 3504507477c6..019e32b60043 100644
--- a/drivers/net/ethernet/microsoft/mana/gdma_main.c
+++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c
@@ -6,6 +6,7 @@
#include <linux/pci.h>
#include <linux/utsname.h>
#include <linux/version.h>
+#include <linux/export.h>
#include <net/mana/mana.h>
diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c
index ccd2885c939e..faad1cb880f8 100644
--- a/drivers/net/ethernet/microsoft/mana/mana_en.c
+++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
@@ -10,6 +10,7 @@
#include <linux/filter.h>
#include <linux/mm.h>
#include <linux/pci.h>
+#include <linux/export.h>
#include <net/checksum.h>
#include <net/ip6_checksum.h>
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 0/6] Fix warning for missing export.h in Hyper-V drivers
2025-06-11 10:04 [PATCH 0/6] Fix warning for missing export.h in Hyper-V drivers Naman Jain
` (5 preceding siblings ...)
2025-06-11 10:04 ` [PATCH 6/6] net: mana: " Naman Jain
@ 2025-06-11 11:12 ` Saurabh Singh Sengar
2025-07-09 23:46 ` Wei Liu
7 siblings, 0 replies; 13+ messages in thread
From: Saurabh Singh Sengar @ 2025-06-11 11:12 UTC (permalink / raw)
To: Naman Jain
Cc: K . Y . Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H . Peter Anvin, Vitaly Kuznetsov, Sean Christopherson,
Paolo Bonzini, Daniel Lezcano, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Lorenzo Pieralisi,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Bjorn Helgaas, Konstantin Taranov, Leon Romanovsky, Long Li,
Shiraz Saleem, Shradha Gupta, Maxim Levitsky, Peter Zijlstra,
Erni Sri Satya Vennela, Souradeep Chakrabarti, linux-hyperv,
linux-kernel, kvm, netdev, linux-pci
On Wed, Jun 11, 2025 at 03:34:53PM +0530, Naman Jain wrote:
> When the kernel is compiled with W=1 option, a warning is reported
> if a .c file exports a symbol but does not include export.h header
> file. This warning was added in below patch, which merged recently:
> commit a934a57a42f6 ("scripts/misc-check: check missing #include <linux/export.h> when W=1")
>
> Fix this issue in Hyper-V drivers. This does not bring any
> functional changes.
>
> The one in drivers/hv/vmbus_drv.c is going to be fixed with
> https://lore.kernel.org/all/20250611072704.83199-2-namjain@linux.microsoft.com/
> so it is not included in this series.
>
> Naman Jain (6):
> Drivers: hv: Fix warnings for missing export.h header inclusion
> x86/hyperv: Fix warnings for missing export.h header inclusion
> KVM: x86: hyper-v: Fix warnings for missing export.h header inclusion
> clocksource: hyper-v: Fix warnings for missing export.h header
> inclusion
> PCI: hv: Fix warnings for missing export.h header inclusion
> net: mana: Fix warnings for missing export.h header inclusion
>
> arch/x86/hyperv/hv_init.c | 1 +
> arch/x86/hyperv/irqdomain.c | 1 +
> arch/x86/hyperv/ivm.c | 1 +
> arch/x86/hyperv/nested.c | 1 +
> arch/x86/kvm/hyperv.c | 1 +
> arch/x86/kvm/kvm_onhyperv.c | 1 +
> drivers/clocksource/hyperv_timer.c | 1 +
> drivers/hv/channel.c | 1 +
> drivers/hv/channel_mgmt.c | 1 +
> drivers/hv/hv_proc.c | 1 +
> drivers/hv/mshv_common.c | 1 +
> drivers/hv/mshv_root_hv_call.c | 1 +
> drivers/hv/ring_buffer.c | 1 +
> drivers/net/ethernet/microsoft/mana/gdma_main.c | 1 +
> drivers/net/ethernet/microsoft/mana/mana_en.c | 1 +
> drivers/pci/controller/pci-hyperv-intf.c | 1 +
> 16 files changed, 16 insertions(+)
>
>
> base-commit: 475c850a7fdd0915b856173186d5922899d65686
> --
> 2.34.1
>
For the series,
Reviewed-by: Saurabh Sengar <ssengar@linux.microsoft.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/6] KVM: x86: hyper-v: Fix warnings for missing export.h header inclusion
2025-06-11 10:04 ` [PATCH 3/6] KVM: x86: hyper-v: " Naman Jain
@ 2025-06-11 12:58 ` Sean Christopherson
2025-06-12 4:04 ` Naman Jain
0 siblings, 1 reply; 13+ messages in thread
From: Sean Christopherson @ 2025-06-11 12:58 UTC (permalink / raw)
To: Naman Jain
Cc: K . Y . Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H . Peter Anvin, Vitaly Kuznetsov, Paolo Bonzini, Daniel Lezcano,
Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas,
Konstantin Taranov, Leon Romanovsky, Long Li, Shiraz Saleem,
Shradha Gupta, Maxim Levitsky, Peter Zijlstra,
Erni Sri Satya Vennela, Souradeep Chakrabarti, linux-hyperv,
linux-kernel, kvm, netdev, linux-pci
On Wed, Jun 11, 2025, Naman Jain wrote:
> Fix below warning in Hyper-V drivers
KVM is quite obviously not a Hyper-V driver.
> that comes when kernel is compiled with W=1 option. Include export.h in
> driver files to fix it. * warning: EXPORT_SYMBOL() is used, but #include
> <linux/export.h> is missing
NAK. I agree with Heiko[*], this is absurd. And if the W=1 change isn't reverted
for some reason, I'd rather "fix" all of KVM in one shot, not update random files
just because of their name.
Sorry.
[*] https://lore.kernel.org/all/20250611075533.8102A57-hca@linux.ibm.com
> Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
> ---
> arch/x86/kvm/hyperv.c | 1 +
> arch/x86/kvm/kvm_onhyperv.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
> index 24f0318c50d7..09f9de4555dd 100644
> --- a/arch/x86/kvm/hyperv.c
> +++ b/arch/x86/kvm/hyperv.c
> @@ -33,6 +33,7 @@
> #include <linux/sched/cputime.h>
> #include <linux/spinlock.h>
> #include <linux/eventfd.h>
> +#include <linux/export.h>
>
> #include <asm/apicdef.h>
> #include <asm/mshyperv.h>
> diff --git a/arch/x86/kvm/kvm_onhyperv.c b/arch/x86/kvm/kvm_onhyperv.c
> index ded0bd688c65..ba45f8364187 100644
> --- a/arch/x86/kvm/kvm_onhyperv.c
> +++ b/arch/x86/kvm/kvm_onhyperv.c
> @@ -5,6 +5,7 @@
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>
> #include <linux/kvm_host.h>
> +#include <linux/export.h>
> #include <asm/mshyperv.h>
>
> #include "hyperv.h"
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/6] Drivers: hv: Fix warnings for missing export.h header inclusion
2025-06-11 10:04 ` [PATCH 1/6] Drivers: hv: Fix warnings for missing export.h header inclusion Naman Jain
@ 2025-06-11 16:50 ` Nuno Das Neves
0 siblings, 0 replies; 13+ messages in thread
From: Nuno Das Neves @ 2025-06-11 16:50 UTC (permalink / raw)
To: Naman Jain, K . Y . Srinivasan, Haiyang Zhang, Wei Liu,
Dexuan Cui, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, x86, H . Peter Anvin, Vitaly Kuznetsov,
Sean Christopherson, Paolo Bonzini, Daniel Lezcano, Andrew Lunn,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas,
Konstantin Taranov, Leon Romanovsky, Long Li, Shiraz Saleem,
Shradha Gupta, Maxim Levitsky, Peter Zijlstra,
Erni Sri Satya Vennela, Souradeep Chakrabarti
Cc: linux-hyperv, linux-kernel, kvm, netdev, linux-pci
On 6/11/2025 3:04 AM, Naman Jain wrote:
> Fix below warning in Hyper-V drivers that comes when kernel is compiled
> with W=1 option. Include export.h in driver files to fix it.
> * warning: EXPORT_SYMBOL() is used, but #include <linux/export.h>
> is missing
>
> Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
> ---
> drivers/hv/channel.c | 1 +
> drivers/hv/channel_mgmt.c | 1 +
> drivers/hv/hv_proc.c | 1 +
> drivers/hv/mshv_common.c | 1 +
> drivers/hv/mshv_root_hv_call.c | 1 +
> drivers/hv/ring_buffer.c | 1 +
> 6 files changed, 6 insertions(+)
>
> diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
> index 35f26fa1ffe7..7c7c66e0dc3f 100644
> --- a/drivers/hv/channel.c
> +++ b/drivers/hv/channel.c
> @@ -18,6 +18,7 @@
> #include <linux/uio.h>
> #include <linux/interrupt.h>
> #include <linux/set_memory.h>
> +#include <linux/export.h>
> #include <asm/page.h>
> #include <asm/mshyperv.h>
>
> diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
> index 6e084c207414..65dd299e2944 100644
> --- a/drivers/hv/channel_mgmt.c
> +++ b/drivers/hv/channel_mgmt.c
> @@ -20,6 +20,7 @@
> #include <linux/delay.h>
> #include <linux/cpu.h>
> #include <linux/hyperv.h>
> +#include <linux/export.h>
> #include <asm/mshyperv.h>
> #include <linux/sched/isolation.h>
>
> diff --git a/drivers/hv/hv_proc.c b/drivers/hv/hv_proc.c
> index 7d7ecb6f6137..fbb4eb3901bb 100644
> --- a/drivers/hv/hv_proc.c
> +++ b/drivers/hv/hv_proc.c
> @@ -6,6 +6,7 @@
> #include <linux/slab.h>
> #include <linux/cpuhotplug.h>
> #include <linux/minmax.h>
> +#include <linux/export.h>
> #include <asm/mshyperv.h>
>
> /*
> diff --git a/drivers/hv/mshv_common.c b/drivers/hv/mshv_common.c
> index 2575e6d7a71f..6f227a8a5af7 100644
> --- a/drivers/hv/mshv_common.c
> +++ b/drivers/hv/mshv_common.c
> @@ -13,6 +13,7 @@
> #include <linux/mm.h>
> #include <asm/mshyperv.h>
> #include <linux/resume_user_mode.h>
> +#include <linux/export.h>
>
> #include "mshv.h"
>
> diff --git a/drivers/hv/mshv_root_hv_call.c b/drivers/hv/mshv_root_hv_call.c
> index a222a16107f6..c9c274f29c3c 100644
> --- a/drivers/hv/mshv_root_hv_call.c
> +++ b/drivers/hv/mshv_root_hv_call.c
> @@ -9,6 +9,7 @@
>
> #include <linux/kernel.h>
> #include <linux/mm.h>
> +#include <linux/export.h>
> #include <asm/mshyperv.h>
>
> #include "mshv_root.h"
> diff --git a/drivers/hv/ring_buffer.c b/drivers/hv/ring_buffer.c
> index 3c9b02471760..23ce1fb70de1 100644
> --- a/drivers/hv/ring_buffer.c
> +++ b/drivers/hv/ring_buffer.c
> @@ -18,6 +18,7 @@
> #include <linux/slab.h>
> #include <linux/prefetch.h>
> #include <linux/io.h>
> +#include <linux/export.h>
> #include <asm/mshyperv.h>
>
> #include "hyperv_vmbus.h"
Reviewed-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/6] KVM: x86: hyper-v: Fix warnings for missing export.h header inclusion
2025-06-11 12:58 ` Sean Christopherson
@ 2025-06-12 4:04 ` Naman Jain
0 siblings, 0 replies; 13+ messages in thread
From: Naman Jain @ 2025-06-12 4:04 UTC (permalink / raw)
To: Sean Christopherson
Cc: K . Y . Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H . Peter Anvin, Vitaly Kuznetsov, Paolo Bonzini, Daniel Lezcano,
Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas,
Konstantin Taranov, Leon Romanovsky, Long Li, Shiraz Saleem,
Shradha Gupta, Maxim Levitsky, Peter Zijlstra,
Erni Sri Satya Vennela, Souradeep Chakrabarti, linux-hyperv,
linux-kernel, kvm, netdev, linux-pci
On 6/11/2025 6:28 PM, Sean Christopherson wrote:
> On Wed, Jun 11, 2025, Naman Jain wrote:
>> Fix below warning in Hyper-V drivers
>
> KVM is quite obviously not a Hyper-V driver.
>
>> that comes when kernel is compiled with W=1 option. Include export.h in
>> driver files to fix it. * warning: EXPORT_SYMBOL() is used, but #include
>> <linux/export.h> is missing
>
> NAK. I agree with Heiko[*], this is absurd. And if the W=1 change isn't reverted
> for some reason, I'd rather "fix" all of KVM in one shot, not update random files
> just because of their name.
>
> Sorry.
>
> [*] https://lore.kernel.org/all/20250611075533.8102A57-hca@linux.ibm.com
>
Sure, thanks for reviewing.
Regards,
Naman
>> Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
>> ---
>> arch/x86/kvm/hyperv.c | 1 +
>> arch/x86/kvm/kvm_onhyperv.c | 1 +
>> 2 files changed, 2 insertions(+)
>>
>> diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
>> index 24f0318c50d7..09f9de4555dd 100644
>> --- a/arch/x86/kvm/hyperv.c
>> +++ b/arch/x86/kvm/hyperv.c
>> @@ -33,6 +33,7 @@
>> #include <linux/sched/cputime.h>
>> #include <linux/spinlock.h>
>> #include <linux/eventfd.h>
>> +#include <linux/export.h>
>>
>> #include <asm/apicdef.h>
>> #include <asm/mshyperv.h>
>> diff --git a/arch/x86/kvm/kvm_onhyperv.c b/arch/x86/kvm/kvm_onhyperv.c
>> index ded0bd688c65..ba45f8364187 100644
>> --- a/arch/x86/kvm/kvm_onhyperv.c
>> +++ b/arch/x86/kvm/kvm_onhyperv.c
>> @@ -5,6 +5,7 @@
>> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>>
>> #include <linux/kvm_host.h>
>> +#include <linux/export.h>
>> #include <asm/mshyperv.h>
>>
>> #include "hyperv.h"
>> --
>> 2.34.1
>>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/6] Fix warning for missing export.h in Hyper-V drivers
2025-06-11 10:04 [PATCH 0/6] Fix warning for missing export.h in Hyper-V drivers Naman Jain
` (6 preceding siblings ...)
2025-06-11 11:12 ` [PATCH 0/6] Fix warning for missing export.h in Hyper-V drivers Saurabh Singh Sengar
@ 2025-07-09 23:46 ` Wei Liu
7 siblings, 0 replies; 13+ messages in thread
From: Wei Liu @ 2025-07-09 23:46 UTC (permalink / raw)
To: Naman Jain
Cc: K . Y . Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H . Peter Anvin, Vitaly Kuznetsov, Sean Christopherson,
Paolo Bonzini, Daniel Lezcano, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Lorenzo Pieralisi,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Bjorn Helgaas, Konstantin Taranov, Leon Romanovsky, Long Li,
Shiraz Saleem, Shradha Gupta, Maxim Levitsky, Peter Zijlstra,
Erni Sri Satya Vennela, Souradeep Chakrabarti, linux-hyperv,
linux-kernel, kvm, netdev, linux-pci
On Wed, Jun 11, 2025 at 03:34:53PM +0530, Naman Jain wrote:
> When the kernel is compiled with W=1 option, a warning is reported
> if a .c file exports a symbol but does not include export.h header
> file. This warning was added in below patch, which merged recently:
> commit a934a57a42f6 ("scripts/misc-check: check missing #include <linux/export.h> when W=1")
>
> Fix this issue in Hyper-V drivers. This does not bring any
> functional changes.
>
> The one in drivers/hv/vmbus_drv.c is going to be fixed with
> https://lore.kernel.org/all/20250611072704.83199-2-namjain@linux.microsoft.com/
> so it is not included in this series.
>
> Naman Jain (6):
> Drivers: hv: Fix warnings for missing export.h header inclusion
> x86/hyperv: Fix warnings for missing export.h header inclusion
> KVM: x86: hyper-v: Fix warnings for missing export.h header inclusion
> clocksource: hyper-v: Fix warnings for missing export.h header
> inclusion
> PCI: hv: Fix warnings for missing export.h header inclusion
> net: mana: Fix warnings for missing export.h header inclusion
I applied all patches expect the KVM one to hyperv-fixes. Thanks.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 4/6] clocksource: hyper-v: Fix warnings for missing export.h header inclusion
2025-06-11 10:04 ` [PATCH 4/6] clocksource: " Naman Jain
@ 2025-07-15 11:27 ` Daniel Lezcano
0 siblings, 0 replies; 13+ messages in thread
From: Daniel Lezcano @ 2025-07-15 11:27 UTC (permalink / raw)
To: Naman Jain
Cc: K . Y . Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H . Peter Anvin, Vitaly Kuznetsov, Sean Christopherson,
Paolo Bonzini, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Lorenzo Pieralisi,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Bjorn Helgaas, Konstantin Taranov, Leon Romanovsky, Long Li,
Shiraz Saleem, Shradha Gupta, Maxim Levitsky, Peter Zijlstra,
Erni Sri Satya Vennela, Souradeep Chakrabarti, linux-hyperv,
linux-kernel, kvm, netdev, linux-pci
On Wed, Jun 11, 2025 at 03:34:57PM +0530, Naman Jain wrote:
> Fix below warning in Hyper-V clocksource driver that comes when kernel
> is compiled with W=1 option. Include export.h in driver files to fix it.
> * warning: EXPORT_SYMBOL() is used, but #include <linux/export.h>
> is missing
>
> Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
> ---
> drivers/clocksource/hyperv_timer.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/clocksource/hyperv_timer.c b/drivers/clocksource/hyperv_timer.c
> index 09549451dd51..2edc13ca184e 100644
> --- a/drivers/clocksource/hyperv_timer.c
> +++ b/drivers/clocksource/hyperv_timer.c
> @@ -22,6 +22,7 @@
> #include <linux/irq.h>
> #include <linux/acpi.h>
> #include <linux/hyperv.h>
> +#include <linux/export.h>
> #include <clocksource/hyperv_timer.h>
> #include <hyperv/hvhdk.h>
> #include <asm/mshyperv.h>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> --
> 2.34.1
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2025-07-15 11:27 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-11 10:04 [PATCH 0/6] Fix warning for missing export.h in Hyper-V drivers Naman Jain
2025-06-11 10:04 ` [PATCH 1/6] Drivers: hv: Fix warnings for missing export.h header inclusion Naman Jain
2025-06-11 16:50 ` Nuno Das Neves
2025-06-11 10:04 ` [PATCH 2/6] x86/hyperv: " Naman Jain
2025-06-11 10:04 ` [PATCH 3/6] KVM: x86: hyper-v: " Naman Jain
2025-06-11 12:58 ` Sean Christopherson
2025-06-12 4:04 ` Naman Jain
2025-06-11 10:04 ` [PATCH 4/6] clocksource: " Naman Jain
2025-07-15 11:27 ` Daniel Lezcano
2025-06-11 10:04 ` [PATCH 5/6] PCI: hv: " Naman Jain
2025-06-11 10:04 ` [PATCH 6/6] net: mana: " Naman Jain
2025-06-11 11:12 ` [PATCH 0/6] Fix warning for missing export.h in Hyper-V drivers Saurabh Singh Sengar
2025-07-09 23:46 ` Wei Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).