Linux kernel -stable discussions
 help / color / mirror / Atom feed
* Re: Patch "rust: pin-init: internal: suppress `non_snake_case` lint in `[pin_]init!`" has been added to the 7.1-stable tree
       [not found] <20260720105951.247306-1-sashal@kernel.org>
@ 2026-07-20 15:13 ` Gary Guo
  2026-07-21 12:08   ` Sasha Levin
  0 siblings, 1 reply; 2+ messages in thread
From: Gary Guo @ 2026-07-20 15:13 UTC (permalink / raw)
  To: stable, stable-commits, adzicmirko97
  Cc: Benno Lossin, Gary Guo, Miguel Ojeda, Boqun Feng,
	Björn Roy Baron, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	Danilo Krummrich, Daniel Almeida, Tamir Duberstein,
	Alexandre Courbot, Onur Özkan

On Mon Jul 20, 2026 at 11:59 AM BST, Sasha Levin wrote:
> This is a note to let you know that I've just added the patch titled
>
>     rust: pin-init: internal: suppress `non_snake_case` lint in `[pin_]init!`
>
> to the 7.1-stable tree which can be found at:
>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
>
> The filename of the patch is:
>      rust-pin-init-internal-suppress-non_snake_case-lint-.patch
> and it can be found in the queue-7.1 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable@vger.kernel.org> know about it.

Hi Sasha,

Looks like quite a lot of patches have been picked up as dependency in order to
pick this to 7.1.

The warning that this fix addresses are already worked around on the user side,
so it probably isn't worth backporting.

Best,
Gary

>
>
>
> commit 54db70c2ed9fb176f2f097a04c55b67071dc0db7
> Author: Mirko Adzic <adzicmirko97@gmail.com>
> Date:   Wed May 27 18:19:54 2026 +0100
>
>     rust: pin-init: internal: suppress `non_snake_case` lint in `[pin_]init!`
>     
>     [ Upstream commit 5423ef9d4db852835746001d0840231227bb0e39 ]
>     
>     Allows `non_snake_case` lint on local variables generated in `[pin_]init!`.
>     
>     Conceptually the identifiers in `[pin_]init!` just references the field
>     names, and are not defining them, so the warning should not be generated,
>     similar to how constructing a struct with non-snake-case field names do no
>     generate these warnings.
>     
>     Reported-by: Gary Guo <gary@garyguo.net>
>     Closes: https://github.com/Rust-for-Linux/pin-init/issues/125
>     Closes: https://lore.kernel.org/rust-for-linux/DGTBJBIVFZ2K.2F1ZEFGY0G7NK@garyguo.net/
>     Fixes: 42415d163e5d ("rust: pin-init: add references to previously initialized fields")
>     Signed-off-by: Mirko Adzic <adzicmirko97@gmail.com>
>     [ Reworded commit message - Gary ]
>     Link: https://patch.msgid.link/20260527-pin-init-sync-v1-3-e20335ed2501@garyguo.net
>     Signed-off-by: Gary Guo <gary@garyguo.net>
>     Signed-off-by: Sasha Levin <sashal@kernel.org>
>
> diff --git a/rust/pin-init/internal/src/init.rs b/rust/pin-init/internal/src/init.rs
> index aba32825fef477..45528ab82f6a82 100644
> --- a/rust/pin-init/internal/src/init.rs
> +++ b/rust/pin-init/internal/src/init.rs
> @@ -307,7 +307,9 @@ fn init_fields(
>              #init
>  
>              #(#cfgs)*
> -            #[allow(unused_variables)]
> +            // Allow `non_snake_case` since the same warning is going to be reported for the struct
> +            // field.
> +            #[allow(unused_variables, non_snake_case)]
>              let #ident = #guard.let_binding();
>          });
>  



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

* Re: Patch "rust: pin-init: internal: suppress `non_snake_case` lint in `[pin_]init!`" has been added to the 7.1-stable tree
  2026-07-20 15:13 ` Patch "rust: pin-init: internal: suppress `non_snake_case` lint in `[pin_]init!`" has been added to the 7.1-stable tree Gary Guo
@ 2026-07-21 12:08   ` Sasha Levin
  0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2026-07-21 12:08 UTC (permalink / raw)
  To: stable, stable-commits, adzicmirko97
  Cc: Sasha Levin, Benno Lossin, Gary Guo, Miguel Ojeda, Boqun Feng,
	Björn Roy Baron, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	Danilo Krummrich, Daniel Almeida, Tamir Duberstein,
	Alexandre Courbot, Onur Özkan

On Mon, Jul 20, 2026 at 04:13:24PM +0100, Gary Guo wrote:
>Looks like quite a lot of patches have been picked up as dependency in order to
>pick this to 7.1.
>
>The warning that this fix addresses are already worked around on the user side,
>so it probably isn't worth backporting.

Dropped from the 7.1 queue along with the following dependencies:

  - rust: pin-init: internal: remove redundant `pin` filtering
  - rust: pin-init: internal: turn PhantomPinned error into a warning
  - rust: pin-init: internal: remove collect_tuple polyfill
  - rust: pin-init: internal: pin_data: use closure for handling
  - rust: pin-init: internal: pin_data: add struct to record
  - rust: pin-init: internal: init: handle code blocks early
  - rust: pin-init: internal: use marker on drop guard type for pinned fields
  - rust: pin-init: internal: project slots instead of references

Thanks for the report!

-- 
Thanks,
Sasha

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

end of thread, other threads:[~2026-07-21 12:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260720105951.247306-1-sashal@kernel.org>
2026-07-20 15:13 ` Patch "rust: pin-init: internal: suppress `non_snake_case` lint in `[pin_]init!`" has been added to the 7.1-stable tree Gary Guo
2026-07-21 12:08   ` Sasha Levin

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