Thread (71 messages) flat view 71 messages, 8 authors, 2026-02-06

Re: [PATCH RFC v6 01/26] rust: clist: Add support to interface with C linked lists

From: Joel Fernandes <joelagnelf@nvidia.com>
Date: 2026-01-21 20:42:00
Also in: amd-gfx, dri-devel, intel-gfx, intel-xe, linux-doc, lkml, nouveau, rust-for-linux


On 1/21/2026 3:36 PM, Gary Guo wrote:
quoted
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.
quoted
//! # 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help