mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH master] sandbox: dma: fix recursive dependency between headers
@ 2024-04-26 10:41 Ahmad Fatoum
  2024-04-26 10:50 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2024-04-26 10:41 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

If <dma.h> includes <linux/kernel.h> via <asm/dma.h>, it will end up
including <linux/slab.h>, which in turn includes <dma.h>.

This leads to use of symbols before definition, so remove the
<linux/kernel.h> definition.

Fixes: 9b12861830e0 ("include: linux/slab: use dma_alloc for kmalloc")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/sandbox/include/asm/dma.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/sandbox/include/asm/dma.h b/arch/sandbox/include/asm/dma.h
index ab84166846a2..2dbce1ad6c9a 100644
--- a/arch/sandbox/include/asm/dma.h
+++ b/arch/sandbox/include/asm/dma.h
@@ -8,7 +8,8 @@
 #ifndef __ASM_DMA_H
 #define __ASM_DMA_H
 
-#include <linux/kernel.h>
+#include <xfuncs.h>
+#include <linux/types.h>
 #include <linux/string.h>
 
 #define DMA_ALIGNMENT	64
-- 
2.39.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH master] sandbox: dma: fix recursive dependency between headers
  2024-04-26 10:41 [PATCH master] sandbox: dma: fix recursive dependency between headers Ahmad Fatoum
@ 2024-04-26 10:50 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-04-26 10:50 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Fri, Apr 26, 2024 at 12:41:47PM +0200, Ahmad Fatoum wrote:
> If <dma.h> includes <linux/kernel.h> via <asm/dma.h>, it will end up
> including <linux/slab.h>, which in turn includes <dma.h>.
> 
> This leads to use of symbols before definition, so remove the
> <linux/kernel.h> definition.
> 
> Fixes: 9b12861830e0 ("include: linux/slab: use dma_alloc for kmalloc")
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  arch/sandbox/include/asm/dma.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/arch/sandbox/include/asm/dma.h b/arch/sandbox/include/asm/dma.h
> index ab84166846a2..2dbce1ad6c9a 100644
> --- a/arch/sandbox/include/asm/dma.h
> +++ b/arch/sandbox/include/asm/dma.h
> @@ -8,7 +8,8 @@
>  #ifndef __ASM_DMA_H
>  #define __ASM_DMA_H
>  
> -#include <linux/kernel.h>
> +#include <xfuncs.h>
> +#include <linux/types.h>
>  #include <linux/string.h>
>  
>  #define DMA_ALIGNMENT	64
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-26 10:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-26 10:41 [PATCH master] sandbox: dma: fix recursive dependency between headers Ahmad Fatoum
2024-04-26 10:50 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox