public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Danilo Krummrich" <dakr@kernel.org>
Cc: "Greg KH" <gregkh@linuxfoundation.org>,
	"Onur Özkan" <work@onurozkan.dev>,
	rust-for-linux@vger.kernel.org, rafael@kernel.org,
	ojeda@kernel.org, boqun.feng@gmail.com, gary@garyguo.net,
	bjorn3_gh@protonmail.com, lossin@kernel.org,
	a.hindborg@kernel.org, aliceryhl@google.com, tmgross@umich.edu,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/1] rust: simplify `Adapter::id_info`
Date: Sat, 24 Jan 2026 22:20:26 +0900	[thread overview]
Message-ID: <DFWUMAUAZTAD.1F3OK9TZWTF0U@nvidia.com> (raw)
In-Reply-To: <DFQVNVYZCDPB.3IB8IA2KWUD4B@kernel.org>

On Sat Jan 17, 2026 at 9:53 PM JST, Danilo Krummrich wrote:
> On Sat Jan 17, 2026 at 1:07 PM CET, Greg KH wrote:
>> Does clippy complain about this one?
>
> No, it does not.
>
>> I don't have strong feelings either, but the original is "easier" for
>> those of us used to C code.
>
> I think it's a matter of preference. Personally, I like those functional
> characteristics of Rust and the corresponding possibility of compact expressions
> as long as it is not overdone.
>
> This case seems pretty simple though. :)

IIUC for this patch the consensus seems to be in favor of preserving the
original C-like style, but FWIW I found the new style proposed by Onur
easier to read.

I understand that it may not be intuitive unless one has some
familiarity with Rust, but it is a common way to write things in that
language and since it has graduated from its experimental status, it
doesn't seem judicious to me to artificially restrict its features.

  parent reply	other threads:[~2026-01-24 13:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-17  9:47 [PATCH v2 0/1] rust: simplify `Adapter::id_info` Onur Özkan
2026-01-17  9:47 ` [PATCH v2 1/1] " Onur Özkan
2026-01-17 10:00   ` Greg KH
2026-01-17 11:02     ` Onur Özkan
2026-01-17 12:07       ` Greg KH
2026-01-17 12:53         ` Danilo Krummrich
2026-01-20 15:01           ` Gary Guo
2026-01-20 16:00             ` Miguel Ojeda
2026-01-24 13:20           ` Alexandre Courbot [this message]
2026-01-17 12:56         ` Onur Özkan
2026-01-17 14:25       ` Miguel Ojeda

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=DFWUMAUAZTAD.1F3OK9TZWTF0U@nvidia.com \
    --to=acourbot@nvidia.com \
    --cc=a.hindborg@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rafael@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --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