Skip to content

Commit eb03f2d

Browse files
ssuthiku-amdjoergroedel
authored andcommitted
iommu/amd: Remove iommu_init_ga()
Since the function has been simplified and only call iommu_init_ga_log(), remove the function and replace with iommu_init_ga_log() instead. Signed-off-by: Suravee Suthikulpanit <[email protected]> Link: https://lore.kernel.org/r/[email protected] Fixes: 8bda0cf ("iommu/amd: Detect and initialize guest vAPIC log") Signed-off-by: Joerg Roedel <[email protected]>
1 parent c3811a5 commit eb03f2d

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

drivers/iommu/amd/init.c

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -829,9 +829,9 @@ static int iommu_ga_log_enable(struct amd_iommu *iommu)
829829
return 0;
830830
}
831831

832-
#ifdef CONFIG_IRQ_REMAP
833832
static int iommu_init_ga_log(struct amd_iommu *iommu)
834833
{
834+
#ifdef CONFIG_IRQ_REMAP
835835
u64 entry;
836836

837837
if (!AMD_IOMMU_GUEST_IR_VAPIC(amd_iommu_guest_ir))
@@ -861,18 +861,9 @@ static int iommu_init_ga_log(struct amd_iommu *iommu)
861861
err_out:
862862
free_ga_log(iommu);
863863
return -EINVAL;
864-
}
865-
#endif /* CONFIG_IRQ_REMAP */
866-
867-
static int iommu_init_ga(struct amd_iommu *iommu)
868-
{
869-
int ret = 0;
870-
871-
#ifdef CONFIG_IRQ_REMAP
872-
ret = iommu_init_ga_log(iommu);
864+
#else
865+
return 0;
873866
#endif /* CONFIG_IRQ_REMAP */
874-
875-
return ret;
876867
}
877868

878869
static int __init alloc_cwwb_sem(struct amd_iommu *iommu)
@@ -1854,7 +1845,7 @@ static int __init iommu_init_pci(struct amd_iommu *iommu)
18541845
if (iommu_feature(iommu, FEATURE_PPR) && alloc_ppr_log(iommu))
18551846
return -ENOMEM;
18561847

1857-
ret = iommu_init_ga(iommu);
1848+
ret = iommu_init_ga_log(iommu);
18581849
if (ret)
18591850
return ret;
18601851

0 commit comments

Comments
 (0)