iommu/vt-d: Move intel_iommu_ops to header file
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 1 Mar 2022 02:01:56 +0000 (10:01 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 4 Mar 2022 15:46:31 +0000 (16:46 +0100)
Compiler is not happy about hidden declaration of intel_iommu_ops.

.../iommu.c:414:24: warning: symbol 'intel_iommu_ops' was not declared. Should it be static?

Move declaration to header file to make compiler happy.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220207141240.8253-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20220301020159.633356-10-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/dmar.c
include/linux/intel-iommu.h

index 6d10be50ec30e8fc0381926540d279bd7409c236..4de960834a1b2856d5347d4652305018aa2fbe99 100644 (file)
@@ -66,8 +66,6 @@ static unsigned long dmar_seq_ids[BITS_TO_LONGS(DMAR_UNITS_SUPPORTED)];
 static int alloc_iommu(struct dmar_drhd_unit *drhd);
 static void free_iommu(struct intel_iommu *iommu);
 
-extern const struct iommu_ops intel_iommu_ops;
-
 static void dmar_register_drhd_unit(struct dmar_drhd_unit *drhd)
 {
        /*
index 03f1134fc2fedf0f41e4d5cb41d60eda1a0841eb..4909d6c9ac215ae01d7a7ee142d8f558b035925d 100644 (file)
@@ -783,6 +783,8 @@ bool context_present(struct context_entry *context);
 struct context_entry *iommu_context_addr(struct intel_iommu *iommu, u8 bus,
                                         u8 devfn, int alloc);
 
+extern const struct iommu_ops intel_iommu_ops;
+
 #ifdef CONFIG_INTEL_IOMMU
 extern int iommu_calculate_agaw(struct intel_iommu *iommu);
 extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu);