Skip to content

Commit 2852631

Browse files
andy-shevjoergroedel
authored andcommitted
iommu/vt-d: Move intel_iommu_ops to header file
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>
1 parent 2187a57 commit 2852631

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/iommu/intel/dmar.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ static unsigned long dmar_seq_ids[BITS_TO_LONGS(DMAR_UNITS_SUPPORTED)];
6666
static int alloc_iommu(struct dmar_drhd_unit *drhd);
6767
static void free_iommu(struct intel_iommu *iommu);
6868

69-
extern const struct iommu_ops intel_iommu_ops;
70-
7169
static void dmar_register_drhd_unit(struct dmar_drhd_unit *drhd)
7270
{
7371
/*

include/linux/intel-iommu.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,8 @@ bool context_present(struct context_entry *context);
783783
struct context_entry *iommu_context_addr(struct intel_iommu *iommu, u8 bus,
784784
u8 devfn, int alloc);
785785

786+
extern const struct iommu_ops intel_iommu_ops;
787+
786788
#ifdef CONFIG_INTEL_IOMMU
787789
extern int iommu_calculate_agaw(struct intel_iommu *iommu);
788790
extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu);

0 commit comments

Comments
 (0)