diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2026-06-22 23:10:08 -0700 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2026-06-22 23:10:08 -0700 |
| commit | 7a0e692a0381254b2f77c54dec100cd3325a6fdf (patch) | |
| tree | 2d2ce96c3471a02166323e88cd7ccab1d43b1cd4 /rust/kernel/alloc/allocator | |
| parent | fb402386af4cdce108ff991a796386de55439735 (diff) | |
| parent | a6ac4e24c1a8a533bb61035184fdcc7eede4cc8d (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 7.2 merge window.
Diffstat (limited to 'rust/kernel/alloc/allocator')
| -rw-r--r-- | rust/kernel/alloc/allocator/iter.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/rust/kernel/alloc/allocator/iter.rs b/rust/kernel/alloc/allocator/iter.rs index 5759f86029b7..e0a70b7a744a 100644 --- a/rust/kernel/alloc/allocator/iter.rs +++ b/rust/kernel/alloc/allocator/iter.rs @@ -42,15 +42,9 @@ impl<'a> Iterator for VmallocPageIter<'a> { return None; } - // TODO: Use `NonNull::add()` instead, once the minimum supported compiler version is - // bumped to 1.80 or later. - // // SAFETY: `offset` is in the interval `[0, (self.page_count() - 1) * page::PAGE_SIZE]`, // hence the resulting pointer is guaranteed to be within the same allocation. - let ptr = unsafe { self.buf.as_ptr().add(offset) }; - - // SAFETY: `ptr` is guaranteed to be non-null given that it is derived from `self.buf`. - let ptr = unsafe { NonNull::new_unchecked(ptr) }; + let ptr = unsafe { self.buf.add(offset) }; // SAFETY: // - `ptr` is a valid pointer to a `Vmalloc` allocation. |
