Re: [[PATCH]] rust: kernel: add SAFETY comments in aref doc example

From: Miguel Ojeda

Date: Sun Jul 12 2026 - 08:44:07 EST


On Sun, Jul 12, 2026 at 2:35 PM Christopher Joshy
<christopherjoshy4@xxxxxxxxx> wrote:
>
> Replace TODO safety comments with proper explanations in the
> `ARef::into_raw` doc example.
>
> For the `unsafe impl AlwaysRefCounted`, explain that the empty
> implementation is trivially sound since `Empty` has no data.
>
> For the `ARef::from_raw` call, explain that the pointer is valid
> because it is derived from a valid reference.
>
> Link: https://github.com/Rust-for-Linux/linux/issues/351
> Signed-off-by: Christopher Joshy <christopherjoshy4@xxxxxxxxx>

Thanks for the patch! A few procedural notes:

- The title seems to have double brackets.

- Please check the prefix for the title that previous patches to
this file use in the Git log.

- Now that we have a proper `// SAFETY` comment, consider showing it
in the rendered output instead of hiding it.

- Please Cc all the relevant maintainers and reviewers, i.e. you can
check `MAINTAINERS` and/or use the `scripts/get_maintainer.pl` (you
will need `RUST [SYNC]` and `RUST`).

- I personally don't mind either way, but I ask to add Suggested-by
in the "good first issue"s because I want to encourage other reviewers
to open new ones.

Cheers,
Miguel