Commit be280ea
committed
iommu/amd: Fix compile warning in init code
A recent commit introduced these compile warnings:
CC drivers/iommu/amd/init.o
drivers/iommu/amd/init.c:938:12: error: ‘iommu_init_ga_log’ defined but not used [-Werror=unused-function]
938 | static int iommu_init_ga_log(struct amd_iommu *iommu)
| ^~~~~~~~~~~~~~~~~
drivers/iommu/amd/init.c:902:12: error: ‘iommu_ga_log_enable’ defined but not used [-Werror=unused-function]
902 | static int iommu_ga_log_enable(struct amd_iommu *iommu)
| ^~~~~~~~~~~~~~~~~~~
The warnings appear because both functions are defined when IRQ
remapping is not enabled, but only used when IRQ remapping is enabled.
Fix it by only defining the functions when IRQ remapping is enabled.
Fixes: c5e1a1e ("iommu/amd: Simplify and Consolidate Virtual APIC (AVIC) Enablement")
Signed-off-by: Joerg Roedel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent 432e5df commit be280ea
1 file changed
+3
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
899 | 899 | | |
900 | 900 | | |
901 | 901 | | |
| 902 | + | |
902 | 903 | | |
903 | 904 | | |
904 | | - | |
905 | 905 | | |
906 | 906 | | |
907 | 907 | | |
| |||
931 | 931 | | |
932 | 932 | | |
933 | 933 | | |
934 | | - | |
| 934 | + | |
935 | 935 | | |
936 | 936 | | |
937 | 937 | | |
938 | 938 | | |
939 | 939 | | |
940 | | - | |
941 | 940 | | |
942 | 941 | | |
943 | 942 | | |
| |||
955 | 954 | | |
956 | 955 | | |
957 | 956 | | |
958 | | - | |
959 | | - | |
960 | | - | |
961 | 957 | | |
| 958 | + | |
962 | 959 | | |
963 | 960 | | |
964 | 961 | | |
| |||
0 commit comments