From: Robin Murphy Date: Wed, 26 Oct 2016 18:19:31 +0000 (+0100) Subject: arm64: Remove pointless WARN_ON in DMA teardown X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b7b941afe557638b29aa6bab7070cc706f3231c1;p=openwrt%2Fstaging%2Fblogic.git arm64: Remove pointless WARN_ON in DMA teardown We expect arch_teardown_dma_ops() to be called very late in a device's life, after it has been removed from its bus, and thus after the IOMMU bus notifier has run. As such, even if this funny little check did make sense, it's unlikely to achieve what it thinks it's trying to do anyway. It's a residual trace of an earlier implementation which didn't belong here from the start; belatedly snuff it out. Signed-off-by: Robin Murphy Acked-by: Will Deacon Signed-off-by: Catalin Marinas --- diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index 3f74d0d98de6..aa6c8f834d9e 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c @@ -938,11 +938,6 @@ static void __iommu_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, void arch_teardown_dma_ops(struct device *dev) { - struct iommu_domain *domain = iommu_get_domain_for_dev(dev); - - if (WARN_ON(domain)) - iommu_detach_device(domain, dev); - dev->archdata.dma_ops = NULL; }