[PATCH] PCI: make pci_assign_unassigned_resources() non-init

Randy Dunlap posted 1 patch 2 years, 4 months ago
drivers/pci/setup-bus.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] PCI: make pci_assign_unassigned_resources() non-init
Posted by Randy Dunlap 2 years, 4 months ago
Fix a section mismatch warning on Sparc 32-bit:

WARNING: modpost: vmlinux: section mismatch in reference: leon_pci_init+0xf8 (section: .text) -> pci_assign_unassigned_resources (section: .init.text)

This is due to this comment from arch/sparc/kernel/leon_pci.c:
 * The LEON architecture does not rely on a BIOS or bootloader to setup
 * PCI for us. The Linux generic routines are used to setup resources,
 * reset values of configuration-space register settings are preserved.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
---
 drivers/pci/setup-bus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -- a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -2129,7 +2129,7 @@ dump:
 	pci_bus_dump_resources(bus);
 }
 
-void __init pci_assign_unassigned_resources(void)
+void pci_assign_unassigned_resources(void)
 {
 	struct pci_bus *root_bus;
Re: [PATCH] PCI: make pci_assign_unassigned_resources() non-init
Posted by Bjorn Helgaas 2 years, 4 months ago
On Sun, Sep 24, 2023 at 09:23:16PM -0700, Randy Dunlap wrote:
> Fix a section mismatch warning on Sparc 32-bit:
> 
> WARNING: modpost: vmlinux: section mismatch in reference: leon_pci_init+0xf8 (section: .text) -> pci_assign_unassigned_resources (section: .init.text)
> 
> This is due to this comment from arch/sparc/kernel/leon_pci.c:
>  * The LEON architecture does not rely on a BIOS or bootloader to setup
>  * PCI for us. The Linux generic routines are used to setup resources,
>  * reset values of configuration-space register settings are preserved.
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: linux-pci@vger.kernel.org
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: sparclinux@vger.kernel.org

Applied to misc for v6.7, thanks!

> ---
>  drivers/pci/setup-bus.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff -- a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
> --- a/drivers/pci/setup-bus.c
> +++ b/drivers/pci/setup-bus.c
> @@ -2129,7 +2129,7 @@ dump:
>  	pci_bus_dump_resources(bus);
>  }
>  
> -void __init pci_assign_unassigned_resources(void)
> +void pci_assign_unassigned_resources(void)
>  {
>  	struct pci_bus *root_bus;
>