Re: [PATCH net-next 1/2] net: phy: ax88796b: Use vertical import style
From: "Gary Guo" <gary@garyguo.net>
Date: 2026-07-06 13:40:49
Also in:
lkml, rust-for-linux
From: "Gary Guo" <gary@garyguo.net>
Date: 2026-07-06 13:40:49
Also in:
lkml, rust-for-linux
On Mon Jul 6, 2026 at 2:05 PM BST, Andrew Lunn wrote:
On Sun, Jul 05, 2026 at 10:38:40PM -0700, Guru Das Srinagesh wrote:quoted
Convert `use` imports to vertical layout for better readability and maintainability. Signed-off-by: Guru Das Srinagesh <redacted> --- drivers/net/phy/ax88796b_rust.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)diff --git a/drivers/net/phy/ax88796b_rust.rs b/drivers/net/phy/ax88796b_rust.rs index 2d24628a4e58..5a21fe09bd62 100644 --- a/drivers/net/phy/ax88796b_rust.rs +++ b/drivers/net/phy/ax88796b_rust.rs@@ -5,7 +5,12 @@ //! //! C version of this driver: [`drivers/net/phy/ax88796b.c`](./ax88796b.c) use kernel::{ - net::phy::{self, reg::C22, DeviceId, Driver}, + net::phy::{ + self, + reg::C22, + DeviceId, + Driver, // + },A question from somebody who does not know rust. Does the order of the elements in the list matter? Linux has a pattern of sorting multi line lists, because it reduces merge conflicts. Can this list be sorted? Andrew
This is sorted list, albeit in ASCIIbetical order instead of alphabetical. The order is enforced by rustfmt. This is not optimal so in Rust style edition 2024 it is actually recommended to use alphabetical instead, however we haven't opted into that style edition yet. Best, Gary