Files
linux-stable-mirror/rust/kernel
Benno Lossin 578eb8b6db rust: pin-init: move the default error behavior of try_[pin_]init
Move the ability to just write `try_pin_init!(Foo { a <- a_init })`
(note the missing `? Error` at the end) into the kernel crate.
Remove this notation from the pin-init crate, since the default when no
error is specified is the kernel-internal `Error` type. Instead add two
macros in the kernel crate that serve this default and are used instead
of the ones from `pin-init`.

This is done, because the `Error` type that is used as the default is
from the kernel crate and it thus prevents making the pin-init crate
standalone.

In order to not cause a build error due to a name overlap, the macros in
the pin-init crate are renamed, but this change is reverted in a future
commit when it is a standalone crate.

Signed-off-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Fiona Behrens <me@kloenk.dev>
Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
Tested-by: Andreas Hindborg <a.hindborg@kernel.org>
Link: https://lore.kernel.org/r/20250308110339.2997091-8-benno.lossin@proton.me
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2025-03-16 21:59:18 +01:00
..
2025-03-08 23:04:38 +01:00
2025-03-10 15:12:17 +01:00
2025-03-08 23:04:38 +01:00
2024-09-30 13:02:29 +02:00
2025-02-13 16:58:58 +01:00
2024-12-20 17:19:26 +01:00
2024-12-20 17:21:04 +01:00
2025-03-10 15:12:17 +01:00
2024-10-08 15:44:36 +02:00
2025-03-09 20:52:46 +01:00
2025-03-08 23:04:38 +01:00
2024-12-20 17:19:26 +01:00
2025-03-08 23:04:38 +01:00
2025-03-06 20:59:45 +01:00
2024-11-10 23:58:00 +01:00
2024-11-04 16:21:44 -05:00