rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Onur Özkan" <work@onurozkan.dev>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: rust-for-linux@vger.kernel.org, ojeda@kernel.org,
	alex.gaynor@gmail.com, boqun.feng@gmail.com, gary@garyguo.net,
	bjorn3_gh@protonmail.com, lossin@kernel.org,
	a.hindborg@kernel.org, aliceryhl@google.com, tmgross@umich.edu,
	dakr@kernel.org, tamird@gmail.com
Subject: Re: [PATCH v3 2/2] rust: drop `error::to_result` and utilize `ToResult`
Date: Mon, 13 Oct 2025 22:03:03 +0300	[thread overview]
Message-ID: <20251013220303.15f95186@nimda.home> (raw)
In-Reply-To: <CANiq72kvNWT1fXYkXUwmyC5jHfYufdx+koD6Y2xsWzE9YhLLEg@mail.gmail.com>

On Mon, 13 Oct 2025 19:04:09 +0200
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote:

> On Mon, Oct 13, 2025 at 2:43 PM Onur Özkan <work@onurozkan.dev> wrote:
> >
> >  29 files changed, 253 insertions(+), 210 deletions(-)
> 
> Something like this will be hard to merge if we wait for all
> Acked-bys. It is best to do the migration over time and split it per
> subsystem.

Sure. To do that, I need to keep the current `error::to_result`
untouched. I guess that would be fine.

> Also, you should Cc all the relevant maintainers/reviewers -- you are
> touching quite a few subsystems. :)
> 

Right, sorry.

> > I haven't included all the improvements made possible by the new
> > design since that could conflict with other ongoing patches [2].
> > Once this patch is approved and applied, I am planning to follow up
> > with creating a "good first issue" on [3] for those additional
> > changes.
> 
> I would suggest including a few examples of the improvements in an RFC
> patch on top. In other words, we need to show the improvements (or at
> least some key examples) to justify a change, rather than doing it
> later.
> 
> For instance, with the changes in this patch, I see a lot of `Ok(())`
> added because now one needs to discard the value, which isn't great...
> It indicates that the common case may not be keeping the value, and
> thus we may want two APIs for this.
> 
> Thus, similarly, we may be able to spot a similar pattern in those
> examples too.
> 

Thank you for your feedback Miguel. I will wait sometime to collect more
feedback and then I will prepare an RFC based on all the input. I would
feel more confident sending the RFC after receiving more feedback from
more Rust kernel developers.

-Onur

> Thanks!
> 
> Cheers,
> Miguel


  reply	other threads:[~2025-10-13 19:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-13 12:41 [PATCH v3 0/2] rust: refactor `to_result` Onur Özkan
2025-10-13 12:41 ` [PATCH v3 1/2] rust: add `ToResult` trait Onur Özkan
2025-10-13 12:48   ` Onur Özkan
2025-10-13 12:41 ` [PATCH v3 2/2] rust: drop `error::to_result` and utilize `ToResult` Onur Özkan
2025-10-13 17:04   ` Miguel Ojeda
2025-10-13 19:03     ` Onur Özkan [this message]
2025-10-13 18:29   ` Alice Ryhl

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=20251013220303.15f95186@nimda.home \
    --to=work@onurozkan.dev \
    --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=gary@garyguo.net \
    --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 \
    /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).