diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2024-07-05 10:35:14 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2024-07-05 10:47:28 +0200 |
commit | 86634fa4e6aeff2e190616c304156899beb4d76b (patch) | |
tree | d63fd0480e4ad11b9bdf6b653a63464429a63360 /rust/kernel/alloc/vec_ext.rs | |
parent | 27aec396c48c6407a7586a35d79ac3fe387f2054 (diff) | |
parent | 22a40d14b572deb80c0648557f4bd502d7e83826 (diff) |
Merge v6.10-rc6 into drm-next
The exynos-next pull is based on a newer -rc than drm-next. hence
backmerge first to make sure the unrelated conflicts we accumulated
don't end up randomly in the exynos merge pull, but are separated out.
Conflicts are all benign: Adjacent changes in amdgpu and fbdev-dma
code, and cherry-pick conflict in xe.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'rust/kernel/alloc/vec_ext.rs')
-rw-r--r-- | rust/kernel/alloc/vec_ext.rs | 7 |
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. |