All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-kernel@vger.kernel.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Tom Long Nguyen <tom.l.nguyen@intel.com>,
	<linux-pci@vger.kernel.org>
Subject: [PATCH 3/9] PCI: PCIe aerdrv: make it explicitly non-modular
Date: Wed, 24 Aug 2016 16:57:46 -0400	[thread overview]
Message-ID: <20160824205752.12024-4-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <20160824205752.12024-1-paul.gortmaker@windriver.com>

The Makefile fragments currently controlling compilation of this code are:

obj-$(CONFIG_PCIEAER) += aerdriver.o
aerdriver-objs := aerdrv_errprint.o aerdrv_core.o aerdrv.o

The Kconfig currently controlling compilation of this code is:

drivers/pci/pcie/aer/Kconfig:config PCIEAER
drivers/pci/pcie/aer/Kconfig:   bool "Root Port Advanced Error Reporting support"

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.

Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.

We don't replace module.h with init.h since the file already has that.

We also delete the MODULE_LICENSE tag etc since all that information
is already contained earlier in the file.

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Tom Long Nguyen <tom.l.nguyen@intel.com>
Cc: linux-pci@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/pci/pcie/aer/aerdrv.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c
index 48d21e0edd56..49805a48b81c 100644
--- a/drivers/pci/pcie/aer/aerdrv.c
+++ b/drivers/pci/pcie/aer/aerdrv.c
@@ -15,7 +15,6 @@
  *
  */
 
-#include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/pci-acpi.h>
 #include <linux/sched.h>
@@ -37,9 +36,6 @@
 #define DRIVER_VERSION "v1.0"
 #define DRIVER_AUTHOR "tom.l.nguyen@intel.com"
 #define DRIVER_DESC "Root Port Advanced Error Reporting Driver"
-MODULE_AUTHOR(DRIVER_AUTHOR);
-MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE("GPL");
 
 static int aer_probe(struct pcie_device *dev);
 static void aer_remove(struct pcie_device *dev);
@@ -417,16 +413,4 @@ static int __init aer_service_init(void)
 		return -ENXIO;
 	return pcie_port_service_register(&aerdriver);
 }
-
-/**
- * aer_service_exit - unregister AER root service driver
- *
- * Invoked when AER root service driver is unloaded.
- */
-static void __exit aer_service_exit(void)
-{
-	pcie_port_service_unregister(&aerdriver);
-}
-
-module_init(aer_service_init);
-module_exit(aer_service_exit);
+device_initcall(aer_service_init);
-- 
2.8.4

  parent reply	other threads:[~2016-08-24 20:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24 20:57 [PATCH 0/9] PCI: final demodularization of non-modular code Paul Gortmaker
2016-08-24 20:57 ` Paul Gortmaker
2016-08-24 20:57 ` [PATCH 1/9] PCI: PCIe dpc: make it explicitly non-modular Paul Gortmaker
2016-08-24 20:57 ` [PATCH 2/9] PCI: PCIe pme: " Paul Gortmaker
2016-08-24 20:57 ` Paul Gortmaker [this message]
2016-08-24 20:57 ` [PATCH 4/9] PCI: dra7xx: make host code " Paul Gortmaker
2016-08-24 20:57   ` Paul Gortmaker
2016-08-24 20:57 ` [PATCH 5/9] PCI: PCIe qcom: " Paul Gortmaker
2016-08-24 20:57 ` [PATCH 6/9] PCI: PCIe xilinx: " Paul Gortmaker
2016-08-24 20:57 ` [PATCH 7/9] PCI: PCIe xilinx-nwl: " Paul Gortmaker
2016-08-24 20:57 ` [PATCH 8/9] PCI: hotplug_core: make it " Paul Gortmaker
2016-08-24 20:57 ` [PATCH 9/9] PCI: hotplug: make PCIe core code " Paul Gortmaker
2016-08-24 22:34 ` [PATCH 0/9] PCI: final demodularization of non-modular code Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160824205752.12024-4-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=tom.l.nguyen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.