From: "Benno Lossin" <lossin@kernel.org>
To: "Gent Binaku" <binakugent@gmail.com>, <rust-for-linux@vger.kernel.org>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Benno Lossin" <benno.lossin@proton.me>
Subject: Re: [PATCH] Rust associative function
Date: Wed, 20 Aug 2025 23:07:23 +0200 [thread overview]
Message-ID: <DC7K8B01IN1J.CFOV0Z934HMH@kernel.org> (raw)
In-Reply-To: <20250820210225.124288-1-binakugent@gmail.com>
Hi,
Thanks for the patch!
On Wed Aug 20, 2025 at 11:02 PM CEST, Gent Binaku wrote:
> Currently `AlwaysRefCounted::inc_ref` is implemented as a method
> taking `&self`. However, this function should not be called lightly.
> To prevent accidental usage, convert it into an associated function
> instead of a method.
>
> This aligns with the intended API safety model and makes it clearer
> that `inc_ref` is not part of the usual object manipulation methods.
>
> Suggested-by: Benno Lossin <benno.lossin@proton.me>
Please use my <lossin@kernel.org> email instead.
> Link: https://github.com/Rust-for-Linux/linux/issues/1177
> Signed-off-by: Gent Binaku <binakugent@gmail.com>
> ---
> rust/kernel/auxiliary.rs | 4 ++--
> rust/kernel/block/mq/request.rs | 4 ++--
> rust/kernel/cred.rs | 4 ++--
> rust/kernel/device.rs | 4 ++--
> rust/kernel/device/property.rs | 4 ++--
> rust/kernel/drm/device.rs | 4 ++--
> rust/kernel/drm/gem/mod.rs | 4 ++--
> rust/kernel/fs/file.rs | 8 ++++----
> rust/kernel/mm.rs | 8 ++++----
> rust/kernel/mm/mmput_async.rs | 4 ++--
> rust/kernel/pci.rs | 4 ++--
> rust/kernel/pid_namespace.rs | 4 ++--
> rust/kernel/platform.rs | 4 ++--
> rust/kernel/sync/aref.rs | 6 +++---
> rust/kernel/task.rs | 4 ++--
> 15 files changed, 35 insertions(+), 35 deletions(-)
We already have someone else working on this, see [1]. Not sure if you
two are coordinating.
You also didn't choose a meaningful commit title.
[1]: https://lore.kernel.org/all/CACvsgUCBk5Dt2yBSy9_NA0z38-wP68vvBX7XDYgJGinTURT1kQ@mail.gmail.com
---
Cheers,
Benno
next prev parent reply other threads:[~2025-08-20 21:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 21:02 [PATCH] Rust associative function Gent Binaku
2025-08-20 21:07 ` Benno Lossin [this message]
2025-08-26 13:42 ` kernel test robot
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=DC7K8B01IN1J.CFOV0Z934HMH@kernel.org \
--to=lossin@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=binakugent@gmail.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=ojeda@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).