Re: [PATCH v2 3/3] rust: workqueue: add `#[pin_data]` to `Work`

From: Gary Guo
Date: Sat Dec 23 2023 - 09:43:25 EST


On Wed, 13 Dec 2023 22:09:04 +0000
Benno Lossin <benno.lossin@xxxxxxxxx> wrote:

> The previous two patches made it possible to add `#[pin_data]` on
> structs with default generic parameter values.
> This patch makes `Work` use `#[pin_data]` and removes an invocation of
> `pin_init_from_closure`. This function is intended as a low level manual
> escape hatch, so it is better to rely on the safe `pin_init!` macro.
>
> Signed-off-by: Benno Lossin <benno.lossin@xxxxxxxxx>

Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>

> ---
> v1 -> v2:
> - improve commit message wording
> - change `:` to `<-` in `pin_init!` invocation
>
> rust/kernel/workqueue.rs | 33 ++++++++++++++++++---------------
> 1 file changed, 18 insertions(+), 15 deletions(-)