Thread (12 messages) 12 messages, 3 authors, 2026-02-19

Re: [PATCH -next v9 1/3] rust: clist: Add support to interface with C linked lists

flat view

From: Joel Fernandes <joelagnelf@nvidia.com>
Date: 2026-02-19 00:59:37
Also in: amd-gfx, dri-devel, intel-gfx, intel-xe, linux-doc, lkml, nouveau, rust-for-linux

On Thu, 19 Feb 2026 09:35:31 +0900, Alexandre Courbot wrote:

[...]
I asked this a couple of times ([1], [2]) but got no reply, so let me
try again. :) Given that `list_head` is doubly-linked, can we also
implement `DoubleEndedIterator`?

This can be done in a follow-up patch but should be there eventually as
C lists are often parsed in both directions.

[1] https://lore.kernel.org/all/DEGQCMSX1SGZ.2NQDPG5KUNA9D@nvidia.com/ (local)
[2] https://lore.kernel.org/all/DEOLRLCZQMBG.1WHBR4YL8SKYR@nvidia.com/ (local)
There was a lot of redesign and you only mentioned it as an optional
suggestion and there several higher priority comments.

Anyway, I disagree. I don't think there's a use case for
DoubleEndedIterator at the moment -- none of the current users of clist need
reverse iteration. I'd prefer to keep the interface minimal and add it when
there's an actual need for it, rather than adding API surface that nobody
uses. If a usecase comes up, we can always trivially add it.

(will look at other comments in the morning, its night for me).

Thanks,

-- 
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