From: Greg KH <gregkh@linuxfoundation.org>
To: Danilo Krummrich <dakr@kernel.org>
Cc: rafael@kernel.org, ojeda@kernel.org, boqun.feng@gmail.com,
gary@garyguo.net, bjorn3_gh@protonmail.com, lossin@kernel.org,
a.hindborg@kernel.org, aliceryhl@google.com, tmgross@umich.edu,
mmaurer@google.com, linux-kernel@vger.kernel.org,
rust-for-linux@vger.kernel.org
Subject: Re: [PATCH] rust: debugfs: use "kernel vertical" style for imports
Date: Sat, 20 Dec 2025 09:40:40 +0100 [thread overview]
Message-ID: <2025122011-elves-plywood-07e5@gregkh> (raw)
In-Reply-To: <20251218165626.450264-1-dakr@kernel.org>
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@kernel.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@linuxfoundation.org>
next prev parent reply other threads:[~2025-12-20 8:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 16:56 Danilo Krummrich
2025-12-20 8:40 ` Greg KH [this message]
2025-12-22 15:57 ` Danilo Krummrich
2025-12-28 7:52 ` Alexandre Courbot
2025-12-28 7:53 ` Alexandre Courbot
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=2025122011-elves-plywood-07e5@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=mmaurer@google.com \
--cc=ojeda@kernel.org \
--cc=rafael@kernel.org \
--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
all inboxes | Powered by JetHome®