Re: [PATCH 1/3] rust: uaccess: generalize write_dma() to accept any Coherent<T>
From: Alice Ryhl
Date: Wed Mar 25 2026 - 07:51:28 EST
On Wed, Mar 25, 2026 at 01:39:15AM +0100, Danilo Krummrich wrote:
> Generalize write_dma() from &Coherent<[u8]> to &Coherent<T> where
> T: KnownSize + AsBytes + ?Sized. The function body only uses as_ptr()
> and size(), which work for any such T, so there is no reason to
> restrict it to byte slices.
>
> Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>
Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>