Skip to content

Commit

Permalink
dma-mapping: mark dma_alloc_need_uncached as __always_inline
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Randy Dunlap <[email protected]> # build-tested
  • Loading branch information
Christoph Hellwig committed Jul 8, 2019
1 parent 2ee7a4e commit 15ffe5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/dma-noncoherent.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 15ffe5e

Please sign in to comment.