lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251022.202754.1583747778621840789.fujita.tomonori@gmail.com>
Date: Wed, 22 Oct 2025 20:27:54 +0900 (JST)
From: FUJITA Tomonori <fujita.tomonori@...il.com>
To: dakr@...nel.org
Cc: aliceryhl@...gle.com, fujita.tomonori@...il.com,
 daniel.almeida@...labora.com, a.hindborg@...nel.org,
 alex.gaynor@...il.com, ojeda@...nel.org, anna-maria@...utronix.de,
 bjorn3_gh@...tonmail.com, boqun.feng@...il.com, frederic@...nel.org,
 gary@...yguo.net, jstultz@...gle.com, linux-kernel@...r.kernel.org,
 lossin@...nel.org, lyude@...hat.com, rust-for-linux@...r.kernel.org,
 sboyd@...nel.org, tglx@...utronix.de, tmgross@...ch.edu
Subject: Re: [PATCH v2 2/2] rust: Add read_poll_count_atomic function

On Tue, 21 Oct 2025 18:02:39 +0200
Danilo Krummrich <dakr@...nel.org> wrote:

> On 10/21/25 4:05 PM, Alice Ryhl wrote:
>> On Tue, Oct 21, 2025 at 02:35:34PM +0200, Danilo Krummrich wrote:
>>> Please replace the match statement with map().
>>>
>>> 	read_poll_count_atomic(
>>> 	    ...
>>> 	)
>>> 	.map(|_| ())
>>>
>> 
>> IMO, this should instead be:
>> 
>> 	read_poll_count_atomic(
>> 	    ...
>> 	)?
>> 	Ok(())
> 
> I think map() has the advantage that it is a bit more explicit about the fact
> that the return value is discarded intentionally.
> 
> But I'm fine with either version.

Then I'll go with 'Ok'.

I'll send to a different patch to update read_poll_wait's example for
the same change.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ