From: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
Sent: Thursday, November 16, 2023 9:51 AM
+static inline struct intel_iommu *dev_to_iommu(struct device *dev)
+{
+ /*
+ * Assume that valid per-device iommu structure must be installed
+ * if iommu_probe_device() has succeeded. This helper could only
+ * be used after device is probed.
+ */
+ return ((struct device_domain_info *)dev_iommu_priv_get(dev))-
iommu;+}
Not sure whether this helper is useful. This is only used by 2 out of 5
post-probe users. Probably just open-coding in all 5 places is clearer.