Re: [PATCH v9 7/8] rust: Add read_poll_timeout functions
From: FUJITA Tomonori
Date: Tue Jan 28 2025 - 23:41:10 EST
On Tue, 28 Jan 2025 11:52:42 +0100
Fiona Behrens <me@xxxxxxxxxx> wrote:
>> diff --git a/rust/kernel/io/poll.rs b/rust/kernel/io/poll.rs
>> new file mode 100644
>> index 000000000000..7a503cf643a1
>> --- /dev/null
>> +++ b/rust/kernel/io/poll.rs
>> @@ -0,0 +1,79 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +
>> +//! IO polling.
>> +//!
>> +//! C header: [`include/linux/iopoll.h`](srctree/include/linux/iopoll.h).
>> +
>> +use crate::{
>> + cpu::cpu_relax,
>> + error::{code::*, Result},
>> + time::{delay::fsleep, Delta, Instant},
>> +};
>> +
>> +use core::panic::Location;
>> +
>> +/// Polls periodically until a condition is met or a timeout is reached.
>> +///
>> +/// Public but hidden since it should only be used from public macros.
>
> This states the function should be hidden, but I donʼt see a `#[doc(hidden)]` in here so bit confused by that comment what part now is hidden.
Oops, this comment is the older implementation; it should have been
deleted. I'll fix.