diff mbox series

vfio-mdev: add MODULE_DESCRIPTION() macros

Message ID 20240523-md-vfio-mdev-v1-1-4676cd532b10@quicinc.com (mailing list archive)
State New, archived
Headers show
Series vfio-mdev: add MODULE_DESCRIPTION() macros | expand

Commit Message

Jeff Johnson May 24, 2024, 12:12 a.m. UTC
Fix the 'make W=1' warnings:
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-mdev/mtty.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-mdev/mdpy.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-mdev/mdpy-fb.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-mdev/mbochs.o

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
---
 samples/vfio-mdev/mbochs.c  | 1 +
 samples/vfio-mdev/mdpy-fb.c | 1 +
 samples/vfio-mdev/mdpy.c    | 1 +
 samples/vfio-mdev/mtty.c    | 1 +
 4 files changed, 4 insertions(+)


---
base-commit: 5c4069234f68372e80e4edfcce260e81fd9da007
change-id: 20240523-md-vfio-mdev-381f74bf87f1

Comments

Jeff Johnson July 11, 2024, 6:30 p.m. UTC | #1
On 5/23/24 17:12, Jeff Johnson wrote:
> Fix the 'make W=1' warnings:
> WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-mdev/mtty.o
> WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-mdev/mdpy.o
> WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-mdev/mdpy-fb.o
> WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-mdev/mbochs.o
> 
> Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> ---
>   samples/vfio-mdev/mbochs.c  | 1 +
>   samples/vfio-mdev/mdpy-fb.c | 1 +
>   samples/vfio-mdev/mdpy.c    | 1 +
>   samples/vfio-mdev/mtty.c    | 1 +
>   4 files changed, 4 insertions(+)
> 
> diff --git a/samples/vfio-mdev/mbochs.c b/samples/vfio-mdev/mbochs.c
> index 9062598ea03d..836456837997 100644
> --- a/samples/vfio-mdev/mbochs.c
> +++ b/samples/vfio-mdev/mbochs.c
> @@ -88,6 +88,7 @@
>   #define STORE_LE32(addr, val)	(*(u32 *)addr = val)
>   
>   
> +MODULE_DESCRIPTION("Mediated virtual PCI display host device driver");
>   MODULE_LICENSE("GPL v2");
>   
>   static int max_mbytes = 256;
> diff --git a/samples/vfio-mdev/mdpy-fb.c b/samples/vfio-mdev/mdpy-fb.c
> index 4598bc28acd9..149af7f598f8 100644
> --- a/samples/vfio-mdev/mdpy-fb.c
> +++ b/samples/vfio-mdev/mdpy-fb.c
> @@ -229,4 +229,5 @@ static int __init mdpy_fb_init(void)
>   module_init(mdpy_fb_init);
>   
>   MODULE_DEVICE_TABLE(pci, mdpy_fb_pci_table);
> +MODULE_DESCRIPTION("Framebuffer driver for mdpy (mediated virtual pci display device)");
>   MODULE_LICENSE("GPL v2");
> diff --git a/samples/vfio-mdev/mdpy.c b/samples/vfio-mdev/mdpy.c
> index 27795501de6e..8104831ae125 100644
> --- a/samples/vfio-mdev/mdpy.c
> +++ b/samples/vfio-mdev/mdpy.c
> @@ -40,6 +40,7 @@
>   #define STORE_LE32(addr, val)	(*(u32 *)addr = val)
>   
>   
> +MODULE_DESCRIPTION("Mediated virtual PCI display host device driver");
>   MODULE_LICENSE("GPL v2");
>   
>   #define MDPY_TYPE_1 "vga"
> diff --git a/samples/vfio-mdev/mtty.c b/samples/vfio-mdev/mtty.c
> index 2284b3751240..40e7d154455e 100644
> --- a/samples/vfio-mdev/mtty.c
> +++ b/samples/vfio-mdev/mtty.c
> @@ -2059,5 +2059,6 @@ module_exit(mtty_dev_exit)
>   
>   MODULE_LICENSE("GPL v2");
>   MODULE_INFO(supported, "Test driver that simulate serial port over PCI");
> +MODULE_DESCRIPTION("Test driver that simulate serial port over PCI");
>   MODULE_VERSION(VERSION_STRING);
>   MODULE_AUTHOR(DRIVER_AUTHOR);
> 
> ---
> base-commit: 5c4069234f68372e80e4edfcce260e81fd9da007
> change-id: 20240523-md-vfio-mdev-381f74bf87f1
> 

I don't see this in linux-next yet so following up to see if anything 
else is needed to get this merged.

I hope to have these warnings fixed tree-wide in 6.11.

/jeff
Kirti Wankhede July 12, 2024, 7:27 a.m. UTC | #2
+ Alex.

Reviewed by : Kirti Wankhede <kwankhede@nvidia.com>


> -----Original Message-----
> From: Jeff Johnson <quic_jjohnson@quicinc.com>
> Sent: Friday, July 12, 2024 12:01 AM
> To: Kirti Wankhede <kwankhede@nvidia.com>
> Cc: kvm@vger.kernel.org; linux-kernel@vger.kernel.org; kernel-
> janitors@vger.kernel.org
> Subject: Re: [PATCH] vfio-mdev: add MODULE_DESCRIPTION() macros
> 
> On 5/23/24 17:12, Jeff Johnson wrote:
> > Fix the 'make W=1' warnings:
> > WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-
> mdev/mtty.o
> > WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-
> mdev/mdpy.o
> > WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-
> mdev/mdpy-fb.o
> > WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-
> mdev/mbochs.o
> >
> > Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> > ---
> >   samples/vfio-mdev/mbochs.c  | 1 +
> >   samples/vfio-mdev/mdpy-fb.c | 1 +
> >   samples/vfio-mdev/mdpy.c    | 1 +
> >   samples/vfio-mdev/mtty.c    | 1 +
> >   4 files changed, 4 insertions(+)
> >
> > diff --git a/samples/vfio-mdev/mbochs.c b/samples/vfio-mdev/mbochs.c
> > index 9062598ea03d..836456837997 100644
> > --- a/samples/vfio-mdev/mbochs.c
> > +++ b/samples/vfio-mdev/mbochs.c
> > @@ -88,6 +88,7 @@
> >   #define STORE_LE32(addr, val)	(*(u32 *)addr = val)
> >
> >
> > +MODULE_DESCRIPTION("Mediated virtual PCI display host device driver");
> >   MODULE_LICENSE("GPL v2");
> >
> >   static int max_mbytes = 256;
> > diff --git a/samples/vfio-mdev/mdpy-fb.c b/samples/vfio-mdev/mdpy-fb.c
> > index 4598bc28acd9..149af7f598f8 100644
> > --- a/samples/vfio-mdev/mdpy-fb.c
> > +++ b/samples/vfio-mdev/mdpy-fb.c
> > @@ -229,4 +229,5 @@ static int __init mdpy_fb_init(void)
> >   module_init(mdpy_fb_init);
> >
> >   MODULE_DEVICE_TABLE(pci, mdpy_fb_pci_table);
> > +MODULE_DESCRIPTION("Framebuffer driver for mdpy (mediated virtual pci
> display device)");
> >   MODULE_LICENSE("GPL v2");
> > diff --git a/samples/vfio-mdev/mdpy.c b/samples/vfio-mdev/mdpy.c
> > index 27795501de6e..8104831ae125 100644
> > --- a/samples/vfio-mdev/mdpy.c
> > +++ b/samples/vfio-mdev/mdpy.c
> > @@ -40,6 +40,7 @@
> >   #define STORE_LE32(addr, val)	(*(u32 *)addr = val)
> >
> >
> > +MODULE_DESCRIPTION("Mediated virtual PCI display host device driver");
> >   MODULE_LICENSE("GPL v2");
> >
> >   #define MDPY_TYPE_1 "vga"
> > diff --git a/samples/vfio-mdev/mtty.c b/samples/vfio-mdev/mtty.c
> > index 2284b3751240..40e7d154455e 100644
> > --- a/samples/vfio-mdev/mtty.c
> > +++ b/samples/vfio-mdev/mtty.c
> > @@ -2059,5 +2059,6 @@ module_exit(mtty_dev_exit)
> >
> >   MODULE_LICENSE("GPL v2");
> >   MODULE_INFO(supported, "Test driver that simulate serial port over PCI");
> > +MODULE_DESCRIPTION("Test driver that simulate serial port over PCI");
> >   MODULE_VERSION(VERSION_STRING);
> >   MODULE_AUTHOR(DRIVER_AUTHOR);
> >
> > ---
> > base-commit: 5c4069234f68372e80e4edfcce260e81fd9da007
> > change-id: 20240523-md-vfio-mdev-381f74bf87f1
> >
> 
> I don't see this in linux-next yet so following up to see if anything
> else is needed to get this merged.
> 
> I hope to have these warnings fixed tree-wide in 6.11.
> 
> /jeff
Alex Williamson July 12, 2024, 10:36 p.m. UTC | #3
On Fri, 12 Jul 2024 07:27:33 +0000
Kirti Wankhede <kwankhede@nvidia.com> wrote:

> + Alex.
> 
> Reviewed by : Kirti Wankhede <kwankhede@nvidia.com>

Mind the syntax, Reviewed-by:

Also a comment below...

> > -----Original Message-----
> > From: Jeff Johnson <quic_jjohnson@quicinc.com>
> > Sent: Friday, July 12, 2024 12:01 AM
> > To: Kirti Wankhede <kwankhede@nvidia.com>
> > Cc: kvm@vger.kernel.org; linux-kernel@vger.kernel.org; kernel-
> > janitors@vger.kernel.org
> > Subject: Re: [PATCH] vfio-mdev: add MODULE_DESCRIPTION() macros
> > 
> > On 5/23/24 17:12, Jeff Johnson wrote:  
> > > Fix the 'make W=1' warnings:
> > > WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-  
> > mdev/mtty.o  
> > > WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-  
> > mdev/mdpy.o  
> > > WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-  
> > mdev/mdpy-fb.o  
> > > WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-  
> > mdev/mbochs.o  
> > >
> > > Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> > > ---
> > >   samples/vfio-mdev/mbochs.c  | 1 +
> > >   samples/vfio-mdev/mdpy-fb.c | 1 +
> > >   samples/vfio-mdev/mdpy.c    | 1 +
> > >   samples/vfio-mdev/mtty.c    | 1 +
> > >   4 files changed, 4 insertions(+)
> > >
> > > diff --git a/samples/vfio-mdev/mbochs.c b/samples/vfio-mdev/mbochs.c
> > > index 9062598ea03d..836456837997 100644
> > > --- a/samples/vfio-mdev/mbochs.c
> > > +++ b/samples/vfio-mdev/mbochs.c
> > > @@ -88,6 +88,7 @@
> > >   #define STORE_LE32(addr, val)	(*(u32 *)addr = val)
> > >
> > >
> > > +MODULE_DESCRIPTION("Mediated virtual PCI display host device driver");
> > >   MODULE_LICENSE("GPL v2");
> > >
> > >   static int max_mbytes = 256;
> > > diff --git a/samples/vfio-mdev/mdpy-fb.c b/samples/vfio-mdev/mdpy-fb.c
> > > index 4598bc28acd9..149af7f598f8 100644
> > > --- a/samples/vfio-mdev/mdpy-fb.c
> > > +++ b/samples/vfio-mdev/mdpy-fb.c
> > > @@ -229,4 +229,5 @@ static int __init mdpy_fb_init(void)
> > >   module_init(mdpy_fb_init);
> > >
> > >   MODULE_DEVICE_TABLE(pci, mdpy_fb_pci_table);
> > > +MODULE_DESCRIPTION("Framebuffer driver for mdpy (mediated virtual pci  
> > display device)");  
> > >   MODULE_LICENSE("GPL v2");
> > > diff --git a/samples/vfio-mdev/mdpy.c b/samples/vfio-mdev/mdpy.c
> > > index 27795501de6e..8104831ae125 100644
> > > --- a/samples/vfio-mdev/mdpy.c
> > > +++ b/samples/vfio-mdev/mdpy.c
> > > @@ -40,6 +40,7 @@
> > >   #define STORE_LE32(addr, val)	(*(u32 *)addr = val)
> > >
> > >
> > > +MODULE_DESCRIPTION("Mediated virtual PCI display host device driver");
> > >   MODULE_LICENSE("GPL v2");
> > >
> > >   #define MDPY_TYPE_1 "vga"
> > > diff --git a/samples/vfio-mdev/mtty.c b/samples/vfio-mdev/mtty.c
> > > index 2284b3751240..40e7d154455e 100644
> > > --- a/samples/vfio-mdev/mtty.c
> > > +++ b/samples/vfio-mdev/mtty.c
> > > @@ -2059,5 +2059,6 @@ module_exit(mtty_dev_exit)
> > >
> > >   MODULE_LICENSE("GPL v2");
> > >   MODULE_INFO(supported, "Test driver that simulate serial port over PCI");
> > > +MODULE_DESCRIPTION("Test driver that simulate serial port over PCI");

Seems the preceding MODULE_INFO needs to be removed here.  At best the
added MODULE_DESCRIPTION is redundant, but "supported" is not a
standard tag, so it's not clear what the purpose of that tag was meant
to be anyway.  Thanks,

Alex

> > >   MODULE_VERSION(VERSION_STRING);
> > >   MODULE_AUTHOR(DRIVER_AUTHOR);
> > >
> > > ---
> > > base-commit: 5c4069234f68372e80e4edfcce260e81fd9da007
> > > change-id: 20240523-md-vfio-mdev-381f74bf87f1
> > >  
> > 
> > I don't see this in linux-next yet so following up to see if anything
> > else is needed to get this merged.
> > 
> > I hope to have these warnings fixed tree-wide in 6.11.
> > 
> > /jeff
Jeff Johnson July 15, 2024, 4:17 p.m. UTC | #4
On 7/12/2024 3:36 PM, Alex Williamson wrote:>>>>   MODULE_LICENSE("GPL v2");
>>>>   MODULE_INFO(supported, "Test driver that simulate serial port over PCI");
>>>> +MODULE_DESCRIPTION("Test driver that simulate serial port over PCI");
> 
> Seems the preceding MODULE_INFO needs to be removed here.  At best the
> added MODULE_DESCRIPTION is redundant, but "supported" is not a
> standard tag, so it's not clear what the purpose of that tag was meant
> to be anyway.  Thanks,
> 
> Alex

My preference would be to just add the missing MODULE_DESCRIPTION() with this
patch since that fixes the existing warning. Removing an existing macro
invocation is out of scope for what I'm trying to accomplish.

Out of almost 300 patches treewide that add missing MODULE_DESCRIPTION()
macros, this is one of 13 that is still pending for the 6.11 merge window.

/jeff
Alex Williamson July 15, 2024, 4:35 p.m. UTC | #5
On Mon, 15 Jul 2024 09:17:41 -0700
Jeff Johnson <quic_jjohnson@quicinc.com> wrote:

> On 7/12/2024 3:36 PM, Alex Williamson wrote:>>>>   MODULE_LICENSE("GPL v2");
> >>>>   MODULE_INFO(supported, "Test driver that simulate serial port over PCI");
> >>>> +MODULE_DESCRIPTION("Test driver that simulate serial port over PCI");  
> > 
> > Seems the preceding MODULE_INFO needs to be removed here.  At best the
> > added MODULE_DESCRIPTION is redundant, but "supported" is not a
> > standard tag, so it's not clear what the purpose of that tag was meant
> > to be anyway.  Thanks,
> > 
> > Alex  
> 
> My preference would be to just add the missing MODULE_DESCRIPTION() with this
> patch since that fixes the existing warning. Removing an existing macro
> invocation is out of scope for what I'm trying to accomplish.

This adds a MODULE_DESCRIPTION that's redundant to the current
MODULE_INFO, therefore I'd argue that it's not out of scope to replace
the MODULE_INFO with a MODULE_DESCRIPTION to achieve your goal.  Thanks,

Alex
Jeff Johnson July 15, 2024, 5:32 p.m. UTC | #6
On 7/15/2024 9:35 AM, Alex Williamson wrote:
> On Mon, 15 Jul 2024 09:17:41 -0700
> Jeff Johnson <quic_jjohnson@quicinc.com> wrote:
> 
>> On 7/12/2024 3:36 PM, Alex Williamson wrote:>>>>   MODULE_LICENSE("GPL v2");
>>>>>>   MODULE_INFO(supported, "Test driver that simulate serial port over PCI");
>>>>>> +MODULE_DESCRIPTION("Test driver that simulate serial port over PCI");  
>>>
>>> Seems the preceding MODULE_INFO needs to be removed here.  At best the
>>> added MODULE_DESCRIPTION is redundant, but "supported" is not a
>>> standard tag, so it's not clear what the purpose of that tag was meant
>>> to be anyway.  Thanks,
>>>
>>> Alex  
>>
>> My preference would be to just add the missing MODULE_DESCRIPTION() with this
>> patch since that fixes the existing warning. Removing an existing macro
>> invocation is out of scope for what I'm trying to accomplish.
> 
> This adds a MODULE_DESCRIPTION that's redundant to the current
> MODULE_INFO, therefore I'd argue that it's not out of scope to replace
> the MODULE_INFO with a MODULE_DESCRIPTION to achieve your goal.  Thanks,
> 
> Alex
> 
ok, let me post a v2

/jeff
diff mbox series

Patch

diff --git a/samples/vfio-mdev/mbochs.c b/samples/vfio-mdev/mbochs.c
index 9062598ea03d..836456837997 100644
--- a/samples/vfio-mdev/mbochs.c
+++ b/samples/vfio-mdev/mbochs.c
@@ -88,6 +88,7 @@ 
 #define STORE_LE32(addr, val)	(*(u32 *)addr = val)
 
 
+MODULE_DESCRIPTION("Mediated virtual PCI display host device driver");
 MODULE_LICENSE("GPL v2");
 
 static int max_mbytes = 256;
diff --git a/samples/vfio-mdev/mdpy-fb.c b/samples/vfio-mdev/mdpy-fb.c
index 4598bc28acd9..149af7f598f8 100644
--- a/samples/vfio-mdev/mdpy-fb.c
+++ b/samples/vfio-mdev/mdpy-fb.c
@@ -229,4 +229,5 @@  static int __init mdpy_fb_init(void)
 module_init(mdpy_fb_init);
 
 MODULE_DEVICE_TABLE(pci, mdpy_fb_pci_table);
+MODULE_DESCRIPTION("Framebuffer driver for mdpy (mediated virtual pci display device)");
 MODULE_LICENSE("GPL v2");
diff --git a/samples/vfio-mdev/mdpy.c b/samples/vfio-mdev/mdpy.c
index 27795501de6e..8104831ae125 100644
--- a/samples/vfio-mdev/mdpy.c
+++ b/samples/vfio-mdev/mdpy.c
@@ -40,6 +40,7 @@ 
 #define STORE_LE32(addr, val)	(*(u32 *)addr = val)
 
 
+MODULE_DESCRIPTION("Mediated virtual PCI display host device driver");
 MODULE_LICENSE("GPL v2");
 
 #define MDPY_TYPE_1 "vga"
diff --git a/samples/vfio-mdev/mtty.c b/samples/vfio-mdev/mtty.c
index 2284b3751240..40e7d154455e 100644
--- a/samples/vfio-mdev/mtty.c
+++ b/samples/vfio-mdev/mtty.c
@@ -2059,5 +2059,6 @@  module_exit(mtty_dev_exit)
 
 MODULE_LICENSE("GPL v2");
 MODULE_INFO(supported, "Test driver that simulate serial port over PCI");
+MODULE_DESCRIPTION("Test driver that simulate serial port over PCI");
 MODULE_VERSION(VERSION_STRING);
 MODULE_AUTHOR(DRIVER_AUTHOR);