All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] PCI/PCIe: make DPC explicitly non-modular
@ 2016-07-28 19:33 Paul Gortmaker
  2016-07-28 20:29 ` Keith Busch
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Gortmaker @ 2016-07-28 19:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Bjorn Helgaas, Keith Busch, Mika Westerberg, linux-pci

The Kconfig currently controlling compilation of this code is:

drivers/pci/pcie/Kconfig:config PCIE_DPC
drivers/pci/pcie/Kconfig:       bool "PCIe Downstream Port Containment 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 also delete the MODULE_LICENSE tag etc. since all that information
was (or is now) contained at the top of the file in the comments.

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: linux-pci@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---

[This mismatch just appeared in Thursday's linux-next; doesn't matter
 to me if we update it now or I batch it in with other pending PCI
 changes for-4.9 -- either one is fine; choice is up to you folks.]

 drivers/pci/pcie/pcie-dpc.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/drivers/pci/pcie/pcie-dpc.c b/drivers/pci/pcie/pcie-dpc.c
index 250f87861786..9811b14d9ad8 100644
--- a/drivers/pci/pcie/pcie-dpc.c
+++ b/drivers/pci/pcie/pcie-dpc.c
@@ -1,5 +1,7 @@
 /*
  * PCI Express Downstream Port Containment services driver
+ * Author: Keith Busch <keith.busch@intel.com>
+ *
  * Copyright (C) 2016 Intel Corp.
  *
  * This file is subject to the terms and conditions of the GNU General Public
@@ -9,7 +11,7 @@
 
 #include <linux/delay.h>
 #include <linux/interrupt.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/pcieport_if.h>
 
@@ -143,16 +145,4 @@ static int __init dpc_service_init(void)
 {
 	return pcie_port_service_register(&dpcdriver);
 }
-
-static void __exit dpc_service_exit(void)
-{
-	pcie_port_service_unregister(&dpcdriver);
-}
-
-MODULE_DESCRIPTION("PCI Express Downstream Port Containment driver");
-MODULE_AUTHOR("Keith Busch <keith.busch@intel.com>");
-MODULE_LICENSE("GPL");
-MODULE_VERSION("0.1");
-
-module_init(dpc_service_init);
-module_exit(dpc_service_exit);
+device_initcall(dpc_service_init);
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] PCI/PCIe: make DPC explicitly non-modular
  2016-07-28 19:33 [PATCH -next] PCI/PCIe: make DPC explicitly non-modular Paul Gortmaker
@ 2016-07-28 20:29 ` Keith Busch
  2016-07-28 21:28   ` Paul Gortmaker
  0 siblings, 1 reply; 5+ messages in thread
From: Keith Busch @ 2016-07-28 20:29 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-kernel, Bjorn Helgaas, Mika Westerberg, linux-pci

On Thu, Jul 28, 2016 at 03:33:03PM -0400, Paul Gortmaker wrote:
> The Kconfig currently controlling compilation of this code is:
> 
> drivers/pci/pcie/Kconfig:config PCIE_DPC
> drivers/pci/pcie/Kconfig:       bool "PCIe Downstream Port Containment 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 also delete the MODULE_LICENSE tag etc. since all that information
> was (or is now) contained at the top of the file in the comments.

Thanks for cleaning this up.

FWIW, all of the other pcie service drivers look like they could use
the same cleanup.

Reviewed-by: Keith Busch <keith.busch@intel.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] PCI/PCIe: make DPC explicitly non-modular
  2016-07-28 20:29 ` Keith Busch
@ 2016-07-28 21:28   ` Paul Gortmaker
  2016-08-22 19:44     ` Bjorn Helgaas
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Gortmaker @ 2016-07-28 21:28 UTC (permalink / raw)
  To: Keith Busch; +Cc: linux-kernel, Bjorn Helgaas, Mika Westerberg, linux-pci

[Re: [PATCH -next] PCI/PCIe: make DPC explicitly non-modular] On 28/07/2016 (Thu 16:29) Keith Busch wrote:

> On Thu, Jul 28, 2016 at 03:33:03PM -0400, Paul Gortmaker wrote:
> > The Kconfig currently controlling compilation of this code is:
> > 
> > drivers/pci/pcie/Kconfig:config PCIE_DPC
> > drivers/pci/pcie/Kconfig:       bool "PCIe Downstream Port Containment 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 also delete the MODULE_LICENSE tag etc. since all that information
> > was (or is now) contained at the top of the file in the comments.
> 
> Thanks for cleaning this up.
> 
> FWIW, all of the other pcie service drivers look like they could use
> the same cleanup.

Yep, not to worry, I've still got the following patches pending for-4.9:

$ grep PCI series 
# PCI
PCI-aerdrv-make-it-explicitly-non-modular.patch
PCI-altera-make-it-explicitly-non-modular.patch
PCI-dra7xx-make-it-explicitly-non-modular.patch
PCI-imx6-make-it-explicitly-non-modular.patch
PCI-pme-make-it-explicitly-non-modular.patch
PCI-qcom-make-it-explicitly-non-modular.patch
PCI-spear13xx-make-it-explicitly-non-modular.patch
PCI-xilinx-make-it-explicitly-non-modular.patch
PCI-xilinx-nwl-make-it-eplicitly-non-modular.patch
PCI-portdrv-make-it-explicitly-non-modular.patch
PCI-PCIe-make-dpc-explicitly-non-modular.patch
PCI-generic-make-host-common-explicitly-non-modular.patch
PCI-hotplug_core-make-it-explicitly-non-modular.patch
PCI-hotplug-make-core-code-explicitly-non-modular.patch

Thanks,
Paul.
--

> 
> Reviewed-by: Keith Busch <keith.busch@intel.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] PCI/PCIe: make DPC explicitly non-modular
  2016-07-28 21:28   ` Paul Gortmaker
@ 2016-08-22 19:44     ` Bjorn Helgaas
  2016-08-22 22:12       ` Paul Gortmaker
  0 siblings, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2016-08-22 19:44 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: Keith Busch, linux-kernel, Bjorn Helgaas, Mika Westerberg, linux-pci

Hi Paul,

On Thu, Jul 28, 2016 at 05:28:02PM -0400, Paul Gortmaker wrote:
> [Re: [PATCH -next] PCI/PCIe: make DPC explicitly non-modular] On 28/07/2016 (Thu 16:29) Keith Busch wrote:
> 
> > On Thu, Jul 28, 2016 at 03:33:03PM -0400, Paul Gortmaker wrote:
> > > The Kconfig currently controlling compilation of this code is:
> > > 
> > > drivers/pci/pcie/Kconfig:config PCIE_DPC
> > > drivers/pci/pcie/Kconfig:       bool "PCIe Downstream Port Containment 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 also delete the MODULE_LICENSE tag etc. since all that information
> > > was (or is now) contained at the top of the file in the comments.
> > 
> > Thanks for cleaning this up.
> > 
> > FWIW, all of the other pcie service drivers look like they could use
> > the same cleanup.
> 
> Yep, not to worry, I've still got the following patches pending for-4.9:
> 
> $ grep PCI series 
> # PCI
> PCI-aerdrv-make-it-explicitly-non-modular.patch
> PCI-altera-make-it-explicitly-non-modular.patch
> PCI-dra7xx-make-it-explicitly-non-modular.patch
> PCI-imx6-make-it-explicitly-non-modular.patch
> PCI-pme-make-it-explicitly-non-modular.patch
> PCI-qcom-make-it-explicitly-non-modular.patch
> PCI-spear13xx-make-it-explicitly-non-modular.patch
> PCI-xilinx-make-it-explicitly-non-modular.patch
> PCI-xilinx-nwl-make-it-eplicitly-non-modular.patch
> PCI-portdrv-make-it-explicitly-non-modular.patch
> PCI-PCIe-make-dpc-explicitly-non-modular.patch
> PCI-generic-make-host-common-explicitly-non-modular.patch
> PCI-hotplug_core-make-it-explicitly-non-modular.patch
> PCI-hotplug-make-core-code-explicitly-non-modular.patch

Were you planning to post the patches above?  If so, I'll bundle them
all up along with this DPC one.

Bjorn

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] PCI/PCIe: make DPC explicitly non-modular
  2016-08-22 19:44     ` Bjorn Helgaas
@ 2016-08-22 22:12       ` Paul Gortmaker
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Gortmaker @ 2016-08-22 22:12 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Keith Busch, linux-kernel, Bjorn Helgaas, Mika Westerberg, linux-pci

[Re: [PATCH -next] PCI/PCIe: make DPC explicitly non-modular] On 22/08/2016 (Mon 14:44) Bjorn Helgaas wrote:

> Hi Paul,
> 
> On Thu, Jul 28, 2016 at 05:28:02PM -0400, Paul Gortmaker wrote:

[...]

> > 
> > Yep, not to worry, I've still got the following patches pending for-4.9:
> > 
> > $ grep PCI series 
> > # PCI
> > PCI-aerdrv-make-it-explicitly-non-modular.patch
> > PCI-altera-make-it-explicitly-non-modular.patch
> > PCI-dra7xx-make-it-explicitly-non-modular.patch
> > PCI-imx6-make-it-explicitly-non-modular.patch
> > PCI-pme-make-it-explicitly-non-modular.patch
> > PCI-qcom-make-it-explicitly-non-modular.patch
> > PCI-spear13xx-make-it-explicitly-non-modular.patch
> > PCI-xilinx-make-it-explicitly-non-modular.patch
> > PCI-xilinx-nwl-make-it-eplicitly-non-modular.patch
> > PCI-portdrv-make-it-explicitly-non-modular.patch
> > PCI-PCIe-make-dpc-explicitly-non-modular.patch
> > PCI-generic-make-host-common-explicitly-non-modular.patch
> > PCI-hotplug_core-make-it-explicitly-non-modular.patch
> > PCI-hotplug-make-core-code-explicitly-non-modular.patch
> 
> Were you planning to post the patches above?  If so, I'll bundle them
> all up along with this DPC one.

Ha, too funny; I'd just split the remaining patches into two lots and
sent lot #1 (the binary equivalent ones) before seeing this.

The DPC one got put in lot #2 since it had __exit and/or .remove
functions, so the change isn't strictly binary equivalent anymore.

I'll send along lot #2 once you've had a chance to digest lot #1.
So feel free to ignore the earlier copy of the DPC one.

Thanks,
Paul.
--

> 
> Bjorn

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-08-22 22:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-28 19:33 [PATCH -next] PCI/PCIe: make DPC explicitly non-modular Paul Gortmaker
2016-07-28 20:29 ` Keith Busch
2016-07-28 21:28   ` Paul Gortmaker
2016-08-22 19:44     ` Bjorn Helgaas
2016-08-22 22:12       ` Paul Gortmaker

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.