From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53EFB286408; Tue, 4 Nov 2025 13:49:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762264189; cv=none; b=RG9YVrzfKGzeN4DmrPE3eLt/mBGdaoVsirEEGuUyloC17W2pNN24/slhp7FHMBO3AZ/s0bkNpD7In4ht2qqWeKpbPEgDm2/l5SxZmEHE4AAn4iOSBzSZEBiSRJIFVnMLeOX8X5oSbakKNzmxjepZIs9LeBOQu+oBnvkwu2bRy24= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762264189; c=relaxed/simple; bh=qAe+WnKRhyi7M2hgYxlX4ON4RtjRVE5CgSMyQVRb7Do=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MiZE26NSUs8rCaBjEBHGRfRxNUwhbfa9fEmx3T4E3f2I+r3FqeRfidKR87OjvONvDHBQGarxY9LSgE9gw/VAaPHSsxW5lQN9owl5kvuaw8454FeIywP0d3z7egbcGNtK5dgLqKwh/FkvndxWL0G9E5uXpvD+dtQ70RQYi8QZsoU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=j877KRJb; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="j877KRJb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47203C16AAE; Tue, 4 Nov 2025 13:49:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762264186; bh=qAe+WnKRhyi7M2hgYxlX4ON4RtjRVE5CgSMyQVRb7Do=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=j877KRJbTrKeV32q1oEbIyDisS+qk+QRihArO5A2jdhVnNaVT1SsmLeR67MMCsyPI iJLwzKKR0+oWOerzl7ZV1rp6OkMR+LM5FH3PconG4wL1tSJTaNRtF7wyVuYx4iiFLV AmN34SEmK2OlyRjoJR3KwxPzeQVDtKrhcRk5pRWBsio6a+zU2x0YZdivy836nm44vC iWtwpW+kRataeuMXBXOSQcT0wncfkLqh5beI1snwT8ucbO3xVy18XbaciYbNP+U1FB xTNvix2BJm8eYYj7TljUHFAI8CTqlsQFBFOm3eLGeg5y4F3ZpBvbg2biUu++H38gSI eq1R6jjtTVzPQ== Message-ID: Date: Tue, 4 Nov 2025 14:49:39 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC 1/4] rust: clist: Add abstraction for iterating over C linked lists To: Alexandre Courbot Cc: Joel Fernandes , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , Alistair Popple , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , bjorn3_gh@protonmail.com, Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , John Hubbard , Timur Tabi , joel@joelfernandes.org, Elle Rhumsaa , Daniel Almeida , Andrea Righi , Philipp Stanner , nouveau@lists.freedesktop.org, Nouveau References: <20251030190613.1224287-1-joelagnelf@nvidia.com> <20251030190613.1224287-2-joelagnelf@nvidia.com> From: Danilo Krummrich Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 11/1/25 4:51 AM, Alexandre Courbot wrote: > I am wondering whether `CList` serves an actual purpose beyond providing > ` CListIter` to iterate on... Would it make sense to merge both types > into a single one that implements `Iterator`? I think eventually we will have a bunch of iterator types, e.g for list_for_each_entry_{safe,reverse,continue}() etc. (see also [1]). Hence, CList has to provide a couple of methods providing different iterator types. [1] https://lore.kernel.org/lkml/DDVYV1VT441A.11L5C11F8R7C9@kernel.org/