aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/rust/kernel
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-07-01 14:16:48 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-07-01 14:16:48 +0200
commit33827dc4ad8982c987ad4066d643693403ce7fd0 (patch)
tree93337503859f8f990fde2132394c809ce7d09850 /rust/kernel
parentserial: sc16is7xx: hardware reset chip if reset-gpios is defined in DT (diff)
parentLinux 6.10-rc6 (diff)
downloadwireguard-linux-33827dc4ad8982c987ad4066d643693403ce7fd0.tar.xz
wireguard-linux-33827dc4ad8982c987ad4066d643693403ce7fd0.zip
Merge 6.10-rc6 into tty-next
This resolves the merge issues in the 8250 code due to some reverts in 6.10-rc6 in the console changes. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/kernel')
-rw-r--r--rust/kernel/alloc/vec_ext.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/rust/kernel/alloc/vec_ext.rs b/rust/kernel/alloc/vec_ext.rs
index e9a81052728a..1297a4be32e8 100644
--- a/rust/kernel/alloc/vec_ext.rs
+++ b/rust/kernel/alloc/vec_ext.rs
@@ -4,7 +4,6 @@
use super::{AllocError, Flags};
use alloc::vec::Vec;
-use core::ptr;
/// Extensions to [`Vec`].
pub trait VecExt<T>: Sized {
@@ -141,7 +140,11 @@ impl<T> VecExt<T> for Vec<T> {
// `krealloc_aligned`. A `Vec<T>`'s `ptr` value is not guaranteed to be NULL and might be
// dangling after being created with `Vec::new`. Instead, we can rely on `Vec<T>`'s capacity
// to be zero if no memory has been allocated yet.
- let ptr = if cap == 0 { ptr::null_mut() } else { old_ptr };
+ let ptr = if cap == 0 {
+ core::ptr::null_mut()
+ } else {
+ old_ptr
+ };
// SAFETY: `ptr` is valid because it's either NULL or comes from a previous call to
// `krealloc_aligned`. We also verified that the type is not a ZST.