From: "Gary Guo" <gary@garyguo.net>
To: "Andrew Lunn" <andrew@lunn.ch>, "Gary Guo" <gary@garyguo.net>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Guru Das Srinagesh" <linux@gurudas.dev>,
"FUJITA Tomonori" <fujita.tomonori@gmail.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>, <netdev@vger.kernel.org>,
<rust-for-linux@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next 2/2] net: phy: qt2025: Use vertical import style
Date: Mon, 06 Jul 2026 17:15:25 +0100 [thread overview]
Message-ID: <DJRMF2RTW8QD.1NAXB4C3AX9EU@garyguo.net> (raw)
In-Reply-To: <c1d24c8b-1c1d-4784-88a6-3cbb519d0406@lunn.ch>
On Mon Jul 6, 2026 at 4:51 PM BST, Andrew Lunn wrote:
>> This is one of the quirks of rustfmt. Before style edition 2024, if an
>> identifier is all caps, it sorts it after non-all-caps identifiers. The
>> motivation was to ensure constants are ordered after types, however for things
>> like C45 it is actually a type, causing this weirdness.
>
> How often does the style edition change? Is there a 2026? How much
> changes in each one?
So far it has only changed once, with the only major change being the identifier
sorting that we discussed.
Rustfmt has quite strict backward compatibility, so misformatted code stays
misformatted. They use editions as boundaries to do bugfixes/improvements that
can re-format previously badly formatted code. There'll be new editions coming
but I don't expect it to be as major as 2026.
> At least in netdev, we tend to reject checkpatch.pl patches, which are
> mostly about style, unless they are part of a patchset adding new
> features. Style patches are mostly a waste of reviewer/maintainer
> time, because some actually break stuff, so need to be reviewed just
> as much as code adding new features. But style changes have a low ROI.
>
> So while there is currently not much rust code in the kernel, making
> style changes is not wasting too much reviewer/maintainer time, but as
> the amount of rust code goes up, you might see some subsystems
> rejecting such changes, or wanting to pin to a specific style edition,
> to reduce churn.
We can control what edition of rustfmt we use (even per subsystem level). So
there's no obligation to bump edition unless we want to do it (e.g. it formats
certain code better).
That said, like Miguel said, this can be pretty trivially reformatted treewide.
Best,
Gary
prev parent reply other threads:[~2026-07-06 16:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 5:38 [PATCH net-next 0/2] rust: net: Use kernel style vertical imports Guru Das Srinagesh
2026-07-06 5:38 ` [PATCH net-next 1/2] net: phy: ax88796b: Use vertical import style Guru Das Srinagesh
2026-07-06 13:05 ` Andrew Lunn
2026-07-06 13:40 ` Gary Guo
2026-07-06 13:53 ` Andrew Lunn
2026-07-06 13:45 ` Alice Ryhl
2026-07-06 5:38 ` [PATCH net-next 2/2] net: phy: qt2025: " Guru Das Srinagesh
2026-07-06 13:58 ` Andrew Lunn
2026-07-06 15:07 ` Gary Guo
2026-07-06 15:28 ` Miguel Ojeda
2026-07-06 15:51 ` Andrew Lunn
2026-07-06 16:08 ` Miguel Ojeda
2026-07-06 16:15 ` Gary Guo [this message]
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=DJRMF2RTW8QD.1NAXB4C3AX9EU@garyguo.net \
--to=gary@garyguo.net \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fujita.tomonori@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linux@gurudas.dev \
--cc=netdev@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=pabeni@redhat.com \
--cc=rust-for-linux@vger.kernel.org \
--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