Re: [PATCH net-next 2/2] net: phy: qt2025: Use vertical import style

From: Gary Guo

Date: Mon Jul 06 2026 - 12:23:00 EST


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