iommu/vt-d: Move intel_iommu_ops to header file
Subsystems (2)
PATCH 1/1 iommu/vt-d: Move intel_iommu_ops to header file
Compiler is not happy about hidden declaration of intel_iommu_ops.
.../drivers/iommu/intel/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.
--- drivers/iommu/intel/dmar.c | 2 -- include/linux/intel-iommu.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/iommu/intel/dmar.c +0 -2
@@ -64,8 +64,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) {/*
include/linux/intel-iommu.h +2 -0
@@ -787,6 +787,8 @@ struct context_entry *iommu_context_addr(struct intel_iommu *iommu, u8 bus, u8 devfn, int alloc);#ifdef CONFIG_INTEL_IOMMU +extern const struct iommu_ops intel_iommu_ops; +extern int iommu_calculate_agaw (struct intel_iommu *iommu);extern int iommu_calculate_max_sagaw (struct intel_iommu *iommu);extern int dmar_disabled;
Signature · 6 lines
2.28.0 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Quoted 5 lines · Andy Shevchenko
Compiler is not happy about hidden declaration of
intel_iommu_ops.
.../drivers/iommu/intel/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.
What about a factoring out a helper that does iommu_device_sysfs_add + iommu_device_set_ops + iommu_device_register and then mark intel_iommu_ops static?
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Quoted 10 lines · Christoph Hellwig
Quoted 5 lines · Andy Shevchenko
Compiler is not happy about hidden declaration of
intel_iommu_ops.
.../drivers/iommu/intel/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.
What about a factoring out a helper that does
iommu_device_sysfs_add+iommu_device_set_ops+iommu_device_registerand then markintel_iommu_opsstatic?
I am okay with this proposal, but I think the better if IOMMU folks can answer to this before I'm going to invest time into it.
Signature · 8 lines
With Best Regards, Andy Shevchenko _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Lu Baolu
maintainerHi Andy,
Quoted 6 lines · Andy Shevchenko
Quoted 5 lines · Christoph Hellwig
Quoted 4 lines · Andy Shevchenko
Compiler is not happy about hidden declaration of
intel_iommu_ops.
.../drivers/iommu/intel/iommu.c:414:24: warning: symbol 'intel_iommu_ops' was not declared. Should it be static?
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Move declaration to header file to make compiler happy.
What about a factoring out a helper that does
iommu_device_sysfs_add+iommu_device_set_ops+iommu_device_registerand then markintel_iommu_opsstatic?I am okay with this proposal, but I think the better if IOMMU folks can answer to this before I'm going to invest time into it.
Thanks for your patch! I am okay with Christoph's proposal as well.
Best regards,
baolu
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu