Fix warning for missing export.h in Hyper-V drivers
Subsystems (11)
cover Fix warning for missing export.h in Hyper-V drivers
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/[email protected]/
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
Signature · 1 line
2.34.1
PATCH 1/6 Drivers: hv: Fix warnings for missing export.h header inclusion
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
--- 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(+)
drivers/hv/channel.c +1 -0
@@ -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>
drivers/hv/channel_mgmt.c +1 -0
@@ -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>
drivers/hv/hv_proc.c +1 -0
@@ -6,6 +6,7 @@#include <linux/slab.h> #include <linux/cpuhotplug.h> #include <linux/minmax.h> +#include <linux/export.h> #include <asm/mshyperv.h> /*
drivers/hv/mshv_common.c +1 -0
@@ -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"
drivers/hv/mshv_root_hv_call.c +1 -0
@@ -9,6 +9,7 @@#include <linux/kernel.h> #include <linux/mm.h> +#include <linux/export.h> #include <asm/mshyperv.h> #include "mshv_root.h"
drivers/hv/ring_buffer.c +1 -0
@@ -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"
Signature · 1 line
2.34.1
Re: [PATCH 1/6] Drivers: hv: Fix warnings for missing export.h header inclusion
Quoted 80 lines · Naman Jain
Fix below warning in Hyper-V drivers that comes when kernel is compiled with W=1 option. Include
export.hin driver files to fix it.
* warning:EXPORT_SYMBOL()is used, but #include <linux/export.h> is missingSigned-off-by Naman Jain <[email protected]>--- 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(+)drivers/hv/channel.c +1
-0@@ -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> drivers/hv/channel_mgmt.c +1
-0@@ -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> drivers/hv/hv_proc.c +1
-0@@ -6,6 +6,7 @@#include <linux/slab.h> #include <linux/cpuhotplug.h> #include <linux/minmax.h> +#include <linux/export.h> #include <asm/mshyperv.h> /* drivers/hv/mshv_common.c +1
-0@@ -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" drivers/hv/mshv_root_hv_call.c +1
-0@@ -9,6 +9,7 @@#include <linux/kernel.h> #include <linux/mm.h> +#include <linux/export.h> #include <asm/mshyperv.h> #include "mshv_root.h" drivers/hv/ring_buffer.c +0
-0
drivers/hv/ring_buffer.c line 24
Quoted 7 lines
drivers/hv/ring_buffer.c +1
-0@@ -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"
PATCH 2/6 x86/hyperv: Fix warnings for missing export.h header inclusion
In reply to Naman JainFix 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
--- 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(+)
arch/x86/hyperv/hv_init.c +1 -0
@@ -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);
arch/x86/hyperv/irqdomain.c +1 -0
@@ -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,
arch/x86/hyperv/ivm.c +1 -0
@@ -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>
arch/x86/hyperv/nested.c +1 -0
@@ -11,6 +11,7 @@#include <linux/types.h> +#include <linux/export.h> #include <hyperv/hvhdk.h> #include <asm/mshyperv.h> #include <asm/tlbflush.h>
Signature · 1 line
2.34.1
PATCH 3/6 KVM: x86: hyper-v: Fix warnings for missing export.h header inclusion
In reply to Naman JainFix 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
--- arch/x86/kvm/hyperv.c | 1 + arch/x86/kvm/kvm_onhyperv.c | 1 + 2 files changed, 2 insertions(+)
arch/x86/kvm/hyperv.c +1 -0
@@ -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>
arch/x86/kvm/kvm_onhyperv.c +1 -0
@@ -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"
Signature · 1 line
2.34.1
Sean Christopherson
maintainerRe: [PATCH 3/6] KVM: x86: hyper-v: Fix warnings for missing export.h header inclusion
Quoted 1 line · Naman Jain
Fix below warning in Hyper-V drivers
KVM is quite obviously not a Hyper-V driver.
Quoted 3 lines
that comes when kernel is compiled with W=1 option. Include
export.hin 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/[email protected]
Quoted 33 lines
Signed-off-by Naman Jain <[email protected]>--- arch/x86/kvm/hyperv.c | 1 + arch/x86/kvm/kvm_onhyperv.c | 1 + 2 files changed, 2 insertions(+)arch/x86/kvm/hyperv.c +1
-0@@ -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> arch/x86/kvm/kvm_onhyperv.c +1
-0@@ -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" Signature · 1 line
2.34.1
Re: [PATCH 3/6] KVM: x86: hyper-v: Fix warnings for missing export.h header inclusion
Quoted 9 lines · Sean Christopherson
Quoted 1 line · Naman Jain
Fix below warning in Hyper-V drivers
KVM is quite obviously not a Hyper-V driver.
Quoted 3 lines
that comes when kernel is compiled with W=1 option. Include
export.hin driver files to fix it. * warning:EXPORT_SYMBOL()is used, but #include <linux/export.h> is missing
Quoted 8 lines
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.
Sure, thanks for reviewing.
Regards,
Naman
Quoted 33 lines
Quoted 33 lines
Signed-off-by Naman Jain <[email protected]>--- arch/x86/kvm/hyperv.c | 1 + arch/x86/kvm/kvm_onhyperv.c | 1 + 2 files changed, 2 insertions(+)arch/x86/kvm/hyperv.c +1
-0@@ -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> arch/x86/kvm/kvm_onhyperv.c +1
-0@@ -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" Signature · 1 line
2.34.1
PATCH 4/6 clocksource: hyper-v: Fix warnings for missing export.h header inclusion
In reply to Naman JainFix 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
--- drivers/clocksource/hyperv_timer.c | 1 + 1 file changed, 1 insertion(+)
drivers/clocksource/hyperv_timer.c +1 -0
@@ -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>
Signature · 1 line
2.34.1
Re: [PATCH 4/6] clocksource: hyper-v: Fix warnings for missing export.h header inclusion
Quoted 15 lines · Naman Jain
Fix below warning in Hyper-V clocksource driver that comes when kernel is compiled with W=1 option. Include
export.hin driver files to fix it.
* warning:EXPORT_SYMBOL()is used, but #include <linux/export.h> is missingSigned-off-by Naman Jain <[email protected]>--- drivers/clocksource/hyperv_timer.c | 1 + 1 file changed, 1 insertion(+)drivers/clocksource/hyperv_timer.c +0
-0
drivers/clocksource/hyperv_timer.c line 28
Quoted 7 lines
drivers/clocksource/hyperv_timer.c +1
-0@@ -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>
Quoted 3 lines
Signature · 1 line
2.34.1
Signature · 5 lines
<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
PATCH 5/6 PCI: hv: Fix warnings for missing export.h header inclusion
In reply to Naman JainFix 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
--- drivers/pci/controller/pci-hyperv-intf.c | 1 + 1 file changed, 1 insertion(+)
drivers/pci/controller/pci-hyperv-intf.c +1 -0
@@ -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);
Signature · 1 line
2.34.1
PATCH 6/6 net: mana: Fix warnings for missing export.h header inclusion
In reply to Naman JainFix 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
--- drivers/net/ethernet/microsoft/mana/gdma_main.c | 1 + drivers/net/ethernet/microsoft/mana/mana_en.c | 1 + 2 files changed, 2 insertions(+)
drivers/net/ethernet/microsoft/mana/gdma_main.c +1 -0
@@ -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>
drivers/net/ethernet/microsoft/mana/mana_en.c +1 -0
@@ -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>
Signature · 1 line
2.34.1
Quoted 40 lines · Naman Jain
When the kernel is compiled with W=1 option, a warning is reported
if a .c file exports a symbol but does not includeexport.hheader
file. This warning was added in below patch, which merged recently:
commita934a57a42f6("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.cis going to be fixed with
https://lore.kernel.org/all/[email protected]/
so it is not included in this series.Naman Jain (6):
Drivers: hv: Fix warnings for missingexport.hheader inclusion x86/hyperv: Fix warnings for missingexport.hheader inclusion
KVM: x86: hyper-v: Fix warnings for missingexport.hheader inclusion
clocksource: hyper-v: Fix warnings for missingexport.hheader
inclusion
PCI: hv: Fix warnings for missingexport.hheader inclusion
net: mana: Fix warnings for missingexport.hheader inclusionarch/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(+)
Quoted 4 lines
base-commit:
475c850a7fdd0915b856173186d5922899d65686Signature · 1 line
2.34.1
For the series,
Quoted 12 lines · Naman Jain
When the kernel is compiled with W=1 option, a warning is reported
if a .c file exports a symbol but does not includeexport.hheader
file. This warning was added in below patch, which merged recently:
commita934a57a42f6("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.cis going to be fixed with
https://lore.kernel.org/all/[email protected]/
so it is not included in this series.
Quoted 8 lines
Naman Jain (6):
Drivers: hv: Fix warnings for missingexport.hheader inclusion x86/hyperv: Fix warnings for missingexport.hheader inclusion
KVM: x86: hyper-v: Fix warnings for missingexport.hheader inclusion
clocksource: hyper-v: Fix warnings for missingexport.hheader
inclusion
PCI: hv: Fix warnings for missingexport.hheader inclusion
net: mana: Fix warnings for missingexport.hheader inclusion
I applied all patches expect the KVM one to hyperv-fixes. Thanks.