Skip to content

Commit 2cdaff2

Browse files
ojedamszyprow
authored andcommitted
dma-mapping: add missing inline for dma_free_attrs
Under an UML build for an upcoming series [1], I got `-Wstatic-in-inline` for `dma_free_attrs`: BINDGEN rust/bindings/bindings_generated.rs - due to target missing In file included from rust/helpers/helpers.c:59: rust/helpers/dma.c:17:2: warning: static function 'dma_free_attrs' is used in an inline function with external linkage [-Wstatic-in-inline] 17 | dma_free_attrs(dev, size, cpu_addr, dma_handle, attrs); | ^ rust/helpers/dma.c:12:1: note: use 'static' to give inline function 'rust_helper_dma_free_attrs' internal linkage 12 | __rust_helper void rust_helper_dma_free_attrs(struct device *dev, size_t size, | ^ | static The issue is that `dma_free_attrs` was not marked `inline` when it was introduced alongside the rest of the stubs. Thus mark it. Fixes: ed6ccf1 ("dma-mapping: properly stub out the DMA API for !CONFIG_HAS_DMA") Closes: https://lore.kernel.org/rust-for-linux/[email protected]/ [1] Signed-off-by: Miguel Ojeda <[email protected]> Signed-off-by: Marek Szyprowski <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent f5ebf24 commit 2cdaff2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/linux/dma-mapping.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ static inline void *dma_alloc_attrs(struct device *dev, size_t size,
255255
{
256256
return NULL;
257257
}
258-
static void dma_free_attrs(struct device *dev, size_t size, void *cpu_addr,
259-
dma_addr_t dma_handle, unsigned long attrs)
258+
static inline void dma_free_attrs(struct device *dev, size_t size,
259+
void *cpu_addr, dma_addr_t dma_handle, unsigned long attrs)
260260
{
261261
}
262262
static inline void *dmam_alloc_attrs(struct device *dev, size_t size,

0 commit comments

Comments
 (0)