[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a0A9xAcwDLFbUk--X2+7gFpOL7HJw-9Sk8KZxfoidcxuw@mail.gmail.com>
Date: Mon, 15 Nov 2021 14:00:32 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Krzysztof Wilczyński <kw@...ux.com>
Cc: Sergio Paracuellos <sergio.paracuellos@...il.com>,
linux-pci <linux-pci@...r.kernel.org>,
"open list:BROADCOM NVRAM DRIVER" <linux-mips@...r.kernel.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
John Crispin <john@...ozen.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Arnd Bergmann <arnd@...db.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Yanteng Si <siyanteng@...ngson.cn>
Subject: Re: [PATCH 4/5] PCI: mt7621: Add missing 'MODULE_LICENSE()' definition
On Mon, Nov 15, 2021 at 1:44 PM Krzysztof Wilczyński <kw@...ux.com> wrote:
> > MT7620 PCIe host controller driver can be built as a module but there is no
> > 'MODULE_LICENSE()' specified in code, causing a build error due to missing
> > license information.
> >
> > ERROR: modpost: missing MODULE_LICENSE() in drivers/pci/controller/pcie-mt7621.o
> >
> > Fix this by adding 'MODULE_LICENSE()' to the driver.
> >
> > Fixes: 2bdd5238e756 ("PCI: mt7621: Add MediaTek MT7621 PCIe host controller driver")
> > Signed-off-by: Yanteng Si <siyanteng@...ngson.cn>
> > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@...il.com>
> > ---
> > drivers/pci/controller/pcie-mt7621.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c
> > index 9cf541f5de9c..a120a61ede07 100644
> > --- a/drivers/pci/controller/pcie-mt7621.c
> > +++ b/drivers/pci/controller/pcie-mt7621.c
> > @@ -561,3 +561,5 @@ static struct platform_driver mt7621_pci_driver = {
> > },
> > };
> > builtin_platform_driver(mt7621_pci_driver);
> > +
> > +MODULE_LICENSE("GPL v2");
>
> A question here about the builtin_platform_driver() use in this driver,
> especially since it's set as tristate in Kconfig, thus I am not sure if
> using builtin_platform_driver() over module_platform_driver() is correct?
>
> Unless this is more because you need to reply on device_initcall() for the
> driver to properly initialise?
builtin_platform_driver() does the right thing for loadable modules that
have no module-unload and are not intended to be removable.
This is often use for PCI drivers, but after Rob reworked this code a while
back, it should actually be possible to reliably remove and reload PCI
host bridge drivers, and it would be good to eventually lift the restriction
here as well.
Arnd
Powered by blists - more mailing lists