Skip to contentSkip to conversation

pci/dmar: add __init annotation to dmar_ir_support()

PATCH New Stephen Boyd 1 participant 2 messages Oct 3, 2009 – Oct 12, 2009 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci/dmar: add __init annotation to dmar_ir_support()

dmar_ir_support() references dmar_tbl which is annotated with __initdata. The only caller of dmar_ir_support() is intr_remapping_supported() also annotated with __init.

WARNING: drivers/pci/built-in.o(.text+0xa110): Section mismatch in reference from the function dmar_ir_support() to the variable .init.data:dmar_tbl
The function dmar_ir_support() references
the variable __initdata dmar_tbl.
This is often because dmar_ir_support lacks a __initdata annotation or the annotation of dmar_tbl is wrong.

---
 drivers/pci/dmar.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/pci/dmar.c +1 -1
index 14bbaa1..fbca5e7 100644
@@ -1327,7 +1327,7 @@ int dmar_reenable_qi(struct intel_iommu *iommu)
 /*
  * Check interrupt remapping support in DMAR table description.
  */
-int dmar_ir_support(void)
+int __init dmar_ir_support(void)
 {
 	struct acpi_table_dmar *dmar;
 	dmar = (struct acpi_table_dmar *)dmar_tbl;
Signature · 1 line
1.6.5.rc1.44.ga1675
#1 lore raw

PATCH 1/1 pci/dmar: fix section mismatch in dmar_ir_support()

dmar_ir_support() references dmar_tbl which is annotated with __initdata. The only caller of dmar_ir_support() is intr_remapping_supported() also annotated with __init. Therefore add the __init annotation to dmar_ir_support().

WARNING: drivers/pci/built-in.o(.text+0xa110): Section mismatch in reference from the function dmar_ir_support() to the variable .init.data:dmar_tbl
The function dmar_ir_support() references
the variable __initdata dmar_tbl.
This is often because dmar_ir_support lacks a __initdata annotation or the annotation of dmar_tbl is wrong.
---

I sent this a week back but it looks like it didn't stick. Hopefully it does this time.

 drivers/pci/dmar.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/pci/dmar.c +1 -1
index 14bbaa1..fbca5e7 100644
@@ -1327,7 +1327,7 @@ int dmar_reenable_qi(struct intel_iommu *iommu)
 /*
  * Check interrupt remapping support in DMAR table description.
  */
-int dmar_ir_support(void)
+int __init dmar_ir_support(void)
 {
 	struct acpi_table_dmar *dmar;
 	dmar = (struct acpi_table_dmar *)dmar_tbl;
Signature · 1 line
1.6.5.195.geae96