From: Leon Romanovsky <leon@kernel.org>
To: Miguel Ojeda <ojeda@kernel.org>
Cc: "Marek Szyprowski" <m.szyprowski@samsung.com>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Robin Murphy" <robin.murphy@arm.com>,
iommu@lists.linux.dev, "Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
rust-for-linux@vger.kernel.org
Subject: Re: [PATCH] dma-mapping: add missing `inline` for `dma_free_attrs`
Date: Wed, 25 Mar 2026 10:34:41 +0200 [thread overview]
Message-ID: <20260325083441.GO814676@unreal> (raw)
In-Reply-To: <20260325015548.70912-1-ojeda@kernel.org>
On Wed, Mar 25, 2026 at 02:55:48AM +0100, Miguel Ojeda wrote:
> 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>
> ---
> Not sure if you would consider this a bug (I used "Fixes" and "Closes"
> because it was not originally intended) or whether you would want to
> backport it -- of course, feel free to edit the tags as you prefer!
>
> include/linux/dma-mapping.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
prev parent reply other threads:[~2026-03-25 8:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20260325015610eucas1p29097fe4c456890db026adb691da60c12@eucas1p2.samsung.com>
2026-03-25 1:55 ` [PATCH] dma-mapping: add missing `inline` for `dma_free_attrs` Miguel Ojeda
2026-03-25 7:02 ` Marek Szyprowski
2026-03-25 8:34 ` Leon Romanovsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260325083441.GO814676@unreal \
--to=leon@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=iommu@lists.linux.dev \
--cc=lossin@kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=ojeda@kernel.org \
--cc=robin.murphy@arm.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox