]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: dma: add zeroed constructor to `Coherent`
authorGary Guo <gary@garyguo.net>
Fri, 20 Mar 2026 19:45:38 +0000 (20:45 +0100)
committerDanilo Krummrich <dakr@kernel.org>
Mon, 23 Mar 2026 21:33:23 +0000 (22:33 +0100)
commitf84ecffa3f745572164c1269f20eec2589d432c9
tree4e20db9f00d0fb2f34bb57aed94827e80958677a
parentd9aee73c56ee971b08173071ad93fa5ebf00a32e
rust: dma: add zeroed constructor to `Coherent`

These constructors create a coherent container of a single object
instead of slice. They are named `zeroed` and `zeroed_with_attrs` to
emphasis that they are created initialized zeroed. It is intended that
there'll be new constructors that take `PinInit` instead of zeroing.

Signed-off-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Link: https://patch.msgid.link/20260320194626.36263-4-dakr@kernel.org
[ Use kernel import style. - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
rust/kernel/dma.rs
samples/rust/rust_dma.rs