From: Christoph Hellwig Date: Mon, 8 Jul 2019 19:55:27 +0000 (-0700) Subject: dma-mapping: mark dma_alloc_need_uncached as __always_inline X-Git-Tag: v5.3-rc1~117^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15ffe5e1acf5fe1512e98b20702e46ce9f25e2f7;p=thirdparty%2Fkernel%2Flinux.git dma-mapping: mark dma_alloc_need_uncached as __always_inline Without the __always_inline at least i386 configs that have CONFIG_OPTIMIZE_INLINING set seem fail to inline dma_alloc_need_uncached, leading to a linker error because of undefined symbols. Reported-by: Randy Dunlap Signed-off-by: Christoph Hellwig Acked-by: Randy Dunlap # build-tested --- diff --git a/include/linux/dma-noncoherent.h b/include/linux/dma-noncoherent.h index 53ee36ecdf374..3813211a9aade 100644 --- a/include/linux/dma-noncoherent.h +++ b/include/linux/dma-noncoherent.h @@ -23,7 +23,7 @@ static inline bool dev_is_dma_coherent(struct device *dev) /* * Check if an allocation needs to be marked uncached to be coherent. */ -static inline bool dma_alloc_need_uncached(struct device *dev, +static __always_inline bool dma_alloc_need_uncached(struct device *dev, unsigned long attrs) { if (dev_is_dma_coherent(dev))