Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/hyperv: 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

Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
Reviewed-by: Saurabh Sengar <ssengar@linux.microsoft.com>
Link: https://lore.kernel.org/r/20250611100459.92900-3-namjain@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <20250611100459.92900-3-namjain@linux.microsoft.com>

authored by

Naman Jain and committed by
Wei Liu
0271e72b 2b206d34

+4
+1
arch/x86/hyperv/hv_init.c
··· 34 34 #include <linux/syscore_ops.h> 35 35 #include <clocksource/hyperv_timer.h> 36 36 #include <linux/highmem.h> 37 + #include <linux/export.h> 37 38 38 39 void *hv_hypercall_pg; 39 40 EXPORT_SYMBOL_GPL(hv_hypercall_pg);
+1
arch/x86/hyperv/irqdomain.c
··· 10 10 11 11 #include <linux/pci.h> 12 12 #include <linux/irq.h> 13 + #include <linux/export.h> 13 14 #include <asm/mshyperv.h> 14 15 15 16 static int hv_map_interrupt(union hv_device_id device_id, bool level,
+1
arch/x86/hyperv/ivm.c
··· 10 10 #include <linux/types.h> 11 11 #include <linux/slab.h> 12 12 #include <linux/cpu.h> 13 + #include <linux/export.h> 13 14 #include <asm/svm.h> 14 15 #include <asm/sev.h> 15 16 #include <asm/io.h>
+1
arch/x86/hyperv/nested.c
··· 11 11 12 12 13 13 #include <linux/types.h> 14 + #include <linux/export.h> 14 15 #include <hyperv/hvhdk.h> 15 16 #include <asm/mshyperv.h> 16 17 #include <asm/tlbflush.h>