* [PATCH] rust: macros: fix indentation in `module!`'s doc comment
@ 2024-08-13 13:09 Yutaro Ohno
2024-08-13 13:14 ` Miguel Ojeda
0 siblings, 1 reply; 5+ messages in thread
From: Yutaro Ohno @ 2024-08-13 13:09 UTC (permalink / raw)
To: Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho, Boqun Feng,
Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
Alice Ryhl, Martin Rodriguez Reboredo, Aswin Unnikrishnan,
FUJITA Tomonori, Trevor Gross
Cc: Yutaro Ohno, rust-for-linux
Clippy warns about list content in a doc comment that doesn't have extra
spaces at the beginning of a new line [1], like this:
```rust
/// * Do nothing.
/// * Then do something. Whatever it is needs done,
/// it should be done right now.
```
The suggested format is:
```rust
/// * Do nothing.
/// * Then do something. Whatever it is needs done,
/// it should be done right now.
```
This commit adds extra indentation to the `module!`'s doc comment to
suppress the warning.
Link: https://rust-lang.github.io/rust-clippy/master/index.html#/doc_lazy_continuation [1]
Signed-off-by: Yutaro Ohno <yutaro.ono.418@gmail.com>
---
rust/macros/lib.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rust/macros/lib.rs b/rust/macros/lib.rs
index 159e75292970..5be0cb9db3ee 100644
--- a/rust/macros/lib.rs
+++ b/rust/macros/lib.rs
@@ -94,7 +94,7 @@
/// - `license`: ASCII string literal of the license of the kernel module (required).
/// - `alias`: array of ASCII string literals of the alias names of the kernel module.
/// - `firmware`: array of ASCII string literals of the firmware files of
-/// the kernel module.
+/// the kernel module.
#[proc_macro]
pub fn module(ts: TokenStream) -> TokenStream {
module::module(ts)
--
2.46.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] rust: macros: fix indentation in `module!`'s doc comment
2024-08-13 13:09 [PATCH] rust: macros: fix indentation in `module!`'s doc comment Yutaro Ohno
@ 2024-08-13 13:14 ` Miguel Ojeda
2024-08-13 13:22 ` Yutaro Ohno
2024-08-14 6:08 ` Additional patches for rust-fixes? (was: Re: [PATCH] rust: macros: fix indentation in `module!`'s doc comment) Dirk Behme
0 siblings, 2 replies; 5+ messages in thread
From: Miguel Ojeda @ 2024-08-13 13:14 UTC (permalink / raw)
To: Yutaro Ohno
Cc: Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho, Boqun Feng,
Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
Alice Ryhl, Martin Rodriguez Reboredo, Aswin Unnikrishnan,
FUJITA Tomonori, Trevor Gross, rust-for-linux
On Tue, Aug 13, 2024 at 3:09 PM Yutaro Ohno <yutaro.ono.418@gmail.com> wrote:
>
> Clippy warns about list content in a doc comment that doesn't have extra
> spaces at the beginning of a new line [1], like this:
>
> ```rust
> /// * Do nothing.
> /// * Then do something. Whatever it is needs done,
> /// it should be done right now.
> ```
>
> The suggested format is:
>
> ```rust
> /// * Do nothing.
> /// * Then do something. Whatever it is needs done,
> /// it should be done right now.
> ```
>
> This commit adds extra indentation to the `module!`'s doc comment to
> suppress the warning.
>
> Link: https://rust-lang.github.io/rust-clippy/master/index.html#/doc_lazy_continuation [1]
> Signed-off-by: Yutaro Ohno <yutaro.ono.418@gmail.com>
Thanks Yutaro -- this was fixed already in the `rust-fixes` branch,
which is going to Linus soon.
Nevertheless, the patch looks good to me, and it has a nice commit message! :)
Cheers,
Miguel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] rust: macros: fix indentation in `module!`'s doc comment
2024-08-13 13:14 ` Miguel Ojeda
@ 2024-08-13 13:22 ` Yutaro Ohno
2024-08-14 6:08 ` Additional patches for rust-fixes? (was: Re: [PATCH] rust: macros: fix indentation in `module!`'s doc comment) Dirk Behme
1 sibling, 0 replies; 5+ messages in thread
From: Yutaro Ohno @ 2024-08-13 13:22 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho, Boqun Feng,
Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
Alice Ryhl, Martin Rodriguez Reboredo, Aswin Unnikrishnan,
FUJITA Tomonori, Trevor Gross, rust-for-linux
On 08/13, Miguel Ojeda wrote:
> On Tue, Aug 13, 2024 at 3:09 PM Yutaro Ohno <yutaro.ono.418@gmail.com> wrote:
> >
> > Clippy warns about list content in a doc comment that doesn't have extra
> > spaces at the beginning of a new line [1], like this:
> >
> > ```rust
> > /// * Do nothing.
> > /// * Then do something. Whatever it is needs done,
> > /// it should be done right now.
> > ```
> >
> > The suggested format is:
> >
> > ```rust
> > /// * Do nothing.
> > /// * Then do something. Whatever it is needs done,
> > /// it should be done right now.
> > ```
> >
> > This commit adds extra indentation to the `module!`'s doc comment to
> > suppress the warning.
> >
> > Link: https://rust-lang.github.io/rust-clippy/master/index.html#/doc_lazy_continuation [1]
> > Signed-off-by: Yutaro Ohno <yutaro.ono.418@gmail.com>
>
> Thanks Yutaro -- this was fixed already in the `rust-fixes` branch,
> which is going to Linus soon.
>
> Nevertheless, the patch looks good to me, and it has a nice commit message! :)
>
> Cheers,
> Miguel
Oh, I see. Thank you for letting me know!
Thanks,
Yutaro
^ permalink raw reply [flat|nested] 5+ messages in thread
* Additional patches for rust-fixes? (was: Re: [PATCH] rust: macros: fix indentation in `module!`'s doc comment)
2024-08-13 13:14 ` Miguel Ojeda
2024-08-13 13:22 ` Yutaro Ohno
@ 2024-08-14 6:08 ` Dirk Behme
2024-08-14 10:46 ` Miguel Ojeda
1 sibling, 1 reply; 5+ messages in thread
From: Dirk Behme @ 2024-08-14 6:08 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho, Boqun Feng,
Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
Alice Ryhl, Martin Rodriguez Reboredo, Aswin Unnikrishnan,
FUJITA Tomonori, Trevor Gross, rust-for-linux, Yutaro Ohno
On 13.08.2024 15:14, Miguel Ojeda wrote:
...
> the `rust-fixes` branch,
> which is going to Linus soon.
Sorry for being off-topic ;)
But would it make sense to try to get the (not existing yet) fixes for
the bss symbols export and the lockdep key registration topics identified in
https://rust-for-linux.zulipchat.com/#narrow/stream/288089-General/topic/6.2E11.2E0-rc1.3A.20rust.2Fkernel.2Fblock.2Fmq.2Ers.3A.20doctest.20lock.20warning/near/460073942
into this -rc cycle, still?
Best regards
Dirk
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Additional patches for rust-fixes? (was: Re: [PATCH] rust: macros: fix indentation in `module!`'s doc comment)
2024-08-14 6:08 ` Additional patches for rust-fixes? (was: Re: [PATCH] rust: macros: fix indentation in `module!`'s doc comment) Dirk Behme
@ 2024-08-14 10:46 ` Miguel Ojeda
0 siblings, 0 replies; 5+ messages in thread
From: Miguel Ojeda @ 2024-08-14 10:46 UTC (permalink / raw)
To: Dirk Behme
Cc: Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho, Boqun Feng,
Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
Alice Ryhl, Martin Rodriguez Reboredo, Aswin Unnikrishnan,
FUJITA Tomonori, Trevor Gross, rust-for-linux, Yutaro Ohno
On Wed, Aug 14, 2024 at 8:08 AM Dirk Behme <dirk.behme@de.bosch.com> wrote:
>
> But would it make sense to try to get the (not existing yet) fixes for
> the bss symbols export and the lockdep key registration topics identified in
>
> https://rust-for-linux.zulipchat.com/#narrow/stream/288089-General/topic/6.2E11.2E0-rc1.3A.20rust.2Fkernel.2Fblock.2Fmq.2Ers.3A.20doctest.20lock.20warning/near/460073942
>
> into this -rc cycle, still?
That would delay what we already have ready, and we don't even have
patches for those in the list yet. So I prefer to send another PR
later if needed.
Cheers,
Miguel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-08-14 10:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-13 13:09 [PATCH] rust: macros: fix indentation in `module!`'s doc comment Yutaro Ohno
2024-08-13 13:14 ` Miguel Ojeda
2024-08-13 13:22 ` Yutaro Ohno
2024-08-14 6:08 ` Additional patches for rust-fixes? (was: Re: [PATCH] rust: macros: fix indentation in `module!`'s doc comment) Dirk Behme
2024-08-14 10:46 ` Miguel Ojeda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).