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 89322C83F0A for ; Wed, 9 Jul 2025 21:58:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CE97A10E111; Wed, 9 Jul 2025 21:58:29 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="HF7v+HHj"; dkim-atps=neutral Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 761B710E0DF; Wed, 9 Jul 2025 21:58:29 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 1514746198; Wed, 9 Jul 2025 21:58:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74C68C4CEEF; Wed, 9 Jul 2025 21:58:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1752098308; bh=zjFlENAgBdh7xP1fuuUD0RuYSpO5zOXpYVPNVEcU4zg=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=HF7v+HHj1/uWYrZ1jHPBmeinlOFXd700YJB/0ji8rRD5yDDGO2vc4Zmp3mIQ1eZrJ dp32A945DkIzZftJkqzV/nrGFQPURiSIYC3nwMmCaWYInptJZsU9hjWMZTg+ay6gXe P7m1scf30QQMKycBWbPTIpa4yEGP9Zu/McyS3TIIgvBJTmi9TMYJtnyo9iREx4G/LD 0qNjId+h+yzw3HhhgiXqsCKYA0O6XamG+OuGd2KI+D3jI3n8aHE9/hRLnryDnnBg84 zdQ0kiNXyPfZyNIyJPLJUlKCkSoc4ivbeUTyBJITG+QmdoSnpRXn/WztQ1n8dEf4SD QndKJGpaSnYXA== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 09 Jul 2025 23:58:22 +0200 Message-Id: Cc: "Danilo Krummrich" , "David Airlie" , "Simona Vetter" , "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Andreas Hindborg" , "Alice Ryhl" , "Trevor Gross" , "Jens Axboe" , "Greg Kroah-Hartman" , "Rafael J. Wysocki" , "Brendan Higgins" , "David Gow" , "Rae Moar" , , , , , , , Subject: Re: [PATCH 7/9] rust: pin-init: use `kernel::{fmt,prelude::fmt!}` From: "Benno Lossin" To: "Tamir Duberstein" X-Mailer: aerc 0.20.1 References: <20250709-core-cstr-fanout-1-v1-0-64308e7203fc@gmail.com> <20250709-core-cstr-fanout-1-v1-7-64308e7203fc@gmail.com> In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed Jul 9, 2025 at 11:01 PM CEST, Tamir Duberstein wrote: > On Wed, Jul 9, 2025 at 4:18=E2=80=AFPM Benno Lossin w= rote: >> >> On Wed Jul 9, 2025 at 10:00 PM CEST, Tamir Duberstein wrote: >> > Reduce coupling to implementation details of the formatting machinery = by >> > avoiding direct use for `core`'s formatting traits and macros. >> > >> > Acked-by: Greg Kroah-Hartman >> > Reviewed-by: Alice Ryhl >> > Signed-off-by: Tamir Duberstein >> > --- >> > rust/kernel/init.rs | 4 ++-- >> > 1 file changed, 2 insertions(+), 2 deletions(-) >> >> I usually prefix patches to init.rs with `rust: init`. I'll fix it up >> when picking the patch or Miguel can do it if he takes it: >> >> Acked-by: Benno Lossin > > Actually, squinting at this patch more closely now, I think this isn't > what you had in mind. The comment says "Dummy error that can be > constructed outside the `kernel` crate." but the error now comes from > the kernel crate :( It's a re-export, so the comment still holds. > Perhaps you could suggest a different modification that would both > meet the original intent and allow references to core::fmt to > disappear? The code comes from a time when `Error::from_errno` was `pub(crate)`, but that was changed some time ago... Now we can just remove the `FromErrno` trait entirely from that example. Feel free to do that in this series or as a standalone patch. --- Cheers, Benno