> - if (IS_ENABLED(CONFIG_SWIOTLB) && dev_is_untrusted(dev) &&
> + if (IS_ENABLED(CONFIG_SWIOTLB) && dev_use_swiotlb(dev) &&
> iova_offset(iovad, phys | size)) {
This can drop the explicit CONFIG_SWIOTLB check now (and make the remaining
conditional fit onto a single line).
From: David Stevens
Introduce a new dev_use_swiotlb function to guard swiotlb code, instead
of overloading dev_is_untrusted. This allows CONFIG_SWIOTLB to be
checked more broadly, so the swiotlb related code can be removed more
aggressively.
Signed-off-by: David Stevens
Reviewed-by: Robin