John Hubbard
2025-Dec-01 19:35 UTC
[PATCH v3] rust: clist: Add support to interface with C linked lists
On 12/1/25 8:51 AM, Daniel Almeida wrote:>> On 29 Nov 2025, at 18:30, Joel Fernandes <joelagnelf at nvidia.com> wrote:...>> +#[repr(transparent)] >> +pub struct ClistHead(Opaque<bindings::list_head>); > > I still think we should call this CList. IMHO, it does not make sense to have aI am guessing you meant to place this comment after Clist, rather than here (after ClistHead)? Otherwise I don't know what you are actually suggesting?> Clist, and a ClistHead (notice the capitalization). CList and CListHead are > easier to read and reason about. > > Did anyone push back on this?If you are simply recommending renaming: Clist --> CList ClistHead --> CListHead ...then I'd say "+1" for that suggestion. thanks, -- John Hubbard
Joel Fernandes
2025-Dec-01 20:06 UTC
[PATCH v3] rust: clist: Add support to interface with C linked lists
On 12/1/2025 2:35 PM, John Hubbard wrote:> On 12/1/25 8:51 AM, Daniel Almeida wrote: >>> On 29 Nov 2025, at 18:30, Joel Fernandes <joelagnelf at nvidia.com> wrote: > ... >>> +#[repr(transparent)] >>> +pub struct ClistHead(Opaque<bindings::list_head>); >> >> I still think we should call this CList. IMHO, it does not make sense to have a > > I am guessing you meant to place this comment after Clist, rather than here > (after ClistHead)? Otherwise I don't know what you are actually suggesting? > >> Clist, and a ClistHead (notice the capitalization). CList and CListHead are >> easier to read and reason about. >> >> Did anyone push back on this? > > If you are simply recommending renaming: > Clist --> CList > ClistHead --> CListHead > > ...then I'd say "+1" for that suggestion.I am not fond of the suggestion but I don't oppose it either. I honestly don't like the triple capitalization with CListHead though. Lets see where all of us stand and then take a call on it. Opinions? Thanks.
Daniel Almeida
2025-Dec-01 22:54 UTC
[PATCH v3] rust: clist: Add support to interface with C linked lists
> On 1 Dec 2025, at 16:35, John Hubbard <jhubbard at nvidia.com> wrote: > > On 12/1/25 8:51 AM, Daniel Almeida wrote: >>> On 29 Nov 2025, at 18:30, Joel Fernandes <joelagnelf at nvidia.com> wrote: > ... >>> +#[repr(transparent)] >>> +pub struct ClistHead(Opaque<bindings::list_head>); >> >> I still think we should call this CList. IMHO, it does not make sense to have a > > I am guessing you meant to place this comment after Clist, rather than here > (after ClistHead)? Otherwise I don't know what you are actually suggesting? > >> Clist, and a ClistHead (notice the capitalization). CList and CListHead are >> easier to read and reason about. >> >> Did anyone push back on this? > > If you are simply recommending renaming: > Clist --> CList > ClistHead --> CListHeadYes, this is what I meant.> > ...then I'd say "+1" for that suggestion. > > thanks, > -- > John Hubbard > >