Skip to contentSkip to conversation

pci: pci-hyperv-intf: remove unnecessary module_init/exit functions

PATCH Applied Ethan Nelson-Moore 3 participants 3 messages Jan 31 – Feb 4

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

PATCH 1/1 pci: pci-hyperv-intf: remove unnecessary module_init/exit functions

The pci-hyperv-intf driver has unnecessary empty module_init and module_exit functions. Remove them. Note that if a module_init function exists, a module_exit function must also exist; otherwise, the module cannot be unloaded.

---
 drivers/pci/controller/pci-hyperv-intf.c | 12 ------------
 1 file changed, 12 deletions(-)
drivers/pci/controller/pci-hyperv-intf.c +0 -12
index 28b3e93d31c0..18acbda867f0 100644
@@ -52,17 +52,5 @@ int hyperv_reg_block_invalidate(struct pci_dev *dev, void *context,
 }
 EXPORT_SYMBOL_GPL(hyperv_reg_block_invalidate);
 
-static void __exit exit_hv_pci_intf(void)
-{
-}
-
-static int __init init_hv_pci_intf(void)
-{
-	return 0;
-}
-
-module_init(init_hv_pci_intf);
-module_exit(exit_hv_pci_intf);
-
 MODULE_DESCRIPTION("Hyper-V PCI Interface");
 MODULE_LICENSE("GPL v2");
Signature · 1 line
2.43.0
maintainer Applied
#1 lore raw
Quoted 6 lines · Ethan Nelson-Moore

The pci-hyperv-intf driver has unnecessary empty module_init and module_exit functions. Remove them. Note that if a module_init function exists, a module_exit function must also exist; otherwise, the module cannot be unloaded.

Applied to hyperv-next. I modified the subject line to match our conventions. Thanks.

Wei

maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Ethan Nelson-Moore
Quoted 6 lines · Ethan Nelson-Moore

The pci-hyperv-intf driver has unnecessary empty module_init and module_exit functions. Remove them. Note that if a module_init function exists, a module_exit function must also exist; otherwise, the module cannot be unloaded.

- Mani

Quoted 29 lines
---
 drivers/pci/controller/pci-hyperv-intf.c | 12 ------------
 1 file changed, 12 deletions(-)
drivers/pci/controller/pci-hyperv-intf.c +0 -12
index 28b3e93d31c0..18acbda867f0 100644
@@ -52,17 +52,5 @@ int hyperv_reg_block_invalidate(struct pci_dev *dev, void *context,
 }
 EXPORT_SYMBOL_GPL(hyperv_reg_block_invalidate);
 
-static void __exit exit_hv_pci_intf(void)
-{
-}
-
-static int __init init_hv_pci_intf(void)
-{
-	return 0;
-}
-
-module_init(init_hv_pci_intf);
-module_exit(exit_hv_pci_intf);
-
 MODULE_DESCRIPTION("Hyper-V PCI Interface");
 MODULE_LICENSE("GPL v2");
Signature · 1 line
2.43.0
Signature · 1 line
மணிவண்ணன் சதாசிவம்