public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/panic: remove spurious empty line to clean warning
@ 2024-11-25 23:33 Miguel Ojeda
  2024-11-26  9:03 ` Jocelyn Falempe
  2024-12-09 23:57 ` Miguel Ojeda
  0 siblings, 2 replies; 7+ messages in thread
From: Miguel Ojeda @ 2024-11-25 23:33 UTC (permalink / raw)
  To: Jocelyn Falempe, Miguel Ojeda, Alex Gaynor, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, rust-for-linux,
	dri-devel, linux-kernel, patches, stable

Clippy in the upcoming Rust 1.83.0 spots a spurious empty line since the
`clippy::empty_line_after_doc_comments` warning is now enabled by default
given it is part of the `suspicious` group [1]:

    error: empty line after doc comment
       --> drivers/gpu/drm/drm_panic_qr.rs:931:1
        |
    931 | / /// They must remain valid for the duration of the function call.
    932 | |
        | |_
    933 |   #[no_mangle]
    934 | / pub unsafe extern "C" fn drm_panic_qr_generate(
    935 | |     url: *const i8,
    936 | |     data: *mut u8,
    937 | |     data_len: usize,
    ...   |
    940 | |     tmp_size: usize,
    941 | | ) -> u8 {
        | |_______- the comment documents this function
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
        = note: `-D clippy::empty-line-after-doc-comments` implied by `-D warnings`
        = help: to override `-D warnings` add `#[allow(clippy::empty_line_after_doc_comments)]`
        = help: if the empty line is unintentional remove it

Thus remove the empty line.

Cc: stable@vger.kernel.org
Fixes: cb5164ac43d0 ("drm/panic: Add a QR code panic screen")
Link: https://github.com/rust-lang/rust-clippy/pull/13091 [1]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
I added the Fixes and stable tags since it would be nice to keep the 6.12 LTS
Clippy-clean (since that one is the first that supports several Rust compilers).

 drivers/gpu/drm/drm_panic_qr.rs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_panic_qr.rs b/drivers/gpu/drm/drm_panic_qr.rs
index 09500cddc009..ef2d490965ba 100644
--- a/drivers/gpu/drm/drm_panic_qr.rs
+++ b/drivers/gpu/drm/drm_panic_qr.rs
@@ -929,7 +929,6 @@ fn draw_all(&mut self, data: impl Iterator<Item = u8>) {
 /// * `tmp` must be valid for reading and writing for `tmp_size` bytes.
 ///
 /// They must remain valid for the duration of the function call.
-
 #[no_mangle]
 pub unsafe extern "C" fn drm_panic_qr_generate(
     url: *const i8,

base-commit: b7ed2b6f4e8d7f64649795e76ee9db67300de8eb
--
2.47.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/panic: remove spurious empty line to clean warning
  2024-11-25 23:33 [PATCH] drm/panic: remove spurious empty line to clean warning Miguel Ojeda
@ 2024-11-26  9:03 ` Jocelyn Falempe
  2024-12-09 21:05   ` Miguel Ojeda
  2024-12-09 23:57 ` Miguel Ojeda
  1 sibling, 1 reply; 7+ messages in thread
From: Jocelyn Falempe @ 2024-11-26  9:03 UTC (permalink / raw)
  To: Miguel Ojeda, Alex Gaynor, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, rust-for-linux,
	dri-devel, linux-kernel, patches, stable

On 26/11/2024 00:33, Miguel Ojeda wrote:
> Clippy in the upcoming Rust 1.83.0 spots a spurious empty line since the
> `clippy::empty_line_after_doc_comments` warning is now enabled by default
> given it is part of the `suspicious` group [1]:
> 
>      error: empty line after doc comment
>         --> drivers/gpu/drm/drm_panic_qr.rs:931:1
>          |
>      931 | / /// They must remain valid for the duration of the function call.
>      932 | |
>          | |_
>      933 |   #[no_mangle]
>      934 | / pub unsafe extern "C" fn drm_panic_qr_generate(
>      935 | |     url: *const i8,
>      936 | |     data: *mut u8,
>      937 | |     data_len: usize,
>      ...   |
>      940 | |     tmp_size: usize,
>      941 | | ) -> u8 {
>          | |_______- the comment documents this function
>          |
>          = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
>          = note: `-D clippy::empty-line-after-doc-comments` implied by `-D warnings`
>          = help: to override `-D warnings` add `#[allow(clippy::empty_line_after_doc_comments)]`
>          = help: if the empty line is unintentional remove it
> 
> Thus remove the empty line.

Thanks for this patch, it looks good to me.

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

> 
> Cc: stable@vger.kernel.org
> Fixes: cb5164ac43d0 ("drm/panic: Add a QR code panic screen")
> Link: https://github.com/rust-lang/rust-clippy/pull/13091 [1]
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
> ---
> I added the Fixes and stable tags since it would be nice to keep the 6.12 LTS
> Clippy-clean (since that one is the first that supports several Rust compilers).
> 
>   drivers/gpu/drm/drm_panic_qr.rs | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_panic_qr.rs b/drivers/gpu/drm/drm_panic_qr.rs
> index 09500cddc009..ef2d490965ba 100644
> --- a/drivers/gpu/drm/drm_panic_qr.rs
> +++ b/drivers/gpu/drm/drm_panic_qr.rs
> @@ -929,7 +929,6 @@ fn draw_all(&mut self, data: impl Iterator<Item = u8>) {
>   /// * `tmp` must be valid for reading and writing for `tmp_size` bytes.
>   ///
>   /// They must remain valid for the duration of the function call.
> -
>   #[no_mangle]
>   pub unsafe extern "C" fn drm_panic_qr_generate(
>       url: *const i8,
> 
> base-commit: b7ed2b6f4e8d7f64649795e76ee9db67300de8eb
> --
> 2.47.0
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/panic: remove spurious empty line to clean warning
  2024-11-26  9:03 ` Jocelyn Falempe
@ 2024-12-09 21:05   ` Miguel Ojeda
  2024-12-09 23:05     ` Jocelyn Falempe
  0 siblings, 1 reply; 7+ messages in thread
From: Miguel Ojeda @ 2024-12-09 21:05 UTC (permalink / raw)
  To: Jocelyn Falempe
  Cc: Miguel Ojeda, Alex Gaynor, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Boqun Feng,
	Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
	Alice Ryhl, Trevor Gross, rust-for-linux, dri-devel, linux-kernel,
	patches, stable

On Tue, Nov 26, 2024 at 10:04 AM Jocelyn Falempe <jfalempe@redhat.com> wrote:
>
> Thanks for this patch, it looks good to me.
>
> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>

Thanks Jocelyn. I thought DRM would pick this one -- should I pick it
through rust-fixes?

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/panic: remove spurious empty line to clean warning
  2024-12-09 21:05   ` Miguel Ojeda
@ 2024-12-09 23:05     ` Jocelyn Falempe
  2024-12-09 23:10       ` Miguel Ojeda
  0 siblings, 1 reply; 7+ messages in thread
From: Jocelyn Falempe @ 2024-12-09 23:05 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Miguel Ojeda, Alex Gaynor, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Boqun Feng,
	Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
	Alice Ryhl, Trevor Gross, rust-for-linux, dri-devel, linux-kernel,
	patches, stable

On 09/12/2024 22:05, Miguel Ojeda wrote:
> On Tue, Nov 26, 2024 at 10:04 AM Jocelyn Falempe <jfalempe@redhat.com> wrote:
>>
>> Thanks for this patch, it looks good to me.
>>
>> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
> 
> Thanks Jocelyn. I thought DRM would pick this one -- should I pick it
> through rust-fixes?

You can merge it through rust-fixes. I have another patch [1] under 
review that touches this file, but it shouldn't conflict, as the changes 
are far from this line.

How do you test clippy, so I can check I won't introduce another warning 
with this series?

[1]: https://patchwork.freedesktop.org/series/142175/

Best regards,

> 
> Cheers,
> Miguel
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/panic: remove spurious empty line to clean warning
  2024-12-09 23:05     ` Jocelyn Falempe
@ 2024-12-09 23:10       ` Miguel Ojeda
  2024-12-10 10:36         ` Simona Vetter
  0 siblings, 1 reply; 7+ messages in thread
From: Miguel Ojeda @ 2024-12-09 23:10 UTC (permalink / raw)
  To: Jocelyn Falempe
  Cc: Miguel Ojeda, Alex Gaynor, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Boqun Feng,
	Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
	Alice Ryhl, Trevor Gross, rust-for-linux, dri-devel, linux-kernel,
	patches, stable

On Tue, Dec 10, 2024 at 12:05 AM Jocelyn Falempe <jfalempe@redhat.com> wrote:
>
> You can merge it through rust-fixes. I have another patch [1] under
> review that touches this file, but it shouldn't conflict, as the changes
> are far from this line.

Sounds good, thanks! (But of course please feel free to merge fixes through DRM)

> How do you test clippy, so I can check I won't introduce another warning
> with this series?

With `CLIPPY=1`, please see:

    https://docs.kernel.org/rust/general-information.html#extra-lints

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/panic: remove spurious empty line to clean warning
  2024-11-25 23:33 [PATCH] drm/panic: remove spurious empty line to clean warning Miguel Ojeda
  2024-11-26  9:03 ` Jocelyn Falempe
@ 2024-12-09 23:57 ` Miguel Ojeda
  1 sibling, 0 replies; 7+ messages in thread
From: Miguel Ojeda @ 2024-12-09 23:57 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Jocelyn Falempe, Alex Gaynor, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Boqun Feng,
	Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
	Alice Ryhl, Trevor Gross, rust-for-linux, dri-devel, linux-kernel,
	patches, stable

On Tue, Nov 26, 2024 at 12:33 AM Miguel Ojeda <ojeda@kernel.org> wrote:
>
> Clippy in the upcoming Rust 1.83.0 spots a spurious empty line since the
> `clippy::empty_line_after_doc_comments` warning is now enabled by default
> given it is part of the `suspicious` group [1]:
>
>     error: empty line after doc comment
>        --> drivers/gpu/drm/drm_panic_qr.rs:931:1
>         |
>     931 | / /// They must remain valid for the duration of the function call.
>     932 | |
>         | |_
>     933 |   #[no_mangle]
>     934 | / pub unsafe extern "C" fn drm_panic_qr_generate(
>     935 | |     url: *const i8,
>     936 | |     data: *mut u8,
>     937 | |     data_len: usize,
>     ...   |
>     940 | |     tmp_size: usize,
>     941 | | ) -> u8 {
>         | |_______- the comment documents this function
>         |
>         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
>         = note: `-D clippy::empty-line-after-doc-comments` implied by `-D warnings`
>         = help: to override `-D warnings` add `#[allow(clippy::empty_line_after_doc_comments)]`
>         = help: if the empty line is unintentional remove it
>
> Thus remove the empty line.
>
> Cc: stable@vger.kernel.org
> Fixes: cb5164ac43d0 ("drm/panic: Add a QR code panic screen")
> Link: https://github.com/rust-lang/rust-clippy/pull/13091 [1]
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

Applied to `rust-fixes` -- thanks!

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/panic: remove spurious empty line to clean warning
  2024-12-09 23:10       ` Miguel Ojeda
@ 2024-12-10 10:36         ` Simona Vetter
  0 siblings, 0 replies; 7+ messages in thread
From: Simona Vetter @ 2024-12-10 10:36 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Jocelyn Falempe, Miguel Ojeda, Alex Gaynor, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, rust-for-linux,
	dri-devel, linux-kernel, patches, stable

On Tue, Dec 10, 2024 at 12:10:31AM +0100, Miguel Ojeda wrote:
> On Tue, Dec 10, 2024 at 12:05 AM Jocelyn Falempe <jfalempe@redhat.com> wrote:
> >
> > You can merge it through rust-fixes. I have another patch [1] under
> > review that touches this file, but it shouldn't conflict, as the changes
> > are far from this line.
> 
> Sounds good, thanks! (But of course please feel free to merge fixes through DRM)

Yeah I think once rust lands in drm the patches should land through drm
trees, or we'll have a bit of a mess. Of course with rust expert
reviews/acks where needed.
-Sima

> > How do you test clippy, so I can check I won't introduce another warning
> > with this series?
> 
> With `CLIPPY=1`, please see:
> 
>     https://docs.kernel.org/rust/general-information.html#extra-lints
> 
> Cheers,
> Miguel

-- 
Simona Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-12-10 10:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-25 23:33 [PATCH] drm/panic: remove spurious empty line to clean warning Miguel Ojeda
2024-11-26  9:03 ` Jocelyn Falempe
2024-12-09 21:05   ` Miguel Ojeda
2024-12-09 23:05     ` Jocelyn Falempe
2024-12-09 23:10       ` Miguel Ojeda
2024-12-10 10:36         ` Simona Vetter
2024-12-09 23:57 ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox