lkml.org 
[lkml]   [2025]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] rust: miscdevice: use `pin_init::zeroed()` for C type initialization
From
On Sat Nov 29, 2025 at 9:15 PM JST, Atharv Dubey wrote:
> Replace manual zero-initialization using
> `MaybeUninit::zeroed().assume_init()` with `pin_init::zeroed()`.
> The `pin_init` helper provides a safer and clearer API for
> zero-initializing C structs without requiring an `unsafe` block.
>
> Link: https://github.com/Rust-for-Linux/linux/issues/1189
> Signed-off-by: Atharv Dubey <atharvd440@gmail.com>

Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>


\
 
 \ /
  Last update: 2025-12-01 04:39    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog