Skip to content

Commit

Permalink
rust: block: fix formatting in GenDisk doc
Browse files Browse the repository at this point in the history
Align bullet points and improve indentation in the `Invariants` section
of the `GenDisk` struct documentation for better readability.

[ Yutaro is also working on implementing the lint we suggested to catch
  this sort of issue in upstream Rust:

    rust-lang/rust-clippy#13601
    rust-lang/rust-clippy#13711

  Thanks a lot! - Miguel ]

Fixes: 3253aba ("rust: block: introduce `kernel::block::mq` module")
Signed-off-by: Yutaro Ohno <[email protected]>
Reviewed-by: Boqun Feng <[email protected]>
Acked-by: Andreas Hindborg <[email protected]>
Link: https://lore.kernel.org/r/ZxkcU5yTFCagg_lX@ohnotp
Signed-off-by: Miguel Ojeda <[email protected]>
  • Loading branch information
ohno418 authored and ojeda committed Dec 18, 2024
1 parent 517743c commit 0c5928d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rust/kernel/block/mq/gen_disk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ impl GenDiskBuilder {
///
/// # Invariants
///
/// - `gendisk` must always point to an initialized and valid `struct gendisk`.
/// - `gendisk` was added to the VFS through a call to
/// `bindings::device_add_disk`.
/// - `gendisk` must always point to an initialized and valid `struct gendisk`.
/// - `gendisk` was added to the VFS through a call to
/// `bindings::device_add_disk`.
pub struct GenDisk<T: Operations> {
_tagset: Arc<TagSet<T>>,
gendisk: *mut bindings::gendisk,
Expand Down

0 comments on commit 0c5928d

Please sign in to comment.