Skip to content

Commit

Permalink
intel-iommu: Mark functions with __init
Browse files Browse the repository at this point in the history
Mark si_domain_init and iommu_prepare_static_identity_mapping with
__init, to eliminate the following warnings:

WARNING: drivers/pci/built-in.o(.text+0xf1f4): Section mismatch in reference from the function si_domain_init() to the function .init.text:si_domain_work_fn()
The function si_domain_init() references
the function __init si_domain_work_fn().
This is often because si_domain_init lacks a __init
annotation or the annotation of si_domain_work_fn is wrong.

WARNING: drivers/pci/built-in.o(.text+0xe340): Section mismatch in reference from the function iommu_prepare_static_identity_mapping() to the function .init.text:si_domain_init()
The function iommu_prepare_static_identity_mapping() references
the function __init si_domain_init().
This is often because iommu_prepare_static_identity_mapping lacks a __init
annotation or the annotation of si_domain_init is wrong.

Signed-off-by: Matt Kraai <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
  • Loading branch information
kraai authored and David Woodhouse committed Aug 24, 2009
1 parent 1320322 commit 071e137
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pci/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2038,7 +2038,7 @@ static int __init si_domain_work_fn(unsigned long start_pfn,

}

static int si_domain_init(int hw)
static int __init si_domain_init(int hw)
{
struct dmar_drhd_unit *drhd;
struct intel_iommu *iommu;
Expand Down Expand Up @@ -2167,7 +2167,7 @@ static int iommu_should_identity_map(struct pci_dev *pdev, int startup)
return 1;
}

static int iommu_prepare_static_identity_mapping(int hw)
static int __init iommu_prepare_static_identity_mapping(int hw)
{
struct pci_dev *pdev = NULL;
int ret;
Expand Down

0 comments on commit 071e137

Please sign in to comment.