Re: [PATCH] rust: pci: Mark Device refcount methods inline

[email protected] Tue, 04 Aug 2026 23:25:31 +0000
Newsgroups org.kernel.vger.linux-pci
Message-ID <[email protected]>
> From: Ethan Plant <[email protected]>
> 
> When building the kernel, the following Rust symbols are generated:
> $ nm vmlinux | grep ' _R' | rustfilt | grep -E 'pci::Device.*(inc_ref|dec_ref)'
> ... T <kernel::pci::Device as kernel::sync::aref::AlwaysRefCounted>::dec_ref
> ... T <kernel::pci::Device as kernel::sync::aref::AlwaysRefCounted>::inc_ref
> 
> These Rust symbols are trivial wrappers around pci_dev_put() and
> pci_dev_get(), respectively. It doesn't make sense to go through a
> trivial wrapper for these functions, so mark them inline.
> 
> Suggested-by: Alice Ryhl <[email protected]>
> Link: https://github.com/Rust-for-Linux/linux/issues/1145
> Signed-off-by: Ethan Plant <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1