summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMiguel Ojeda <ojeda@kernel.org>2026-03-25 04:55:48 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-04-02 14:09:36 +0300
commitb07431f47fe22a2dc5374707a85d469fe7b50e05 (patch)
tree478d3f8bbb70f5f29b4c0e4e0544e765cc716d21 /include/linux
parentc0e696a74b19e07d3d1e5fd5f1e59b28cf591e07 (diff)
downloadlinux-b07431f47fe22a2dc5374707a85d469fe7b50e05.tar.xz
dma-mapping: add missing `inline` for `dma_free_attrs`
[ Upstream commit 2cdaff22ed26f1e619aa2b43f27bb84f2c6ef8f8 ] 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: ed6ccf10f24b ("dma-mapping: properly stub out the DMA API for !CONFIG_HAS_DMA") Closes: https://lore.kernel.org/rust-for-linux/20260322194616.89847-1-ojeda@kernel.org/ [1] Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Link: https://lore.kernel.org/r/20260325015548.70912-1-ojeda@kernel.org Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/dma-mapping.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 22b9099927fa..ac7803e3fa61 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -195,8 +195,8 @@ static inline void *dma_alloc_attrs(struct device *dev, size_t size,
{
return NULL;
}
-static void dma_free_attrs(struct device *dev, size_t size, void *cpu_addr,
- dma_addr_t dma_handle, unsigned long attrs)
+static inline void dma_free_attrs(struct device *dev, size_t size,
+ void *cpu_addr, dma_addr_t dma_handle, unsigned long attrs)
{
}
static inline void *dmam_alloc_attrs(struct device *dev, size_t size,