Re: [PATCH] opp: rust: mark OPP methods as inline

From: Viresh Kumar

Date: Mon May 25 2026 - 00:11:35 EST


On 24-05-26, 12:40, Nicolás Antinori wrote:
> When building the kernel using llvm-19.1.7-rust-1.85.0-x86_64, the
> following symbols are generated:
>
> $ nm vmlinux | grep ' _R'.*OPP | rustfilt
> ffffffff81801560 T <kernel::opp::OPP>::freq
> ffffffff81801540 T <kernel::opp::OPP as kernel::sync::aref::AlwaysRefCounted>::dec_ref
> ffffffff81801520 T <kernel::opp::OPP as kernel::sync::aref::AlwaysRefCounted>::inc_ref
>
> However, these Rust symbols are trivial wrappers around the
> `dev_pm_opp_get`, `dev_pm_opp_put` and `dev_pm_opp_get_freq_indexed`
> functions. It doesn't make sense to go through a trivial wrapper for
> these functions.
>
> After applying this patch, the above command will produce no output.
>
> Link: https://github.com/Rust-for-Linux/linux/issues/1145
> Suggested-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
> Signed-off-by: Nicolás Antinori <nico.antinori.7@xxxxxxxxx>
> ---
> rust/kernel/opp.rs | 3 +++
> 1 file changed, 3 insertions(+)

Applied. Thanks.

--
viresh