[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <966cc6950c3e8705462f330d2bd002d305ebbc93.1734477232.git.jtostler1@gmail.com>
Date: Tue, 17 Dec 2024 16:23:10 -0800
From: Jimmy Ostler <jtostler1@...il.com>
To: Danilo Krummrich <dakr@...nel.org>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>,
Wedson Almeida Filho <walmeida@...rosoft.com>,
Filipe Xavier <felipe_life@...e.com>,
Valentin Obst <kernel@...entinobst.de>,
Daniel Sedlak <daniel@...lak.dev>,
Alex Mantel <alexmantel93@...lbox.org>
Cc: rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org,
Jimmy Ostler <jtostler1@...il.com>
Subject: [PATCH v3 1/3] rust: error: Change `LayoutError` to internal
Add an implementation of `From<LayoutError> for Error` for the
`kernel::alloc::layout::LayoutError`.
Remove the implementation on `core::alloc::LayoutError`, because we
don't use it anywhere.
Signed-off-by: Jimmy Ostler <jtostler1@...il.com>
---
rust/kernel/error.rs | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/rust/kernel/error.rs b/rust/kernel/error.rs
index 914e8dec1abd..f6ecf09cb65f 100644
--- a/rust/kernel/error.rs
+++ b/rust/kernel/error.rs
@@ -4,9 +4,10 @@
//!
//! C header: [`include/uapi/asm-generic/errno-base.h`](srctree/include/uapi/asm-generic/errno-base.h)
-use crate::{alloc::AllocError, str::CStr};
-
-use core::alloc::LayoutError;
+use crate::{
+ alloc::{layout::LayoutError, AllocError},
+ str::CStr,
+};
use core::fmt;
use core::num::NonZeroI32;
--
2.47.1
Powered by blists - more mailing lists