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 92FD42D2490 for ; Sat, 3 Jan 2026 09:52:37 +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=1767433957; cv=none; b=suyVXWZjPNp8Ya6C3+Ix3jI8IBJJKlUKbT0Q9ut8KxApOKxnPJo6EyM7y7qtWo5eak0yoZxkir9hZzUGpFGJeo4mo7NHV5AjoOqSdzK3kcPrK/FpGdHAXHQXjSz1CEd+mSLCy+NRw9+QvuVAZyy+dpwubvRVqCkofm8zl1l+1AE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767433957; c=relaxed/simple; bh=Z73Af2+RRxrUg3W9C+jBUFDIPjZKIyc/ygvMlU1xwmw=; h=Mime-Version:Content-Type:Date:Message-Id:From:Subject:Cc:To: References:In-Reply-To; b=sMWQjAmcJq4KyYMN3hxXy5LvMOkTveyBPfQvFJvXezCa4S2bJvN0humvfKpaY4mMcVmcjf4xhLkQXgvmGgkNkgl6qxJV9z5M2cRHnj1E1pQS2KkeHm3XznFjkbWm9hil9ujsG9hcIbyAC3ME8bK19I7Sksg4/Vg2L9W1edSqJpw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Kxlcrifn; 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="Kxlcrifn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97F5FC113D0; Sat, 3 Jan 2026 09:52:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1767433957; bh=Z73Af2+RRxrUg3W9C+jBUFDIPjZKIyc/ygvMlU1xwmw=; h=Date:From:Subject:Cc:To:References:In-Reply-To:From; b=KxlcrifnRdFRe2vVpgBAT8VXFHpGPqfol64UrKSuIPiubQnhw0WnKkZ1qp2GhwWza Fa9OnJUMeSMgfQVagtA6lddv8xQBCZMcISMFdZc3gZRLRwdv6kZeS78xH+nNTx02ow i+LSUMtDDFWYfPCwB6SA5TUeCZ7NgWjwo77yomppZIDXcTRAXG/cTiLL6Sm0yiyoy6 5qrNoWFE8Dy7X/xUdA/E+B2Xf1l0fntwXQ3y5kbgHBW6c/ivVVGCb0Q0hzqizv6SXn U4NDc2SB9PVp1nEn7ZcfLRC7/0h2ix1xtvPEiUaEFo9S+h+SbhN40BkwCPhHCqHXIK DWCjf4QEl7lSA== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sat, 03 Jan 2026 10:52:33 +0100 Message-Id: From: "Danilo Krummrich" Subject: Re: [PATCH] gpu: nova-core: use stable name() method in Chipset Display impl Cc: "Alice Ryhl" , "Alexandre Courbot" , "David Airlie" , "Simona Vetter" , , , To: "Maurice Hieronymus" References: <20260101184137.80445-1-mhi@mailbox.org> In-Reply-To: <20260101184137.80445-1-mhi@mailbox.org> On Thu Jan 1, 2026 at 7:41 PM CET, Maurice Hieronymus wrote: > Chipset's Display was using Debug formatting ("{self:?}"), which is not > guaranteed to be stable. Use the existing name() method instead, which > provides stable lowercase strings suitable for firmware path generation. > > Signed-off-by: Maurice Hieronymus > --- > drivers/gpu/nova-core/gpu.rs | 10 +--------- > 1 file changed, 1 insertion(+), 9 deletions(-) > > diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs > index 629c9d2dc994..be8c882338ea 100644 > --- a/drivers/gpu/nova-core/gpu.rs > +++ b/drivers/gpu/nova-core/gpu.rs > @@ -107,17 +107,9 @@ pub(crate) fn arch(&self) -> Architecture { > } > } > =20 > -// TODO > -// > -// The resulting strings are used to generate firmware paths, hence the > -// generated strings have to be stable. > -// > -// Hence, replace with something like strum_macros derive(Display). > -// > -// For now, redirect to fmt::Debug for convenience. > impl fmt::Display for Chipset { > fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { > - write!(f, "{self:?}") > + write!(f, "{}", self.name()) > } > } This also converts the printed string to lowercase. While this is not that = big a deal, the solution we are looking for instead is what the TODO comment says= : be able to derive a Display implementation (for enums). Now that we have syn in the kernel, this seems quite straight forward to implement. Are you interested in working on this instead? Thanks, Danilo