mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
Cc: "Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Toan Le" <toan@os.amperecomputing.com>,
	"Mahesh Vaidya" <mahesh.vaidya@altera.com>,
	DM@bhelgaas, "Sharath Kumar" <sharath.kumar.d.m@intel.com>
Subject: Re: [PATCH] PCI: altera-msi: Convert to subsys_platform_driver()
Date: Thu, 5 Nov 2026 11:38:08 -0600	[thread overview]
Message-ID: <20261105173808.GA1527544@bhelgaas> (raw)
In-Reply-To: <20261104113235.1634024-1-peng.fan@oss.nxp.com>

[+cc Altera, X-Gene folks]

On Wed, Nov 04, 2026 at 07:32:35PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Replace the open-coded subsys_initcall()/module_exit() platform driver
> registration with subsys_platform_driver().
> 
> No functional change.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  drivers/pci/controller/pcie-altera-msi.c | 13 +------------
>  1 file changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/drivers/pci/controller/pcie-altera-msi.c b/drivers/pci/controller/pcie-altera-msi.c
> index ea2ca2e70f20..8c0696cbd4ae 100644
> --- a/drivers/pci/controller/pcie-altera-msi.c
> +++ b/drivers/pci/controller/pcie-altera-msi.c
> @@ -267,18 +267,7 @@ static struct platform_driver altera_msi_driver = {
>  	.remove = altera_msi_remove,
>  };
>  
> -static int __init altera_msi_init(void)
> -{
> -	return platform_driver_register(&altera_msi_driver);
> -}
> -
> -static void __exit altera_msi_exit(void)
> -{
> -	platform_driver_unregister(&altera_msi_driver);
> -}
> -
> -subsys_initcall(altera_msi_init);
> +subsys_platform_driver(altera_msi_driver);
>  MODULE_DEVICE_TABLE(of, altera_msi_of_match);
> -module_exit(altera_msi_exit);
>  MODULE_DESCRIPTION("Altera PCIe MSI support driver");
>  MODULE_LICENSE("GPL v2");

Looks like a nice improvement.

There are only three drivers that have separate MSI Kconfig options
and separate -msi.c files: altera, iproc, and xgene.

pcie-iproc-msi.c doesn't look like it has its own DT .compatible
string and driver registration stuff, but altera and xgene do.  I
wonder if it's possible to integrate them into the main drivers so we
don't need separate Kconfig and separate .c files?

      parent reply	other threads:[~2026-11-05 17:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 11:32 Peng Fan (OSS)
2026-11-05 15:49 ` Manivannan Sadhasivam
2026-11-05 17:38 ` Bjorn Helgaas [this message]

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=20261105173808.GA1527544@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=DM@bhelgaas \
    --cc=bhelgaas@google.com \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mahesh.vaidya@altera.com \
    --cc=mani@kernel.org \
    --cc=peng.fan@oss.nxp.com \
    --cc=robh@kernel.org \
    --cc=sharath.kumar.d.m@intel.com \
    --cc=toan@os.amperecomputing.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®