summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/ionic/ionic_datapath.c
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2025-07-31 17:48:06 +0200
committerDanilo Krummrich <dakr@kernel.org>2025-08-11 23:20:53 +0200
commitfde578c86281f27b182680c7642836a0dbbd0be7 (patch)
treefdb8f1eb9f3588818a552756369cff6e2d09f861 /drivers/infiniband/hw/ionic/ionic_datapath.c
parentf87d597e8393f7038de046ed7f13bb176a4ead55 (diff)
rust: alloc: replace aligned_size() with Kmalloc::aligned_layout()
aligned_size() dates back to when Rust did support kmalloc() only, but is now used in ReallocFunc::call() and hence for all allocators. However, the additional padding applied by aligned_size() is only required by the kmalloc() allocator backend. Hence, replace aligned_size() with Kmalloc::aligned_layout() and use it for the affected allocators, i.e. kmalloc() and kvmalloc(), only. While at it, make Kmalloc::aligned_layout() public, such that Rust abstractions, which have to call subsystem specific kmalloc() based allocation primitives directly, can make use of it. Fixes: 8a799831fc63 ("rust: alloc: implement `ReallocFunc`") Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20250731154919.4132-2-dakr@kernel.org [ Remove `const` from Kmalloc::aligned_layout(). - Danilo ] Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/ionic/ionic_datapath.c')
0 files changed, 0 insertions, 0 deletions