Skip to content

Commit

Permalink
rust: io_mem.rs: improve IoMem's docstring
Browse files Browse the repository at this point in the history
IoMem's docstring currently states that const generic SIZE specifies an
address's size. More precisely, it specifies the size of the memory area
the address points to.

Improve the wording.

Signed-off-by: Philipp Stanner <[email protected]>
Signed-off-by: Andreas Hindborg <[email protected]>
  • Loading branch information
Philipp Stanner authored and metaspace committed Mar 4, 2024
1 parent 11d003d commit 7b72ead
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rust/kernel/io_mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ impl Resource {
///
/// # Invariants
///
/// `ptr` is a non-null and valid address of at least `SIZE` bytes and returned by an `ioremap`
/// variant. `ptr` is also 8-byte aligned.
/// `ptr` is a non-null and valid address of a memory area of a length of at
/// least `SIZE` bytes. It is returned by an `ioremap` variant. `ptr` is also
/// 8-byte aligned.
///
/// # Examples
///
Expand Down

0 comments on commit 7b72ead

Please sign in to comment.