summaryrefslogtreecommitdiffstats
path: root/rust/kernel/alloc/allocator
diff options
context:
space:
mode:
authorMiguel Ojeda <ojeda@kernel.org>2026-04-07 10:40:11 +0200
committerMiguel Ojeda <ojeda@kernel.org>2026-04-07 10:40:11 +0200
commit7ab26eb5a2b4009344580117ef05981867e0c7d7 (patch)
tree9af98db4676c960d9fca7367965170898ee555f6 /rust/kernel/alloc/allocator
parent36f5a2b09e650b82d7b2a106e3b93af48c2010d9 (diff)
parent2e2f8b5a065683f4530ee71363875da1a20f5a7f (diff)
downloadlinux-7ab26eb5a2b4009344580117ef05981867e0c7d7.tar.gz
linux-7ab26eb5a2b4009344580117ef05981867e0c7d7.zip
Merge patch series "rust: bump minimum Rust and `bindgen` versions"
As proposed in the past in e.g. LPC 2025 and the Maintainers Summit [1], we are going to follow Debian Stable's Rust versions as our minimum supported version. Debian Trixie was released with a Rust 1.85.0 toolchain [2], which it still uses to this day [3] (i.e. no update to Rust 1.85.1). Debian Trixie was released with `bindgen` 0.71.1, which it also still uses to this day [4]. Debian Trixie's release happened on 2025-08-09 [5], which means that a fair amount of time has passed since its release for kernel developers to upgrade. Thus bump the minimum to the new versions, i.e. - Rust: 1.78.0 -> 1.85.0 - bindgen: 0.65.1 -> 0.71.1 There are a few main parts to the series, in this order: - A few cleanups that can be performed before the bumps. - The Rust bump (and its cleanups). - The `bindgen` bump (and its cleanups). - Documentation updates. - The `cfi_encoding` patch, added here, which needs the bump. - The per-version flags support and a Clippy cleanup on top. Link: https://lwn.net/Articles/1050174/ [1] Link: https://www.debian.org/releases/trixie/release-notes/whats-new.en.html#desktops-and-well-known-packages [2] Link: https://packages.debian.org/trixie/rustc [3] Link: https://packages.debian.org/trixie/bindgen [4] Link: https://www.debian.org/releases/trixie/ [5] Link: https://patch.msgid.link/20260405235309.418950-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/allocator')
-rw-r--r--rust/kernel/alloc/allocator/iter.rs8
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.