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 00/26] nova-core: Memory management infrastru... Joel Fernandes
- [PATCH RFC v6 01/26] rust: clist: Add support to inter... Joel Fernandes
- Re: [PATCH RFC v6 01/26] rust: clist: Add support ... Zhi Wang
- Re: [PATCH RFC v6 01/26] rust: clist: Add support ... Gary Guo
- Re: [PATCH RFC v6 01/26] rust: clist: Add supp... Joel Fernandes
- Re: [PATCH RFC v6 01/26] rust: clist: Add ... Gary Guo
- Re: [PATCH RFC v6 01/26] rust: clist:... Joel Fernandes
- Re: [PATCH RFC v6 01/26] rust: clist:... Joel Fernandes
- [PATCH RFC v6 04/26] nova-core: mm: Select GPU_BUDDY f... Joel Fernandes
- [PATCH RFC v6 06/26] docs: gpu: nova-core: Document th... Joel Fernandes
- [PATCH RFC v6 05/26] nova-core: mm: Add support to use... Joel Fernandes
- [PATCH RFC v6 03/26] rust: gpu: Add GPU buddy allocato... Joel Fernandes
- [PATCH RFC v6 07/26] nova-core: Add BAR1 aperture type... Joel Fernandes
- [PATCH RFC v6 08/26] nova-core: gsp: Add BAR1 PDE base... Joel Fernandes
- [PATCH RFC v6 09/26] nova-core: mm: Add common memory ... Joel Fernandes
