Re: [PATCH v6] rust: aref: make `AlwaysRefCounted::inc_ref` an associated function
Andreas Hindborg <[email protected]> Wed, 05 Aug 2026 11:26:34 +0200
| Newsgroups | org.kernel.vger.rust-for-linux,dev.linux.lists.driver-core,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-block,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci,org.kernel.vger.linux-pm,org.kernel.vger.linux-pwm,org.kernel.vger.linux-security-module,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
"Trevor Chan" <[email protected]> writes: > `AlwaysRefCounted::inc_ref` is a function that shouldn't be called lightly. > > To prevent accidentally calling it, change `inc_ref` to be an associated function. > > Modify all `AlwaysRefCounted` implementors to work with this change. > > Suggested-by: Benno Lossin <[email protected]> > Link: https://github.com/Rust-for-Linux/linux/issues/1177 > Reviewed-by: Alice Ryhl <[email protected]> > Signed-off-by: Trevor Chan <[email protected]> Reviewed-by: Andreas Hindborg <[email protected]> Best regards, Andreas Hindborg