Skip to contentSkip to conversation

vfio-mdev: add missing MODULE_DESCRIPTION() macros

PATCH Applied Jeff Johnson 2 participants 3 messages Jul 15, 2024 – Jul 17, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 vfio-mdev: add missing MODULE_DESCRIPTION() macros

Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the description is missing"), a module without a MODULE_DESCRIPTION() will result in a warning with make W=1. The following warnings are being observed in samples/vfio-mdev:

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

Add the missing invocations of the MODULE_DESCRIPTION() macro to these modules. And in the case of mtty.c, remove the now redundant instance of the MODULE_INFO() macro.

---
Of the almost 300 patches I've submitted tree-wide to fix these
issues, this is one of the 13 remaining. Hopefully this can make it
via your tree into the 6.11 merge window. If not, Greg KH has
indicated he'll take this as an -rc instead of waiting for 6.12.
---
Changes in v2:
- Updated the commit text to more fully describe the problem and solution.
- Removed the MODULE_INFO() from mtty.c
- Note I did not carry forward Kirti's Reviewed-by: due to this removal, please re-review
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 samples/vfio-mdev/mbochs.c  | 1 +
 samples/vfio-mdev/mdpy-fb.c | 1 +
 samples/vfio-mdev/mdpy.c    | 1 +
 samples/vfio-mdev/mtty.c    | 2 +-
 4 files changed, 4 insertions(+), 1 deletion(-)
samples/vfio-mdev/mbochs.c +1 -0
index 9062598ea03d..836456837997 100644
@@ -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;
samples/vfio-mdev/mdpy-fb.c +1 -0
index 4598bc28acd9..149af7f598f8 100644
@@ -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");
samples/vfio-mdev/mdpy.c +1 -0
index 27795501de6e..8104831ae125 100644
@@ -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"
samples/vfio-mdev/mtty.c +1 -1
index 2284b3751240..b382c696c877 100644
@@ -2058,6 +2058,6 @@ module_init(mtty_dev_init)
 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: 0c3836482481200ead7b416ca80c68a29cfdaabd
change-id: 20240523-md-vfio-mdev-381f74bf87f1

#1 lore raw
Quoted 15 lines · On Mon, 15 Jul 2024 12:27:09 -0700 Jeff Johnson <[email protected]>…

Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the description is missing"), a module without a MODULE_DESCRIPTION() will result in a warning with make W=1. The following warnings are being observed in samples/vfio-mdev:

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

Add the missing invocations of the MODULE_DESCRIPTION() macro to these modules. And in the case of mtty.c, remove the now redundant instance of the MODULE_INFO() macro.

Quoted 13 lines

---
Of the almost 300 patches I've submitted tree-wide to fix these
issues, this is one of the 13 remaining. Hopefully this can make it
via your tree into the 6.11 merge window. If not, Greg KH has
indicated he'll take this as an -rc instead of waiting for 6.12.
---
Changes in v2:
- Updated the commit text to more fully describe the problem and solution.
- Removed the MODULE_INFO() from mtty.c
- Note I did not carry forward Kirti's Reviewed-by: due to this removal, please re-review
- Link to v1: https://lore.kernel.org/r/[email protected]
---

LGTM. Kirti, would you like to re-add your R-b? Thanks,

Alex

Quoted 57 lines
 samples/vfio-mdev/mbochs.c  | 1 +
 samples/vfio-mdev/mdpy-fb.c | 1 +
 samples/vfio-mdev/mdpy.c    | 1 +
 samples/vfio-mdev/mtty.c    | 2 +-
 4 files changed, 4 insertions(+), 1 deletion(-)
samples/vfio-mdev/mbochs.c +1 -0
index 9062598ea03d..836456837997 100644
@@ -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;
samples/vfio-mdev/mdpy-fb.c +1 -0
index 4598bc28acd9..149af7f598f8 100644
@@ -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");
samples/vfio-mdev/mdpy.c +1 -0
index 27795501de6e..8104831ae125 100644
@@ -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"
samples/vfio-mdev/mtty.c +1 -2
index 2284b3751240..b382c696c877 100644
@@ -2058,6 +2058,6 @@ module_init(mtty_dev_init)
 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: 0c3836482481200ead7b416ca80c68a29cfdaabd
change-id: 20240523-md-vfio-mdev-381f74bf87f1

#2 lore raw
In reply to Jeff Johnson
Quoted 27 lines · On Mon, 15 Jul 2024 12:27:09 -0700 Jeff Johnson <[email protected]>…

Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the description is missing"), a module without a MODULE_DESCRIPTION() will result in a warning with make W=1. The following warnings are being observed in samples/vfio-mdev:

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

Add the missing invocations of the MODULE_DESCRIPTION() macro to these modules. And in the case of mtty.c, remove the now redundant instance of the MODULE_INFO() macro.

---
Of the almost 300 patches I've submitted tree-wide to fix these
issues, this is one of the 13 remaining. Hopefully this can make it
via your tree into the 6.11 merge window. If not, Greg KH has
indicated he'll take this as an -rc instead of waiting for 6.12.
---
Changes in v2:
- Updated the commit text to more fully describe the problem and solution.
- Removed the MODULE_INFO() from mtty.c
- Note I did not carry forward Kirti's Reviewed-by: due to this removal, please re-review
- Link to v1: https://lore.kernel.org/r/[email protected]

Quoted 6 lines
---
 samples/vfio-mdev/mbochs.c  | 1 +
 samples/vfio-mdev/mdpy-fb.c | 1 +
 samples/vfio-mdev/mdpy.c    | 1 +
 samples/vfio-mdev/mtty.c    | 2 +-
 4 files changed, 4 insertions(+), 1 deletion(-)

Applied to vfio next branch for v6.11. Thanks,

Alex

Quoted 52 lines
samples/vfio-mdev/mbochs.c +1 -0
index 9062598ea03d..836456837997 100644
@@ -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;
samples/vfio-mdev/mdpy-fb.c +1 -0
index 4598bc28acd9..149af7f598f8 100644
@@ -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");
samples/vfio-mdev/mdpy.c +1 -0
index 27795501de6e..8104831ae125 100644
@@ -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"
samples/vfio-mdev/mtty.c +1 -2
index 2284b3751240..b382c696c877 100644
@@ -2058,6 +2058,6 @@ module_init(mtty_dev_init)
 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: 0c3836482481200ead7b416ca80c68a29cfdaabd
change-id: 20240523-md-vfio-mdev-381f74bf87f1