From: Andreas Hindborg <a.hindborg@kernel.org>
To: "Oliver Mangold" <oliver.mangold@pm.me>
Cc: <linux-kernel@vger.kernel.org>, <rust-for-linux@vger.kernel.org>
Subject: Re: [PATCH] Rust: Implement a unique reference type URef supplementing ARef
Date: Fri, 28 Feb 2025 13:16:57 +0100 [thread overview]
Message-ID: <87ldtqmfgm.fsf@kernel.org> (raw)
In-Reply-To: <Z8GepRBy6rQtTqh5@mango> (Oliver Mangold's message of "Fri, 28 Feb 2025 11:31:53 +0000")
"Oliver Mangold" <oliver.mangold@pm.me> writes:
> On 250228 1210, Andreas Hindborg wrote:
>
> Hi Andreas,
>
>> Wrap at 75 characters please :)
>
>> See `AlwaysRefCounted` for reference on formatting.
>
>> Please use back ticks for types: [`ARef`], [`URref`]
>
>> For your next version, can you run `make rustfmt`?:
>
> Sorry for all that. Apparently I need to get used a bit more to how things
> are supposed to be done here. Please be patient with me for a bit :)
>
>> When the trait is unsafe, we need to specify the conditions under which
>> it is safe to implement:
>
> Of course. Sorry, missed that.
>
>> I would prefer `UniqueRef`. I know `ARef` has a different naming scheme,
>> but I think `UniqueRef` is sufficiently short and significantly more
>> descriptive than `URef`.
>
> Ok, will do. Honestly I also prefer UniqueRef.
>
>> Also it would be great if you include your "rust: for fix dec_ref for
>> URef<Request>" folded in.
>
> Are your sure? Wouldn't the patches have to be ordered like this?
>
> this patch (mine)
> rust: block: change `queue_rq` request type to unique (yours)
> rust: block: simplify reference counting scheme (yours)
> rust: for fix dec_ref for URef<Request> (mine)
>
> IOW, the latter requests depends on the 2 patches of yours, while these depend on this patch. You know what I mean?
Sorry, yes I meant "rust: allow to override dec_ref() for URef's".
Either include it in the series or fold it in, whatever makes most
sense.
The request update can go later.
Best regards,
Andreas Hindborg
next prev parent reply other threads:[~2025-02-28 12:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <jeyp4dToznpiAQYWHAABrEBIHVfxaIf7ntexop3d2AXQgnlytw3J8YFkX8E8EFKc1-USf_fVZqKhEmuNGE3O0w==@protonmail.internalid>
2025-02-21 8:04 ` [PATCH] Rust: Implement a unique reference type URef supplementing ARef Oliver Mangold
2025-02-21 8:12 ` Greg KH
2025-02-21 8:35 ` Oliver Mangold
2025-02-21 9:33 ` Andreas Hindborg
2025-02-28 11:10 ` Andreas Hindborg
2025-02-28 11:25 ` Andreas Hindborg
2025-02-28 11:31 ` Oliver Mangold
2025-02-28 12:16 ` Andreas Hindborg [this message]
2025-02-28 13:17 ` Miguel Ojeda
2025-03-04 6:19 ` 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=87ldtqmfgm.fsf@kernel.org \
--to=a.hindborg@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oliver.mangold@pm.me \
--cc=rust-for-linux@vger.kernel.org \
/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).