rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Almeida <daniel.almeida@collabora.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: "Onur Özkan" <work@onurozkan.dev>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	daniel@sedlak.dev, dirk.behme@de.bosch.com, felipe_life@live.com,
	tamird@gmail.com, dakr@kernel.org, tmgross@umich.edu,
	aliceryhl@google.com, a.hindborg@kernel.org, lossin@kernel.org,
	bjorn3_gh@protonmail.com, gary@garyguo.net, boqun.feng@gmail.com,
	alex.gaynor@gmail.com, ojeda@kernel.org
Subject: Re: [PATCH v2 1/1] rust: refactor to_result to return the original value
Date: Tue, 9 Sep 2025 17:12:00 -0300	[thread overview]
Message-ID: <E64F356B-7EC5-4F46-9ADF-610CBF249651@collabora.com> (raw)
In-Reply-To: <CANiq72=NrS1cFJec6sm7ZY-UPqrzxHKVvPu67Rze02Fg_xeWpQ@mail.gmail.com>



> On 9 Sep 2025, at 17:05, Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote:
> 
> On Tue, Sep 9, 2025 at 7:43 PM Onur Özkan <work@onurozkan.dev> wrote:
>> 
>> That change was incompatible with v1 (due to the different signature of
>> to_result), which fails to build with my patch. This version (v2)
>> fixes the issue introduced in v1.
> 
> In that case, please try to avoid mentioning "broken" or "fix" or
> similar, i.e. there is nothing broken in the tree itself (the commit
> message should mention what is done in the patch). If you want to give
> extra clarifications, then you can always add them outside the commit
> message, below the `---` line.
> 
> In addition, if the changes here are required to be done all at once,
> then please do not rebase on top of regulator -- this would need to go

Merely rebasing on top of the rust tree will crate a conflict with his previous regulator patch.

My suggestion is to just wait for rc1.

> into the global Rust tree. Otherwise, any changes that does not need
> to go at the same time should go separately so that it is easier to
> land.
> 
> Finally, I am not sure I follow the `unwrap_or(0)` here. If one passes
> a negative enough `i64`, wouldn't that mean `Ok` starts to be
> returned? Currently all negatives that are not codes are supposed to
> be bugs.
> 
> Either way, I think this should probably go on top of
> https://lore.kernel.org/rust-for-linux/20250829192243.678079-3-ojeda@kernel.org/,
> since that adds documentation, and thus it would be nice to adjust
> that one to whatever the generic one should do now, especially if the
> semantics are changing.
> 
> Thanks!
> 
> Cheers,
> Miguel
> 


  reply	other threads:[~2025-09-09 20:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-09 17:00 [PATCH v2 0/1] rust: refactor to_result to return the original value Onur Özkan
2025-09-09 17:00 ` [PATCH v2 1/1] " Onur Özkan
2025-09-09 17:17   ` Miguel Ojeda
2025-09-09 17:43     ` Onur Özkan
2025-09-09 18:25       ` Onur
2025-09-09 18:25       ` Daniel Almeida
2025-09-09 18:53         ` Onur Özkan
2025-09-09 20:13           ` Daniel Almeida
2025-09-09 20:05       ` Miguel Ojeda
2025-09-09 20:12         ` Daniel Almeida [this message]
2025-09-09 20:25           ` Miguel Ojeda
2025-09-10  4:50         ` Onur Özkan
2025-09-10  6:26   ` Alice Ryhl
2025-09-10 10:58     ` Onur Özkan
2025-09-10 11:05       ` Alice Ryhl
2025-09-10 12:47         ` Onur Özkan
2025-09-10 12:50           ` Alice Ryhl
2025-09-10 12:55             ` Onur Özkan
2025-09-12  8:41   ` 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=E64F356B-7EC5-4F46-9ADF-610CBF249651@collabora.com \
    --to=daniel.almeida@collabora.com \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=daniel@sedlak.dev \
    --cc=dirk.behme@de.bosch.com \
    --cc=felipe_life@live.com \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@gmail.com \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.dev \
    /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).