diff mbox series

[V3,vfio,04/11] vfio: Move vfio.c to vfio_main.c

Message ID 20220731125503.142683-5-yishaih@nvidia.com (mailing list archive)
State New, archived
Headers show
Series Add device DMA logging support for mlx5 driver | expand

Commit Message

Yishai Hadas July 31, 2022, 12:54 p.m. UTC
From: Jason Gunthorpe <jgg@nvidia.com>

If a source file has the same name as a module then kbuild only supports
a single source file in the module.

Rename vfio.c to vfio_main.c so that we can have more that one .c file
in vfio.ko.

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>

---
 drivers/vfio/Makefile                | 2 ++
 drivers/vfio/{vfio.c => vfio_main.c} | 0
 2 files changed, 2 insertions(+)
 rename drivers/vfio/{vfio.c => vfio_main.c} (100%)

Comments

Jason Gunthorpe Aug. 5, 2022, 3:51 p.m. UTC | #1
On Sun, Jul 31, 2022 at 03:54:56PM +0300, Yishai Hadas wrote:
> From: Jason Gunthorpe <jgg@nvidia.com>
> 
> If a source file has the same name as a module then kbuild only supports
> a single source file in the module.
> 
> Rename vfio.c to vfio_main.c so that we can have more that one .c file
> in vfio.ko.
> 
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
> 
> ---
>  drivers/vfio/Makefile                | 2 ++
>  drivers/vfio/{vfio.c => vfio_main.c} | 0
>  2 files changed, 2 insertions(+)
>  rename drivers/vfio/{vfio.c => vfio_main.c} (100%)

Alex, could you grab this patch for the current merge window?

It is a PITA to rebase across, it would be nice to have the rename in
rc1

Thanks,
Jason
Alex Williamson Aug. 5, 2022, 7:01 p.m. UTC | #2
On Fri, 5 Aug 2022 12:51:29 -0300
Jason Gunthorpe <jgg@nvidia.com> wrote:

> On Sun, Jul 31, 2022 at 03:54:56PM +0300, Yishai Hadas wrote:
> > From: Jason Gunthorpe <jgg@nvidia.com>
> > 
> > If a source file has the same name as a module then kbuild only supports
> > a single source file in the module.
> > 
> > Rename vfio.c to vfio_main.c so that we can have more that one .c file
> > in vfio.ko.
> > 
> > Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> > Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
> > 
> > ---
> >  drivers/vfio/Makefile                | 2 ++
> >  drivers/vfio/{vfio.c => vfio_main.c} | 0
> >  2 files changed, 2 insertions(+)
> >  rename drivers/vfio/{vfio.c => vfio_main.c} (100%)  
> 
> Alex, could you grab this patch for the current merge window?
> 
> It is a PITA to rebase across, it would be nice to have the rename in
> rc1

No objection from me, I'll see if Linus picks up my current pull
request and either pull this in or send it separately next week.
Thanks,

Alex
diff mbox series

Patch

diff --git a/drivers/vfio/Makefile b/drivers/vfio/Makefile
index fee73f3d9480..1a32357592e3 100644
--- a/drivers/vfio/Makefile
+++ b/drivers/vfio/Makefile
@@ -1,6 +1,8 @@ 
 # SPDX-License-Identifier: GPL-2.0
 vfio_virqfd-y := virqfd.o
 
+vfio-y += vfio_main.o
+
 obj-$(CONFIG_VFIO) += vfio.o
 obj-$(CONFIG_VFIO_VIRQFD) += vfio_virqfd.o
 obj-$(CONFIG_VFIO_IOMMU_TYPE1) += vfio_iommu_type1.o
diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio_main.c
similarity index 100%
rename from drivers/vfio/vfio.c
rename to drivers/vfio/vfio_main.c