Re: [PATCH v2 11/15] rust: init: use `#[default_error(err)]` for the initializer macros

From: Gary Guo

Date: Mon Jan 12 2026 - 14:14:36 EST


On Sun Jan 11, 2026 at 12:25 PM GMT, Benno Lossin wrote:
> 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.
>
> Signed-off-by: Benno Lossin <lossin@xxxxxxxxxx>

Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>

> ---
> Changes in v2: none
> ---
> rust/kernel/init.rs | 40 ++++++++++++----------------------------
> 1 file changed, 12 insertions(+), 28 deletions(-)