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

From: Joel Fernandes

Date: Wed Feb 18 2026 - 19:59:54 EST


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@xxxxxxxxxx/
> [2] https://lore.kernel.org/all/DEOLRLCZQMBG.1WHBR4YL8SKYR@xxxxxxxxxx/

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