Rust for Linux List
 help / color / mirror / Atom feed
From: Gary Guo <gary@kernel.org>
To: "Miguel Ojeda" <ojeda@kernel.org>,
	"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Tamir Duberstein" <tamird@kernel.org>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"Onur Özkan" <work@onurozkan.dev>
Cc: rust-for-linux@vger.kernel.org
Subject: [GIT PULL] pin-init changes for v7.3-rc1
Date: Wed,  5 Aug 2026 20:00:07 +0100	[thread overview]
Message-ID: <20260805190012.2934907-1-gary@kernel.org> (raw)

Hi Miguel,

Still more of refactors this cycle and not much feature updates. Tuple struct
still doesn't made it as there are some complexity related to `#[cfg]`s, but
the cfg-related internal refactoring are picked so hopefully we can land it the
next one.

I did a late rebase today to rename the API based on Benno's feedback. It does
made it into today's linux-next (2026-08-05). Feel free to wait for a few more
rounds before pulling if you see fit.

Best,
Gary

The following changes since commit a13c140cc289c0b7b3770bce5b3ad42ab35074aa:

  Linux 7.2-rc3 (2026-07-12 14:16:39 -0700)

are available in the Git repository at:

  https://github.com/Rust-for-Linux/linux.git tags/pin-init-v7.3

for you to fetch changes up to 1e26aea0355ad2afa1ccbc62885c01f5bcfc58ca:

  rust: pin-init: add `#[inline]` to small functions (2026-08-05 11:36:18 +0100)

----------------------------------------------------------------
User visible changes:

- Merge the `__pinned_init` and `__init` methods and make `Init` become a marker trait.

- Introduce public APIs `raw_init` and `raw_try_init` to prevent user from needing to invoke the internal `__pinned_init`/`__init` methods.

- Emit errors for duplicate `#[pin]` attributes.

- Link `Zeroable::zeroed` and `pin_init::zeroed` in documentation.

Other changes:

- Fix unwind safety issues.

- Clean up lint `allow` and `expect`s.

- Overhaul `#[cfg]` handling to pave the way for tuple struct and self referential structs.

- Mark many functions are `#[inline]` for better codegen with `-C opt-level=s` (CC_OPTIMIZE_FOR_SIZE).

----------------------------------------------------------------
Gary Guo (11):
      rust: pin-init: examples: fix incorrect drop
      rust: pin-init: remove redundant clippy expects in doc tests
      rust: pin-init: internal: remove `allow` and `expect`s that don't fire
      rust: pin-init: internal: generate brace in macro for init code blocks
      rust: pin-init: internal: rework how `#[pin_data]` handles cfg
      rust: pin-init: examples: use `Wrapper::pin_init` instead of manual reimplementation
      rust: pin-init: merge `__pinned_init` and `__init`
      rust: pin-init: add `raw_init` and `raw_try_init` and recommend over `__init`
      rust: treewide: replace `__pinned_init` with `raw_[try_]init`
      rust: pin-init: remove `__pinned_init` method for `cfg(kernel)`
      rust: pin-init: add `#[inline]` to small functions

Luiz Georg (1):
      rust: pin-init: internal: error on duplicate `#[pin]` attribute

Mirko Adzic (2):
      rust: pin-init: make `[pin_]init_array_from_fn` unwind safe
      rust: pin-init: make `[pin_]chain` unwind safe

Nicolás Antinori (2):
      rust: pin-init: docs: link `Zeroable::zeroed` and `pin_init::zeroed` in documentation
      rust: pin-init: mark `pin_init::zeroed` and `Zeroable::zeroed` as `#[inline]`

 drivers/gpu/nova-core/gsp/cmdq.rs      |   4 +-
 rust/kernel/alloc/kbox.rs              |   8 +-
 rust/kernel/dma.rs                     |  10 +-
 rust/kernel/drm/device.rs              |   2 +-
 rust/kernel/drm/gpuvm/va.rs            |   2 +-
 rust/kernel/drm/gpuvm/vm_bo.rs         |   2 +-
 rust/kernel/init.rs                    |   6 +-
 rust/kernel/pwm.rs                     |   2 +-
 rust/kernel/sync/arc.rs                |   8 +-
 rust/kernel/types.rs                   |   8 +-
 rust/macros/module.rs                  |   2 +-
 rust/pin-init/examples/mutex.rs        |  11 +-
 rust/pin-init/examples/static_init.rs  |  10 +-
 rust/pin-init/internal/src/init.rs     |   8 +-
 rust/pin-init/internal/src/pin_data.rs |  94 +++++++---
 rust/pin-init/src/__internal.rs        |  13 +-
 rust/pin-init/src/alloc.rs             |  10 +-
 rust/pin-init/src/lib.rs               | 333 +++++++++++++++++++--------------
 18 files changed, 319 insertions(+), 214 deletions(-)

             reply	other threads:[~2026-08-05 19:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-05 19:00 Gary Guo [this message]
2026-08-06 17:01 ` [GIT PULL] pin-init changes for v7.3-rc1 Miguel Ojeda
2026-08-06 17:05   ` Mark Brown
2026-08-06 17:09     ` Miguel Ojeda
2026-08-06 17:22       ` Mark Brown
2026-08-06 17:53         ` Miguel Ojeda
2026-08-06 18:21           ` Mark Brown
2026-08-07  7:51             ` Miguel Ojeda
2026-08-06 18:19   ` Gary Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260805190012.2934907-1-gary@kernel.org \
    --to=gary@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=gary@garyguo.net \
    --cc=lossin@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox