projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6357e2
)
rust: error: import `kernel`'s `LayoutError` instead of `core`'s
author
Jimmy Ostler
<jtostler1@gmail.com>
Fri, 20 Dec 2024 06:25:31 +0000
(22:25 -0800)
committer
Miguel Ojeda
<ojeda@kernel.org>
Mon, 13 Jan 2025 22:45:13 +0000
(23:45 +0100)
Import the internal (`kernel::alloc`) version of `LayoutError` instead
of the `core::alloc` one.
In particular, this results in switching the type in the existing
`From<LayoutError> for Error` implementation.
Acked-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Jimmy Ostler <jtostler1@gmail.com>
Link:
https://lore.kernel.org/r/fe58a02189e8804a9eabdd01cb1927d4c491d79c.1734674670.git.jtostler1@gmail.com
[ Reworded commit. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/kernel/error.rs
patch
|
blob
|
blame
|
history
diff --git
a/rust/kernel/error.rs
b/rust/kernel/error.rs
index 914e8dec1abd7871fd25d637aa9fd1f21c711438..f6ecf09cb65f4ebe9b88da68b3830ae79aa4f182 100644
(file)
--- 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;