diff mbox series

[2/2] drm/panic: fix overindented list items in documentation

Message ID 20250301231602.917580-2-ojeda@kernel.org (mailing list archive)
State New
Headers show
Series [1/2] drm/panic: use `div_ceil` to clean Clippy warning | expand

Commit Message

Miguel Ojeda March 1, 2025, 11:16 p.m. UTC
Starting with the upcoming Rust 1.86.0 (to be released 2025-04-03),
Clippy warns:

    error: doc list item overindented
       --> drivers/gpu/drm/drm_panic_qr.rs:914:5
        |
    914 | ///    will be encoded as binary segment, otherwise it will be encoded
        |     ^^^ help: try using `  ` (2 spaces)
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items

The overindentation is slightly hard to notice, since all the items
start with a backquote that makes it look OK, but it is there.

Thus fix it.

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
 drivers/gpu/drm/drm_panic_qr.rs | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Miguel Ojeda March 2, 2025, 6:54 a.m. UTC | #1
On Sun, Mar 2, 2025 at 12:17 AM Miguel Ojeda <ojeda@kernel.org> wrote:
>
> Starting with the upcoming Rust 1.86.0 (to be released 2025-04-03),
> Clippy warns:
>
>     error: doc list item overindented
>        --> drivers/gpu/drm/drm_panic_qr.rs:914:5
>         |
>     914 | ///    will be encoded as binary segment, otherwise it will be encoded
>         |     ^^^ help: try using `  ` (2 spaces)
>         |
>         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
>
> The overindentation is slightly hard to notice, since all the items
> start with a backquote that makes it look OK, but it is there.
>
> Thus fix it.
>
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

Fixes: cb5164ac43d0 ("drm/panic: Add a QR code panic screen")
Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is
pinned in older LTSs).

Cheers,
Miguel
Jarkko Sakkinen March 2, 2025, 4:50 p.m. UTC | #2
On Sun, Mar 02, 2025 at 07:54:00AM +0100, Miguel Ojeda wrote:
> On Sun, Mar 2, 2025 at 12:17 AM Miguel Ojeda <ojeda@kernel.org> wrote:
> >
> > Starting with the upcoming Rust 1.86.0 (to be released 2025-04-03),
> > Clippy warns:
> >
> >     error: doc list item overindented
> >        --> drivers/gpu/drm/drm_panic_qr.rs:914:5
> >         |
> >     914 | ///    will be encoded as binary segment, otherwise it will be encoded
> >         |     ^^^ help: try using `  ` (2 spaces)
> >         |
> >         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
> >
> > The overindentation is slightly hard to notice, since all the items
> > start with a backquote that makes it look OK, but it is there.
> >
> > Thus fix it.
> >
> > Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
> 
> Fixes: cb5164ac43d0 ("drm/panic: Add a QR code panic screen")
> Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is
> pinned in older LTSs).

(cosmetic) Nit:

I think you could just:

Cc: stable@vger.kernel.org # v6.12+

> 
> Cheers,
> Miguel
> 

BR, Jarkko
Miguel Ojeda March 2, 2025, 5:45 p.m. UTC | #3
On Sun, Mar 2, 2025 at 5:50 PM Jarkko Sakkinen <jarkko@kernel.org> wrote:
>
> (cosmetic) Nit:
>
> I think you could just:
>
> Cc: stable@vger.kernel.org # v6.12+

Thanks Jarkko -- I did something similar in the past, but sometimes
patches got backported too much because they could be applied.

Normally they don't hurt, but I try to be more explicit nowadays so
that the stable team can decide, and thus I copy-paste that line for
changes that are related to new compiler cleanups and similar.

Cheers,
Miguel
Jarkko Sakkinen March 2, 2025, 6:31 p.m. UTC | #4
On Sun, Mar 02, 2025 at 06:45:13PM +0100, Miguel Ojeda wrote:
> On Sun, Mar 2, 2025 at 5:50 PM Jarkko Sakkinen <jarkko@kernel.org> wrote:
> >
> > (cosmetic) Nit:
> >
> > I think you could just:
> >
> > Cc: stable@vger.kernel.org # v6.12+
> 
> Thanks Jarkko -- I did something similar in the past, but sometimes
> patches got backported too much because they could be applied.
> 
> Normally they don't hurt, but I try to be more explicit nowadays so
> that the stable team can decide, and thus I copy-paste that line for
> changes that are related to new compiler cleanups and similar.

Ah, ok, I guessed that you might have some backing idea on what you put
:-) Thanks for the explanation.

> 
> Cheers,
> Miguel
> 

BR, Jarkko
Miguel Ojeda March 2, 2025, 7:52 p.m. UTC | #5
On Sun, Mar 2, 2025 at 7:31 PM Jarkko Sakkinen <jarkko@kernel.org> wrote:
>
> Ah, ok, I guessed that you might have some backing idea on what you put
> :-) Thanks for the explanation.

You're welcome!

Cheers,
Miguel
Alice Ryhl March 3, 2025, 8:04 a.m. UTC | #6
On Sun, Mar 2, 2025 at 12:17 AM Miguel Ojeda <ojeda@kernel.org> wrote:
>
> Starting with the upcoming Rust 1.86.0 (to be released 2025-04-03),
> Clippy warns:
>
>     error: doc list item overindented
>        --> drivers/gpu/drm/drm_panic_qr.rs:914:5
>         |
>     914 | ///    will be encoded as binary segment, otherwise it will be encoded
>         |     ^^^ help: try using `  ` (2 spaces)
>         |
>         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
>
> The overindentation is slightly hard to notice, since all the items
> start with a backquote that makes it look OK, but it is there.
>
> Thus fix it.
>
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Jocelyn Falempe March 3, 2025, 9:41 a.m. UTC | #7
On 02/03/2025 00:16, Miguel Ojeda wrote:
> Starting with the upcoming Rust 1.86.0 (to be released 2025-04-03),
> Clippy warns:
> 
>      error: doc list item overindented
>         --> drivers/gpu/drm/drm_panic_qr.rs:914:5
>          |
>      914 | ///    will be encoded as binary segment, otherwise it will be encoded
>          |     ^^^ help: try using `  ` (2 spaces)
>          |
>          = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
> 
> The overindentation is slightly hard to notice, since all the items
> start with a backquote that makes it look OK, but it is there.
> 
> Thus fix it.

Thanks, it looks good to me.

Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>

> 
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
> ---
>   drivers/gpu/drm/drm_panic_qr.rs | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_panic_qr.rs b/drivers/gpu/drm/drm_panic_qr.rs
> index 8bb5e52d75cc..6903e2010cb9 100644
> --- a/drivers/gpu/drm/drm_panic_qr.rs
> +++ b/drivers/gpu/drm/drm_panic_qr.rs
> @@ -911,16 +911,16 @@ fn draw_all(&mut self, data: impl Iterator<Item = u8>) {
>   ///
>   /// * `url`: The base URL of the QR code. It will be encoded as Binary segment.
>   /// * `data`: A pointer to the binary data, to be encoded. if URL is NULL, it
> -///    will be encoded as binary segment, otherwise it will be encoded
> -///    efficiently as a numeric segment, and appended to the URL.
> +///   will be encoded as binary segment, otherwise it will be encoded
> +///   efficiently as a numeric segment, and appended to the URL.
>   /// * `data_len`: Length of the data, that needs to be encoded, must be less
> -///    than data_size.
> +///   than data_size.
>   /// * `data_size`: Size of data buffer, it should be at least 4071 bytes to hold
> -///    a V40 QR code. It will then be overwritten with the QR code image.
> +///   a V40 QR code. It will then be overwritten with the QR code image.
>   /// * `tmp`: A temporary buffer that the QR code encoder will use, to write the
> -///    segments and ECC.
> +///   segments and ECC.
>   /// * `tmp_size`: Size of the temporary buffer, it must be at least 3706 bytes
> -///    long for V40.
> +///   long for V40.
>   ///
>   /// # Safety
>   ///
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_panic_qr.rs b/drivers/gpu/drm/drm_panic_qr.rs
index 8bb5e52d75cc..6903e2010cb9 100644
--- a/drivers/gpu/drm/drm_panic_qr.rs
+++ b/drivers/gpu/drm/drm_panic_qr.rs
@@ -911,16 +911,16 @@  fn draw_all(&mut self, data: impl Iterator<Item = u8>) {
 ///
 /// * `url`: The base URL of the QR code. It will be encoded as Binary segment.
 /// * `data`: A pointer to the binary data, to be encoded. if URL is NULL, it
-///    will be encoded as binary segment, otherwise it will be encoded
-///    efficiently as a numeric segment, and appended to the URL.
+///   will be encoded as binary segment, otherwise it will be encoded
+///   efficiently as a numeric segment, and appended to the URL.
 /// * `data_len`: Length of the data, that needs to be encoded, must be less
-///    than data_size.
+///   than data_size.
 /// * `data_size`: Size of data buffer, it should be at least 4071 bytes to hold
-///    a V40 QR code. It will then be overwritten with the QR code image.
+///   a V40 QR code. It will then be overwritten with the QR code image.
 /// * `tmp`: A temporary buffer that the QR code encoder will use, to write the
-///    segments and ECC.
+///   segments and ECC.
 /// * `tmp_size`: Size of the temporary buffer, it must be at least 3706 bytes
-///    long for V40.
+///   long for V40.
 ///
 /// # Safety
 ///