]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: dma: use NonNull<T> instead of *mut T
authorDanilo Krummrich <dakr@kernel.org>
Mon, 3 Nov 2025 19:06:50 +0000 (20:06 +0100)
committerDanilo Krummrich <dakr@kernel.org>
Tue, 11 Nov 2025 08:45:23 +0000 (19:45 +1100)
commitededb7bcdfdbcfbb7af93e3a543165a9553e1683
tree5e2c9b9c3488a32b6c54b43ad793fb14d05bbe22
parentf7afdc473794ab71d38475755be72dc95e361c31
rust: dma: use NonNull<T> instead of *mut T

In struct CoherentAllocation, use NonNull<T> instead of a raw *mut T for
the CPU address; the CPU address of a valid CoherentAllocation won't
ever be NULL.

Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20251103190655.2326191-2-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
rust/kernel/dma.rs