From: John Hubbard <jhubbard@nvidia.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Cc: Dave Airlie <airlied@gmail.com>, Miguel Ojeda <ojeda@kernel.org>,
Sima Vetter <sima@ffwll.ch>,
dri-devel <dri-devel@lists.freedesktop.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [git pull] drm for 6.18-rc1
Date: Fri, 3 Oct 2025 18:53:34 -0700 [thread overview]
Message-ID: <bd004ac5-9e51-4e90-a3a4-025d74941a38@nvidia.com> (raw)
In-Reply-To: <CANiq72kq5YHovH=_a9c0JQgfrAx9gRsQvVo1VfHd-FaupOp7rQ@mail.gmail.com>
On 10/2/25 2:04 PM, Miguel Ojeda wrote:
> On Thu, Oct 2, 2025 at 9:54 PM Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
...
> In any case, for you, my intention wasn't that you had to fight the
> formatting, but rather that after solving the conflict (without
> thinking about formatting) you would run `make ... rustfmt`, i.e.
This works really well.
The other piece of Rust for Linux lore we (nova developers) picked up
was, "connect rustfmt(1) to your editor's file save command". And that
works even better.
> instead of the other one, `rustfmtcheck` (which is intended for e.g.
> CIs).
>
> Leaving non-formatted files does hurt us, though... e.g. CIs check it,
> and I think people are generally happy about the simplicity of
> formatting on the Rust side.
Very happy! Far more so than I expected. Being able to *not* fuss around
with minor formatting details (while editing, rebasing, and reviewing)
has been absolutely transformative.
It's like taking off your backpack and just leaving it behind on a hike,
but without leaving anything important behind.
...except...
>
> So if the conflicts are already too frequent and/or painful to deal
> with, then I would say we should already start writing the imports in
> a way that reduces the conflict potential, yet making it pass
> `rustfmt`. It may be uglier than what some may like (depending on who
> one asks), but it keeps the `rustfmt`-clean property and eventually we
> may be able to get `rustfmt` to give us the formatting we want and
> migrate to that.
The main complaint with rustfmt is that it is extremely twitchy and
unstable with respect to one-line, vs. multi-line output.
*Especially* with "use" statements.
For example, on today's linux.git, I just now ran it, and you can guess
what happened: it changed its little mind about yet another use
statement! See below.
If we can make just the "use" statements stop jumping around between
single line vs. multi-line output, just that small change will make a
big difference in stamping out some of the day to day noise from this
tool.
And of course, extending that multi-line decision stability to other
areas will also be a welcome change.
$ make rustfmt
$ git diff
diff --git a/rust/kernel/alloc/kvec.rs b/rust/kernel/alloc/kvec.rs
index e94aebd084c8..1d6cc81bdeef 100644
--- a/rust/kernel/alloc/kvec.rs
+++ b/rust/kernel/alloc/kvec.rs
@@ -7,10 +7,7 @@
layout::ArrayLayout,
AllocError, Allocator, Box, Flags, NumaNode,
};
-use crate::{
- fmt,
- page::AsPageIter,
-};
+use crate::{fmt, page::AsPageIter};
use core::{
borrow::{Borrow, BorrowMut},
marker::PhantomData,
thanks,
--
John Hubbard
next prev parent reply other threads:[~2025-10-04 1:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-01 4:06 Dave Airlie
2025-10-01 20:25 ` Danilo Krummrich
2025-10-02 19:53 ` Linus Torvalds
2025-10-02 21:04 ` Miguel Ojeda
2025-10-04 1:53 ` John Hubbard [this message]
2025-10-04 2:17 ` Linus Torvalds
2025-10-04 9:36 ` Miguel Ojeda
2025-10-05 21:31 ` Maarten ter Huurne
2025-10-05 21:33 ` Linus Torvalds
2025-10-07 17:21 ` Miguel Ojeda
2025-10-07 18:35 ` Linus Torvalds
2025-10-07 19:24 ` Miguel Ojeda
2025-10-10 17:56 ` Miguel Ojeda
2025-10-03 9:13 ` Geert Uytterhoeven
2025-10-03 10:52 ` Dave Airlie
2025-10-03 18:09 ` Linus Torvalds
2025-10-03 20:02 ` Linus Torvalds
2025-10-03 20:30 ` Linus Torvalds
2025-10-04 14:39 ` Sasha Levin
2025-10-02 20:00 ` pr-tracker-bot
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=bd004ac5-9e51-4e90-a3a4-025d74941a38@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=ojeda@kernel.org \
--cc=sima@ffwll.ch \
--cc=torvalds@linux-foundation.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
Powered by JetHome