dma-mapping: mark dma_alloc_need_uncached as __always_inline
authorChristoph Hellwig <hch@lst.de>
Mon, 8 Jul 2019 19:55:27 +0000 (12:55 -0700)
committerChristoph Hellwig <hch@lst.de>
Mon, 8 Jul 2019 21:19:33 +0000 (14:19 -0700)
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 <rdunlap@infradead.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
include/linux/dma-noncoherent.h

index 53ee36ecdf3749e4df62b741d31f8eaec8dc55d9..3813211a9aadef0e2dc2f96267faf914cad2987d 100644 (file)
@@ -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))