[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a58qh1w8.fsf@kernel.org>
Date: Tue, 08 Apr 2025 21:46:47 +0200
From: Andreas Hindborg <a.hindborg@...nel.org>
To: "Miguel Ojeda" <miguel.ojeda.sandonis@...il.com>
Cc: "Benno Lossin" <benno.lossin@...ton.me>, "Abdiel Janulgue"
<abdiel.janulgue@...il.com>, <ojeda@...nel.org>, "Danilo Krummrich"
<dakr@...nel.org>, "Daniel Almeida" <daniel.almeida@...labora.com>,
"Robin Murphy" <robin.murphy@....com>, "Alex Gaynor"
<alex.gaynor@...il.com>, "Boqun Feng" <boqun.feng@...il.com>, "Gary Guo"
<gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, "Alice
Ryhl" <aliceryhl@...gle.com>, "Trevor Gross" <tmgross@...ch.edu>, "open
list:DMA MAPPING HELPERS DEVICE DRIVER API [RUST]"
<rust-for-linux@...r.kernel.org>, "Marek Szyprowski"
<m.szyprowski@...sung.com>, "open list:DMA MAPPING HELPERS"
<iommu@...ts.linux.dev>, "open list" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] rust: dma: convert the read/write macros to return
Result
"Miguel Ojeda" <miguel.ojeda.sandonis@...il.com> writes:
> On Tue, Apr 8, 2025 at 2:40 PM Andreas Hindborg <a.hindborg@...nel.org> wrote:
>>
>> But the `assert_eq!` would panic anyway if comparison fails, right?
>
> Previously the `?` generated by the macro would return out of the
> closure written by the sample, and thus it wouldn't reach the
> `assert_eq!`.
Right, I see. So the question is whether we want to have the assert
panic here or not, of we get an Err. I vote yes.
Best regards,
Andreas Hindborg
Powered by blists - more mailing lists