Antonio Hickey
09808839c7
rust: pin-init: replace addr_of_mut! with &raw mut
...
`feature(raw_ref_op)` became stable in Rust 1.82.0 which is the current
MSRV of pin-init with no default features. Earlier Rust versions will
now need to enable `raw_ref_op` to continue to work with pin-init.
This reduces visual complexity and improves consistency with existing
reference syntax.
Suggested-by: Benno Lossin <[email protected] >
Link: https://github.com/Rust-for-Linux/linux/issues/1148
Closes: https://github.com/Rust-for-Linux/pin-init/issues/99
Signed-off-by: Antonio Hickey <[email protected] >
Link: https://github.com/Rust-for-Linux/pin-init/commit/e27763004e2f6616b089437fbe9b3719cd72bd5c
[ Reworded commit message. - Benno ]
Reviewed-by: Gary Guo <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Benno Lossin <[email protected] >
2026-03-25 10:57:53 +01:00
Benno Lossin
61d62ab08f
rust: pin-init: remove try_ versions of the initializer macros
...
The `try_[pin_]init!` versions of the initializer macros are
superfluous. Instead of forcing the user to always write an error in
`try_[pin_]init!` and not allowing one in `[pin_]init!`, combine them
into `[pin_]init!` that defaults the error to
`core::convert::Infallible`, but also allows to specify a custom one.
Projects using pin-init still can provide their own defaulting
initializers using the `try_` prefix by using the `#[default_error]`
attribute added in a future patch.
[ Adjust the definition of the kernel's version of the `try_`
initializer macros - Benno]
Reviewed-by: Gary Guo <[email protected] >
Tested-by: Andreas Hindborg <[email protected] >
Signed-off-by: Benno Lossin <[email protected] >
2026-01-17 10:49:31 +01:00
Brian Harring
26866b6bb1
rust: pin-init: fix typo in docs
...
Signed-off-by: Brian Harring <[email protected] >
Signed-off-by: Benno Lossin <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Miguel Ojeda <[email protected] >
2025-11-19 22:41:12 +01:00
Benno Lossin
62a9c70961
rust: pin-init: README: add information banner on the rename to pin-init
...
Signed-off-by: Benno Lossin <[email protected] >
2025-09-11 23:26:03 +02:00
Benno Lossin
101b7cf006
rust: pin-init: rename zeroed to init_zeroed
...
The name `zeroed` is a much better fit for a function that returns the
type by-value.
Link: https://github.com/Rust-for-Linux/pin-init/pull/56/commits/7dbe38682c9725405bab91dcabe9c4d8893d2f5e
[ also rename uses in `rust/kernel/init.rs` - Benno]
Link: https://lore.kernel.org/all/[email protected]
[ Fix wrong replacement of `mem::zeroed` in the definition of `trait
Zeroable`. - Benno ]
[ Also change occurrences of `zeroed` in `configfs.rs` - Benno ]
Acked-by: Andreas Hindborg <[email protected] >
Signed-off-by: Benno Lossin <[email protected] >
2025-06-11 21:13:56 +02:00
Christian Schrefl
c3815aa4bb
rust: pin-init: Update the structural pinning link in readme.
...
The previous link anchor was broken in rust 1.77, because the
documentation was refactored in upstream rust.
Change the link to refer to the new section in the rust documentation.
Signed-off-by: Christian Schrefl <[email protected] >
Link: https://github.com/Rust-for-Linux/pin-init/pull/37/commits/a146142fe18cafa52f8c6da306ca2729d789cfbf
[ Fixed commit authorship. - Benno ]
Signed-off-by: Benno Lossin <[email protected] >
2025-05-01 18:14:40 +02:00
Christian Schrefl
bc5f3e0e01
rust: pin-init: Update Changelog and Readme
...
Add Changelog entry for the `Wrapper` trait and document the
`unsafe-pinned` feature in the Readme.
Signed-off-by: Christian Schrefl <[email protected] >
Link: https://github.com/Rust-for-Linux/pin-init/pull/37/commits/986555f564645efb238e8092c6314388c859efe5
[ Fixed commit authorship. - Benno ]
Signed-off-by: Benno Lossin <[email protected] >
2025-05-01 18:14:29 +02:00
Benno Lossin
2cce50f5ab
rust: pin-init: synchronize README.md
...
The upstream version of the `README.md` differs by this change, so
synchronize it.
The reason that this wasn't in the original sync patch is that this was
a late change that I didn't port back to the kernel repo, since it was
generated by `cargo rdme`.
Link: https://lore.kernel.org/all/[email protected]
Signed-off-by: Benno Lossin <[email protected] >
2025-04-21 23:07:27 +02:00
Benno Lossin
2e5f4f3cf2
rust: pin-init: add miscellaneous files from the user-space version
...
Add readme and contribution guidelines of the user-space version of
pin-init.
Signed-off-by: Benno Lossin <[email protected] >
Reviewed-by: Fiona Behrens <[email protected] >
Reviewed-by: Andreas Hindborg <[email protected] >
Tested-by: Andreas Hindborg <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected] >
2025-03-16 21:59:19 +01:00