lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2025122011-elves-plywood-07e5@gregkh>
Date: Sat, 20 Dec 2025 09:40:40 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Danilo Krummrich <dakr@...nel.org>
Cc: rafael@...nel.org, ojeda@...nel.org, boqun.feng@...il.com,
	gary@...yguo.net, bjorn3_gh@...tonmail.com, lossin@...nel.org,
	a.hindborg@...nel.org, aliceryhl@...gle.com, tmgross@...ch.edu,
	mmaurer@...gle.com, linux-kernel@...r.kernel.org,
	rust-for-linux@...r.kernel.org
Subject: Re: [PATCH] rust: debugfs: use "kernel vertical" style for imports

On Thu, Dec 18, 2025 at 05:56:11PM +0100, Danilo Krummrich wrote:
> Convert all imports in the debugfs Rust module to use "kernel vertical"
> style.
> 
> With this subsequent patches neither introduce unrelated changes nor
> leave an inconsistent import pattern.
> 
> While at it, drop unnecessary imports covered by prelude::*.
> 
> Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
> Signed-off-by: Danilo Krummrich <dakr@...nel.org>
> ---
>  rust/kernel/debugfs.rs                   | 46 ++++++++++++++++++------
>  rust/kernel/debugfs/callback_adapters.rs | 21 +++++++----
>  rust/kernel/debugfs/entry.rs             | 14 +++++---
>  rust/kernel/debugfs/file_ops.rs          | 25 ++++++++-----
>  rust/kernel/debugfs/traits.rs            | 43 ++++++++++++++++------
>  5 files changed, 109 insertions(+), 40 deletions(-)
> 
> diff --git a/rust/kernel/debugfs.rs b/rust/kernel/debugfs.rs
> index facad81e8290..536a320334bf 100644
> --- a/rust/kernel/debugfs.rs
> +++ b/rust/kernel/debugfs.rs
> @@ -8,28 +8,52 @@
>  // When DebugFS is disabled, many parameters are dead. Linting for this isn't helpful.
>  #![cfg_attr(not(CONFIG_DEBUG_FS), allow(unused_variables))]
>  
> -use crate::fmt;
> -use crate::prelude::*;
> -use crate::str::CStr;
>  #[cfg(CONFIG_DEBUG_FS)]
>  use crate::sync::Arc;
> -use crate::uaccess::UserSliceReader;
> -use core::marker::PhantomData;
> -use core::marker::PhantomPinned;
> +use crate::{
> +    fmt,
> +    prelude::*,
> +    str::CStr,
> +    uaccess::UserSliceReader, //

While I hate the // use here, I have hope that one day the compiler will
be fixed to allow this...

Acked-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ