mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-06 03:15:08 -05:00
iommu/amd: Fix section mismatch warning for detect_ivrs()
A recent commit introduced this section mismatch warning:
WARNING: modpost: vmlinux.o(.text.unlikely+0x22a1f): Section mismatch in reference from the function detect_ivrs() to the variable .init.data:amd_iommu_force_enable
The reason is that detect_ivrs() is not marked __init while it should
be, because it is only called from another __init function. Mark
detect_ivrs() __init to get rid of the warning.
Fixes: b1e650db2c ("iommu/amd: Add amd_iommu=force_enable option")
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Link: https://lore.kernel.org/r/20210608122843.8413-1-joro@8bytes.org
This commit is contained in:
@@ -2818,7 +2818,7 @@ static int amd_iommu_enable_interrupts(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static bool detect_ivrs(void)
|
||||
static bool __init detect_ivrs(void)
|
||||
{
|
||||
struct acpi_table_header *ivrs_base;
|
||||
acpi_status status;
|
||||
|
||||
Reference in New Issue
Block a user