Skip to contentSkip to conversation

PCI: make pci_assign_unassigned_resources() non-init

PATCH Applied Randy Dunlap 2 participants 2 messages Sep 25, 2023 – Sep 28, 2023 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: make pci_assign_unassigned_resources() non-init

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.

---
 drivers/pci/setup-bus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/setup-bus.c +1 -1
diff -- 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;
 
#1 lore raw
Quoted 9 lines · Randy Dunlap

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.

Quoted 5 lines

Applied to misc for v6.7, thanks!

Quoted 16 lines
---
 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

drivers/pci/setup-bus.c +1 -1
@@ -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;