[PATCH master 06/23] dma: remove common.h include from asm/dma.h

Ahmad Fatoum a.fatoum at pengutronix.de
Tue Apr 23 23:40:41 PDT 2024


<common.h> inclusion will lead to a recursive inclusion with incoming
changes, so avoid that by using the headers that are actually needed.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 arch/arm/include/asm/dma.h  | 5 ++++-
 arch/kvx/include/asm/dma.h  | 4 +++-
 arch/mips/include/asm/dma.h | 3 ++-
 arch/mips/lib/dma-default.c | 1 +
 4 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h
index 0774a11c5a30..d045f00c67cf 100644
--- a/arch/arm/include/asm/dma.h
+++ b/arch/arm/include/asm/dma.h
@@ -1,7 +1,10 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /* SPDX-FileCopyrightText: 2012 Marc Kleine-Budde <mkl at pengutronix.de> */
 
-#include <common.h>
+#include <linux/types.h>
+#include <linux/string.h>
+#include <xfuncs.h>
+#include <malloc.h>
 
 #define DMA_ALIGNMENT	64
 
diff --git a/arch/kvx/include/asm/dma.h b/arch/kvx/include/asm/dma.h
index c6f67e76d024..f1b54afe25f5 100644
--- a/arch/kvx/include/asm/dma.h
+++ b/arch/kvx/include/asm/dma.h
@@ -4,7 +4,9 @@
 #ifndef __ASM_DMA_H
 #define __ASM_DMA_H
 
-#include <common.h>
+#include <linux/types.h>
+#include <linux/build_bug.h>
+#include <malloc.h>
 
 #define DMA_ALIGNMENT	64
 
diff --git a/arch/mips/include/asm/dma.h b/arch/mips/include/asm/dma.h
index 5c5b6d5b3a58..dbcbfa40768d 100644
--- a/arch/mips/include/asm/dma.h
+++ b/arch/mips/include/asm/dma.h
@@ -6,7 +6,8 @@
 #ifndef __ASM_DMA_H
 #define __ASM_DMA_H
 
-#include <common.h>
+#include <linux/pagemap.h>
+#include <linux/types.h>
 #include <malloc.h>
 #include <xfuncs.h>
 #include <asm/addrspace.h>
diff --git a/arch/mips/lib/dma-default.c b/arch/mips/lib/dma-default.c
index 54e66654687f..74aa8af55c45 100644
--- a/arch/mips/lib/dma-default.c
+++ b/arch/mips/lib/dma-default.c
@@ -4,6 +4,7 @@
  */
 
 #include <dma.h>
+#include <linux/bug.h>
 #include <asm/io.h>
 
 void arch_sync_dma_for_cpu(void *vaddr, size_t size,
-- 
2.39.2




More information about the barebox mailing list