Re: [PATCH] rust: pci: Mark Device refcount methods inline
Alice Ryhl <[email protected]> Wed, 5 Aug 2026 09:52:23 +0200
| Newsgroups | org.kernel.vger.rust-for-linux,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci |
|---|---|
| Message-ID | <CAH5fLgghsXHTWfdQ8j44kXO3+Da-YzhJxxP8ncTbfmw-c=fW4A@mail.gmail.com> |
On Wed, Aug 5, 2026 at 1:24 AM Ethan Plant via B4 Relay <[email protected]> wrote: > > 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]> Reviewed-by: Alice Ryhl <[email protected]>