]> git.ipfire.org Git - thirdparty/linux.git/commit
rust: init: use `#[default_error(err)]` for the initializer macros
authorBenno Lossin <lossin@kernel.org>
Fri, 16 Jan 2026 10:54:26 +0000 (11:54 +0100)
committerBenno Lossin <lossin@kernel.org>
Sat, 17 Jan 2026 09:51:42 +0000 (10:51 +0100)
commitd083a6214ca6d486ac58f84f8964c72028469342
treea6f93c2ce2201cb4121e0f302235591c9a5ce10d
parentaeabc92eb2d8c27578274a7ec3d0d00558fedfc2
rust: init: use `#[default_error(err)]` for the initializer macros

Initializer macros should use this attribute instead of manually parsing
the macro's input. This is because the syntax is now parsed using `syn`,
which permits more complex constructs to be parsed. In addition, this
ensures that the kernel's initializer marcos will have the exact same
syntax as the ones from pin-init.

Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Benno Lossin <lossin@kernel.org>
rust/kernel/init.rs