On Mon, Jan 08, 2024 at 11:24:35AM +0100, Ahmad Fatoum wrote: > <dma.h> will take care to define dma_alloc with DMA_ALIGNMENT as > alignment. As 32 is the default and we for some reason, use 64 for > sandbox, define DMA_ALIGNMENT and drop the now duplicate code. > > Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> > --- > arch/sandbox/include/asm/dma.h | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) Applied, thanks Sascha > > diff --git a/arch/sandbox/include/asm/dma.h b/arch/sandbox/include/asm/dma.h > index ac8b408aae0b..cafbb7fe6a4c 100644 > --- a/arch/sandbox/include/asm/dma.h > +++ b/arch/sandbox/include/asm/dma.h > @@ -12,11 +12,7 @@ > #include <linux/string.h> > #include <driver.h> > > -#define dma_alloc dma_alloc > -static inline void *dma_alloc(size_t size) > -{ > - return xmemalign(64, ALIGN(size, 64)); > -} > +#define DMA_ALIGNMENT 64 > > #define dma_alloc_coherent dma_alloc_coherent > static inline void *dma_alloc_coherent(size_t size, dma_addr_t *dma_handle) > -- > 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 |