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 <namj...@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 <nunodasne...@linux.microsoft.com>