On 1/21/2026 3:36 PM, Gary Guo wrote:
>> There are 2 users:
>>
>> pub fn try_init<E>(
>>
>> and the self-tests:
> This is not really a public user. It's hidden in the doc test too, you could
> initialize using try_init too.
>
>> //! # let head = head.as_mut_ptr();
>> //! # // SAFETY: head and all the items are test objects allocated in [..]
>> //! # unsafe { init_list_head(head) };
>> //! #
True, but if we initialize purely within try_init() without using a helper, does
that not defeat the argument of adding a separate INIT_LIST_HEAD helper such
that we don't deviate from the C side?
Regarding your other comment about the try_init block itself, I will take a look
at your suggestion and see if I can simplify.
--
Joel Fernandes
- [PATCH RFC v6 23/26] nova-core: gsp: Extract usable FB regi... Joel Fernandes
- [PATCH RFC v6 17/26] nova-core: mm: Add Virtual Memory Mana... Joel Fernandes
- [PATCH RFC v6 20/26] nova-core: gsp: Return GspStaticInfo a... Joel Fernandes
- [PATCH RFC v6 04/26] nova-core: mm: Select GPU_BUDDY for VR... Joel Fernandes
- [PATCH RFC v6 01/26] rust: clist: Add support to interface ... Joel Fernandes
- Re: [PATCH RFC v6 01/26] rust: clist: Add support to i... Zhi Wang
- Re: [PATCH RFC v6 01/26] rust: clist: Add support ... Joel Fernandes
- Re: [PATCH RFC v6 01/26] rust: clist: Add support to i... Gary Guo
- Re: [PATCH RFC v6 01/26] rust: clist: Add support ... Joel Fernandes
- Re: [PATCH RFC v6 01/26] rust: clist: Add supp... Gary Guo
- Re: [PATCH RFC v6 01/26] rust: clist: Add ... Joel Fernandes
- Re: [PATCH RFC v6 01/26] rust: clist: Add ... Joel Fernandes
- [PATCH RFC v6 14/26] nova-core: mm: Add TLB flush support Joel Fernandes
- [PATCH RFC v6 05/26] nova-core: mm: Add support to use PRAM... Joel Fernandes
- [PATCH RFC v6 24/26] nova-core: fb: Add usable_vram field t... Joel Fernandes
- [PATCH RFC v6 10/26] nova-core: mm: Add common types for al... Joel Fernandes
- [PATCH RFC v6 11/26] nova-core: mm: Add MMU v2 page table t... Joel Fernandes
