dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Benno Lossin" <lossin@kernel.org>
To: "Tamir Duberstein" <tamird@gmail.com>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"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>,
	"Jens Axboe" <axboe@kernel.dk>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Brendan Higgins" <brendan.higgins@linux.dev>,
	"David Gow" <davidgow@google.com>, "Rae Moar" <rmoar@google.com>,
	nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	linux-block@vger.kernel.org, linux-kselftest@vger.kernel.org,
	kunit-dev@googlegroups.com
Subject: Re: [PATCH 7/9] rust: pin-init: use `kernel::{fmt,prelude::fmt!}`
Date: Wed, 09 Jul 2025 23:58:22 +0200	[thread overview]
Message-ID: <DB7V0GL2HVMV.BR1JSWQPDMC3@kernel.org> (raw)
In-Reply-To: <CAJ-ks9nNc_pThtb+gHUcjEnvR6V0RAEG0tkv+_DHYYjXs1N7=A@mail.gmail.com>

On Wed Jul 9, 2025 at 11:01 PM CEST, Tamir Duberstein wrote:
> On Wed, Jul 9, 2025 at 4:18 PM Benno Lossin <lossin@kernel.org> wrote:
>>
>> On Wed Jul 9, 2025 at 10:00 PM CEST, Tamir Duberstein wrote:
>> > Reduce coupling to implementation details of the formatting machinery by
>> > avoiding direct use for `core`'s formatting traits and macros.
>> >
>> > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> > Reviewed-by: Alice Ryhl <aliceryhl@google.com>
>> > Signed-off-by: Tamir Duberstein <tamird@gmail.com>
>> > ---
>> >  rust/kernel/init.rs | 4 ++--
>> >  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> I usually prefix patches to init.rs with `rust: init`. I'll fix it up
>> when picking the patch or Miguel can do it if he takes it:
>>
>> Acked-by: Benno Lossin <lossin@kernel.org>
>
> Actually, squinting at this patch more closely now, I think this isn't
> what you had in mind. The comment says "Dummy error that can be
> constructed outside the `kernel` crate." but the error now comes from
> the kernel crate :(

It's a re-export, so the comment still holds.

> Perhaps you could suggest a different modification that would both
> meet the original intent and allow references to core::fmt to
> disappear?

The code comes from a time when `Error::from_errno` was `pub(crate)`,
but that was changed some time ago... Now we can just remove the
`FromErrno` trait entirely from that example. Feel free to do that in
this series or as a standalone patch.

---
Cheers,
Benno

  reply	other threads:[~2025-07-09 21:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-09 19:59 [PATCH 0/9] rust: use `kernel::{fmt,prelude::fmt!}` Tamir Duberstein
2025-07-09 20:00 ` [PATCH 1/9] gpu: nova-core: " Tamir Duberstein
2025-07-09 20:00 ` [PATCH 2/9] rust: alloc: " Tamir Duberstein
2025-07-09 20:00 ` [PATCH 3/9] rust: block: " Tamir Duberstein
2025-07-09 20:00 ` [PATCH 4/9] rust: device: " Tamir Duberstein
2025-07-09 20:00 ` [PATCH 5/9] rust: file: " Tamir Duberstein
2025-07-09 20:00 ` [PATCH 6/9] rust: kunit: " Tamir Duberstein
2025-07-09 20:00 ` [PATCH 7/9] rust: pin-init: " Tamir Duberstein
2025-07-09 20:18   ` Benno Lossin
2025-07-09 21:01     ` Tamir Duberstein
2025-07-09 21:58       ` Benno Lossin [this message]
2025-07-09 22:36         ` Tamir Duberstein
2025-07-09 22:50           ` Tamir Duberstein
2025-07-09 20:00 ` [PATCH 8/9] rust: seq_file: " Tamir Duberstein
2025-07-14 21:08   ` Tamir Duberstein
2025-07-09 20:00 ` [PATCH 9/9] rust: sync: " Tamir Duberstein
2025-07-12  8:27 ` [PATCH 0/9] rust: " Benno Lossin
2025-07-14 11:16 ` Danilo Krummrich

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=DB7V0GL2HVMV.BR1JSWQPDMC3@kernel.org \
    --to=lossin@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=airlied@gmail.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=axboe@kernel.dk \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=brendan.higgins@linux.dev \
    --cc=dakr@kernel.org \
    --cc=davidgow@google.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=ojeda@kernel.org \
    --cc=rafael@kernel.org \
    --cc=rmoar@google.com \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --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).