rust: block: fix formatting in GenDisk doc
Subsystems (2)
PATCH 1/1 rust: block: fix formatting in GenDisk doc
Align bullet points and improve indentation in the Invariants section of the GenDisk struct documentation for better readability.
--- rust/kernel/block/mq/gen_disk.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
rust/kernel/block/mq/gen_disk.rs +3 -3
@@ -174,9 +174,9 @@ pub fn build<T: Operations>(/// /// # 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 ,
Signature · 1 line
2.47.0
Quoted 5 lines · Yutaro Ohno
Align bullet points and improve indentation in the
Invariantssection of theGenDiskstruct documentation for better readability.Fixes 3253aba3408a ("rust: block: introduce `kernel::block::mq` module")Signed-off-by Yutaro Ohno <[email protected]>
This looks good to me, but not sure we need a "Fixes:" tag, Miguel?
Regards,
Boqun
Quoted 24 lines
--- rust/kernel/block/mq/gen_disk.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)rust/kernel/block/mq/gen_disk.rs +3
-3@@ -174,9 +174,9 @@ pub fn build<T: Operations>(/// /// # 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 ,Signature · 1 line
2.47.0
Quoted 2 lines · Boqun Feng
This looks good to me, but not sure we need a "Fixes:" tag, Miguel?
I think it is fine either way (it depends on who you ask).
Personally, I don't mind having it or not, but sometimes I may nevertheless take trivial fixes like this one through rust-next instead of rust-fixes.
Thanks!
Cheers,
Miguel
Quoted 6 lines · Yutaro Ohno
Align bullet points and improve indentation in the
Invariantssection of theGenDiskstruct documentation for better readability.Fixes 3253aba3408a ("rust: block: introduce `kernel::block::mq` module")Signed-off-by Yutaro Ohno <[email protected]>
Andreas: happy to apply this through rust-next if needed.
It would be good to have some automated checking on this, just like doc_lazy_continuation does, so I opened:
https://github.com/rust-lang/rust-clippy/issues/13601
Cheers,
Miguel
Quoted 2 lines · Miguel Ojeda
Andreas: happy to apply this through
rust-nextif needed.
Ping -- do you want me to take it?
Thanks!
Cheers,
Miguel
Andreas Hindborg
maintainerQuoted 6 lines · Miguel Ojeda
Quoted 2 lines · Miguel Ojeda
Andreas: happy to apply this through
rust-nextif needed.Ping -- do you want me to take it?
Sure, go ahead 👍
Best regards,
Andreas Hindborg
Quoted 16 lines · Yutaro Ohno
Align bullet points and improve indentation in the
Invariantssection of theGenDiskstruct documentation for better readability.Fixes 3253aba3408a ("rust: block: introduce `kernel::block::mq` module")Signed-off-by Yutaro Ohno <[email protected]>--- rust/kernel/block/mq/gen_disk.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)rust/kernel/block/mq/gen_disk.rs +0
-0@@ -174,9 +174,9 @@ pub fn build<T: Operations>(/// /// # Invariants
rust/kernel/block/mq/gen_disk.rs pub fn build<T: Operations>( · line 182
Quoted 10 lines
rust/kernel/block/mq/gen_disk.rs +3
-3/// -/// - `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 ,
Best regards,
Andreas Hindborg
Miguel Ojeda
AppliedQuoted 6 lines · Yutaro Ohno
Align bullet points and improve indentation in the
Invariantssection of theGenDiskstruct documentation for better readability.Fixes 3253aba3408a ("rust: block: introduce `kernel::block::mq` module")Signed-off-by Yutaro Ohno <[email protected]>
Applied to rust-next -- thanks everyone!
[ Yutaro is also working on implementing the lint we suggested to catch
this sort of issue in upstream Rust:
https://github.com/rust-lang/rust-clippy/issues/13601
https://github.com/rust-lang/rust-clippy/pull/13711
Thanks a lot! - Miguel ]
Since it doesn't affect the rendered output as far as I can see and it is not really urgent, I have put it in -next. However, I kept the Fixes tag -- if https://github.com/rust-lang/rust-clippy/pull/13711
gets merged and we start using it, it may be an actual fix that could need to be backported eventually, so it doesn't hurt to keep it around, and if it gets autoselected, that is fine too.
Cheers,
Miguel