> From: Jason Gunthorpe <[email protected]>
> Sent: Thursday, September 4, 2025 1:47 AM
>
> +
> +/*
> + * Some APIs use unsigned long some use dma_addr_t as the type. Dispatch
> to the
> + * correct validation based on the type.
"Some APIs use unsigned long, while others use..."
> +
> +/*
> + * The driver should setup its domain struct like
> + * union {
> + * struct iommu_domain domain;
> + * struct pt_iommu_xxx xx;
> + * };
> + * PT_IOMMU_CHECK_DOMAIN(struct mock_iommu_domain, xx.iommu,
> domain);
> + *
> + * Which creates an alias between driver_domain.domain and
> + * driver_domain.xx.iommu.domain. This is to avoid a mass rename of
> existing
> + * driver_domain.domain users.
> + */
> +#define PT_IOMMU_CHECK_DOMAIN(s, pt_iommu_memb, domain_memb)
> \
> + static_assert(offsetof(s, pt_iommu_memb.domain) == \
> + offsetof(s, domain_memb))
>
not belong to this patch
Reviewed-by: Kevin Tian <[email protected]>