From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5BD1EE6B43 for ; Fri, 6 Feb 2026 17:27:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6A23310E0C4; Fri, 6 Feb 2026 17:27:37 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="tspf8lha"; dkim-atps=neutral Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id DD38010E0C4; Fri, 6 Feb 2026 17:27:36 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id A45D760010; Fri, 6 Feb 2026 17:27:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D969FC116C6; Fri, 6 Feb 2026 17:27:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770398855; bh=DviuGo6EMO94bRcj+LA1f5jItWFurA9I/2YyGvOCpGU=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=tspf8lhaOr0S5m6oexxE02FpVJfe/g3YlvPtRQm+ttUhWoSGZvjKcGED7cmiNNhr0 eXQFIWQPMSaTrOwn/V0wFtMIYO109qZ75ugwHgsUgCZL6MiaRaAEvMUQtXQWD7LebR 13TF7sHuYRfNQfW+U3aHnOJNLYpG25SAMiGbBsDOV7idsq++Y/qd55Cvhrt1Il0S0w /5aki+hD89tgnboX/3KaCzhwQoHPx49DF9Snfl0fEmpdsJhgI1mlUeE8d3FDa1rEWb jiW6OOLaQiolq1nj5e0s4Z0rZuQD8Acylid8Bw10e/s4xEf/CoTT0Lc17tjRFkmoPt i+US+xyzZ0HDg== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 06 Feb 2026 18:27:23 +0100 Message-Id: Subject: Re: [PATCH -next v7 1/2] rust: clist: Add support to interface with C linked lists Cc: "Joel Fernandes" , , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , "Jonathan Corbet" , "Alex Deucher" , =?utf-8?q?Christian_K=C3=B6nig?= , "Jani Nikula" , "Joonas Lahtinen" , "Rodrigo Vivi" , "Tvrtko Ursulin" , "Huang Rui" , "Matthew Auld" , "Matthew Brost" , "Lucas De Marchi" , =?utf-8?q?Thomas_Hellstr=C3=B6m?= , "Helge Deller" , "Alice Ryhl" , "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Benno Lossin" , "Andreas Hindborg" , "Trevor Gross" , "John Hubbard" , "Alistair Popple" , "Timur Tabi" , "Edwin Peer" , "Alexandre Courbot" , "Andrea Righi" , "Andy Ritger" , "Zhi Wang" , "Balbir Singh" , "Philipp Stanner" , "Elle Rhumsaa" , "Daniel Almeida" , , , , , , , , , To: "Gary Guo" From: "Danilo Krummrich" References: <20260206004110.1914814-1-joelagnelf@nvidia.com> <20260206004110.1914814-2-joelagnelf@nvidia.com> <77ac3274-a962-469d-a2f6-6ccc0670988a@nvidia.com> In-Reply-To: X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" On Fri Feb 6, 2026 at 6:20 PM CET, Gary Guo wrote: > I asked for this to be changed to `pub(crate)` because I think this isn't > something that should be used by drivers. > > As you said, tt might be tricky to enforce that with new build system whe= n > subsystems are inside different crates. But until then I think it's bette= r to > limit visibility. It should *usually* not be used by drivers, but there are exceptions. For instance, it is perfectly valid to be used by Rust drivers that interact wi= th C drivers. Besides that, my take on this is that we know that the new build system wil= l come and that pub(crate) won't work in the long term, so why bother. I'd on= ly use it in cases where you want to keep things local to the subsystem. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EFC45EE6B40 for ; Fri, 6 Feb 2026 17:27:41 +0000 (UTC) Received: from kara.freedesktop.org (unknown [131.252.210.166]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9ED9D10E86C; Fri, 6 Feb 2026 17:27:40 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="tspf8lha"; dkim-atps=neutral Received: from kara.freedesktop.org (localhost [127.0.0.1]) by kara.freedesktop.org (Postfix) with ESMTP id 0278C41B4C; Fri, 6 Feb 2026 17:18:18 +0000 (UTC) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=lists.freedesktop.org; s=20240201; t=1770398297; b=pYO3Cvh2nGXJQyaoEalQvRUvEvy3TwZHIzh8vvsSQje8mpYugVSf7BIzTRCknPfBHMQzA D8G5Y+MOjPxB3UWn8q3tOwMxheDFyXW/dwNboaEFWeVvHwzcpiLSBGgf1Bv0Hu0h8IQuc+r bGoCLoHkD52HQ1hHDbQt3Qk7euFB/io970rk6qBiN1x6u79p5EVhd5wH7crBUXoBCFZdI4m bj2XVDkAAyxJRSfJAKbYmzE3x1URxasaRFq+nRB1FTj7aERMzbNhCLpa7bi7P7zSfs/SkeT fcjZA9/HCLXPfzeyxCv1WparsV9O/59uz7P0hs2mYOy8ta5RdZ2jBq2IfcSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.freedesktop.org; s=20240201; t=1770398297; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=DviuGo6EMO94bRcj+LA1f5jItWFurA9I/2YyGvOCpGU=; b=ykwLObHWv9A/qQqdenGwQpmugAyKj2Him3SixCkjTK+zNCTYHe9dzQ/8orlOxv82AdR1S md9qrlQnNrNFImD5lFzlLXekyQcDrDZTCRz+w2/13mAOhJbOLtVD7uGInntxRX+jUKMsT7R zmjq3BkJh8wYDl03jHczvSpga6XRaVZRM9dAGZsHsjzEuDYmKfrG/+a046CvJUUvGQSdH7R W54Pyr1i32Tjn+p3rFRIo9QRnj/aIc/X/n7BVoEHla5w4D/WKBbj9OBlLRqh79Gvt8STWHx I4zaZfRvGh2OX4Uiq1Ue0ZR6EwS1m0ckKon2dHFhA1qMxR/AYpubYEZtx2sQ== ARC-Authentication-Results: i=1; mail.freedesktop.org; dkim=pass header.d=kernel.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=kernel.org policy.dmarc=quarantine Authentication-Results: mail.freedesktop.org; dkim=pass header.d=kernel.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=kernel.org policy.dmarc=quarantine Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by kara.freedesktop.org (Postfix) with ESMTPS id 9478640492 for ; Fri, 6 Feb 2026 17:18:14 +0000 (UTC) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id DD38010E0C4; Fri, 6 Feb 2026 17:27:36 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id A45D760010; Fri, 6 Feb 2026 17:27:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D969FC116C6; Fri, 6 Feb 2026 17:27:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770398855; bh=DviuGo6EMO94bRcj+LA1f5jItWFurA9I/2YyGvOCpGU=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=tspf8lhaOr0S5m6oexxE02FpVJfe/g3YlvPtRQm+ttUhWoSGZvjKcGED7cmiNNhr0 eXQFIWQPMSaTrOwn/V0wFtMIYO109qZ75ugwHgsUgCZL6MiaRaAEvMUQtXQWD7LebR 13TF7sHuYRfNQfW+U3aHnOJNLYpG25SAMiGbBsDOV7idsq++Y/qd55Cvhrt1Il0S0w /5aki+hD89tgnboX/3KaCzhwQoHPx49DF9Snfl0fEmpdsJhgI1mlUeE8d3FDa1rEWb jiW6OOLaQiolq1nj5e0s4Z0rZuQD8Acylid8Bw10e/s4xEf/CoTT0Lc17tjRFkmoPt i+US+xyzZ0HDg== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 06 Feb 2026 18:27:23 +0100 Message-Id: Subject: Re: [PATCH -next v7 1/2] rust: clist: Add support to interface with C linked lists To: "Gary Guo" From: "Danilo Krummrich" References: <20260206004110.1914814-1-joelagnelf@nvidia.com> <20260206004110.1914814-2-joelagnelf@nvidia.com> <77ac3274-a962-469d-a2f6-6ccc0670988a@nvidia.com> In-Reply-To: Message-ID-Hash: MC6L5PFMGZ526K57CIX2I3W4KDKTIT2X X-Message-ID-Hash: MC6L5PFMGZ526K57CIX2I3W4KDKTIT2X X-MailFrom: dakr@kernel.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation CC: Joel Fernandes , linux-kernel@vger.kernel.org, Maarten Lankhorst , Maxime Ripard , Simona Vetter , Jonathan Corbet , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , Huang Rui , Matthew Auld , Matthew Brost , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6m?= , Helge Deller , Alice Ryhl , Miguel Ojeda , Alex Gaynor , Boqun Feng , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Trevor Gross , Alistair Popple , Alexandre Courbot , Andrea Righi , Zhi Wang , Philipp Stanner , Elle Rhumsaa , Daniel Almeida , joel@joelfernandes.org, nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org, amd-gfx@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-fbdev@vger.kernel.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: Nouveau development list Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri Feb 6, 2026 at 6:20 PM CET, Gary Guo wrote: > I asked for this to be changed to `pub(crate)` because I think this isn't > something that should be used by drivers. > > As you said, tt might be tricky to enforce that with new build system whe= n > subsystems are inside different crates. But until then I think it's bette= r to > limit visibility. It should *usually* not be used by drivers, but there are exceptions. For instance, it is perfectly valid to be used by Rust drivers that interact wi= th C drivers. Besides that, my take on this is that we know that the new build system wil= l come and that pub(crate) won't work in the long term, so why bother. I'd on= ly use it in cases where you want to keep things local to the subsystem.