Re: [PATCH v2 10/11] rust: dma: drop `dma_read!` and `dma_write!` API
From: Andreas Hindborg
Date: Tue Apr 28 2026 - 08:26:16 EST
Gary Guo <gary@xxxxxxxxxxx> writes:
> The primitive read/write use case is covered by the `io_read!` and
> `io_write!` macro. The non-primitive use case was finicky; they should
> either be achieved using `CoherentBox` or `as_ref()/as_mut()` to assert the
> lack of concurrent access, or should be using memcpy-like APIs to express
> the non-atomic and tearable nature.
>
> Signed-off-by: Gary Guo <gary@xxxxxxxxxxx>
Reviewed-by: Andreas Hindborg <a.hindborg@xxxxxxxxxx>
Best regards,
Andreas Hindborg