diff mbox series

[2/2] ARM/dma-mapping: remove the dma_coherent member of struct dev_archdata

Message ID 20221006074824.521457-3-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [1/2] ARM/dma-mappіng: don't override ->dma_coherent when set from a bus notifier | expand

Commit Message

Christoph Hellwig Oct. 6, 2022, 7:48 a.m. UTC
Since commit ae626eb97376 ("ARM/dma-mapping: use dma-direct
unconditionally") only the dma_coherent flag in struct device is used,
so remove the now write only flag in struct dev_archdata.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/arm/include/asm/device.h | 1 -
 arch/arm/mm/dma-mapping.c     | 4 +---
 2 files changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/arch/arm/include/asm/device.h b/arch/arm/include/asm/device.h
index 8754c0f5fc904..c6beb1708c64b 100644
--- a/arch/arm/include/asm/device.h
+++ b/arch/arm/include/asm/device.h
@@ -9,7 +9,6 @@  struct dev_archdata {
 #ifdef CONFIG_ARM_DMA_USE_IOMMU
 	struct dma_iommu_mapping	*mapping;
 #endif
-	unsigned int dma_coherent:1;
 	unsigned int dma_ops_setup:1;
 };
 
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index bfc7476f14114..f60d6b4afe5df 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -1775,10 +1775,8 @@  void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
 	 * here, but instead have to make sure we only set but never clear it
 	 * for now.
 	 */
-	if (coherent) {
-		dev->archdata.dma_coherent = true;
+	if (coherent)
 		dev->dma_coherent = true;
-	}
 
 	/*
 	 * Don't override the dma_ops if they have already been set. Ideally