From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE5F822D9ED for ; Wed, 17 Dec 2025 20:34:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766003645; cv=none; b=gD3AB1ylh657d0ywMtEV+J7+qdOXBjOYAD8dxogc9+EPIPrkaRaM/F33Ine1j5CsnHFpV+nH9a33KYZvJPx2Lo8gd8ohalA25dzOwP601d5vO9clGv6DFDtMGzAKfy0iJtv6czNZXDl3X4vqxc8n5fd6UZbfyoV8QwuAIU/pHIw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766003645; c=relaxed/simple; bh=DsRGi/hSp8EK7EDmytbt+x7nTTpcnFVzpygXVzk2yGQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Erh9fcpLhwhWmlQYMKEG1+tb55V659RpX0jdp1xYd3jMaiKyq/mpjROtpzpXa4ExHEqc+MMNrGSltWzlKr2iPtopW+Uh4JRFTqLH0db+pcWnzWu8yDGhnRyaDvZE/lzgZhmXlY3pnmpWmzcoAAdNibPGx8XTZzMib06rZ8yK7XY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=J6hqdSvl; arc=none smtp.client-ip=209.85.160.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="J6hqdSvl" Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-4f1b1948ffaso45346131cf.2 for ; Wed, 17 Dec 2025 12:34:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766003642; x=1766608442; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=m7QehkS426jgCW/qanvHWT74kZfdlsBIw6TFN+NiIlc=; b=J6hqdSvlpazaP/W2ae13lw9E/KSsnUz3QZMCP68bq77Q7JM/dCWjLB+ZNEwBejdsN/ OosOZ2a11yx85tiMtU2igDICv3C1iuFl+3CXnFWZ0B3qUBw1g4FrlhvupGvTzahJdSSP bFIXKtO6wNAax8LsfY2XlBe0Qrlo0twvlkhcvlJZ2Lo8AiMY2reRnBZTHepd+vOKPOzS 3/p5NNT+5YPYdRygjWAmxxGZqu4nQI6q+BYpzvh3GMdc65Q+y4F80rgGsAH5M9lAHVqK kg87n3bQN8nvUrBe4kHHlLbrYmcNRc8ERJe6dEHlTfxbvodkjxSXTqGnSShzyYCz28rj C29g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766003642; x=1766608442; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=m7QehkS426jgCW/qanvHWT74kZfdlsBIw6TFN+NiIlc=; b=XwcH4+vlFaVuECJ30uMLJCBByACYivD2uix7049gP2onzoNm+B8IArwBaf7uN6HNya c71fM44VR4TQOAsGEX6XePYpN9B8/RpZvJQj3BLkQCQYLpGAnYUUkhU6C0U/1+lSq3L8 rPs3RdExp8HVv+Rc4V+y4PevSANP/C5ExrDKV54ykkv3/xNo60kI0phH1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0:441:96be with SMTP id d75a77b69052e-4f1d05deeaemr251756561cf.51.1766003642503; Wed, 17 Dec 2025 12:34:02 -0800 (PST) Received: from fauth-a2-smtp.messagingengine.com (fauth-a2-smtp.messagingengine.com. [103.168.172.201]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4f35fd60ed1sm1792781cf.22.2025.12.17.12.34.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Dec 2025 12:34:01 -0800 (PST) Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfauth.phl.internal (Postfix) with ESMTP id 4C5B8F40069; Wed, 17 Dec 2025 15:34:01 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Wed, 17 Dec 2025 15:34:01 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdegfeehfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfhfgggtuggjsehttdortddttddvnecuhfhrohhmpeeuohhquhhnucfh vghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrfgrthhtvg hrnhepteffiedtiefhleetleeileehfeetudetteduheeijefggfdvhfduueevfeejffeg necuffhomhgrihhnpehkvghrnhgvlhdrohhrghdprghtohhmihgtrdhrshenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsohhquhhnodhmvghs mhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdeigedqudejjeekheehhe dvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfihigmhgvrdhnrghmvgdp nhgspghrtghpthhtohepvddupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeguih hrkhdrsggvhhhmvgesghhmrghilhdrtghomhdprhgtphhtthhopehlhihuuggvsehrvggu hhgrthdrtghomhdprhgtphhtthhopehruhhsthdqfhhorhdqlhhinhhugiesvhhgvghrrd hkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghr rdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehtghhlgieslhhinhhuthhrohhnihigrd guvgdprhgtphhtthhopegurghnihgvlhdrrghlmhgvihgurgestgholhhlrggsohhrrgdr tghomhdprhgtphhtthhopehojhgvuggrsehkvghrnhgvlhdrohhrghdprhgtphhtthhope grlhgvgidrghgrhihnohhrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepghgrrhihsehg rghrhihguhhordhnvght X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 17 Dec 2025 15:34:00 -0500 (EST) Date: Thu, 18 Dec 2025 05:33:58 +0900 From: Boqun Feng To: Dirk Behme Cc: Lyude Paul , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Daniel Almeida , Miguel Ojeda , Alex Gaynor , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Andrew Morton , Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long Subject: Re: [PATCH v16 12/17] rust: sync: lock/global: Rename B to G in trait bounds Message-ID: References: <20251215175806.102713-1-lyude@redhat.com> <20251215175806.102713-13-lyude@redhat.com> <08d00540-9de9-43a5-9e36-df2d575b4c24@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <08d00540-9de9-43a5-9e36-df2d575b4c24@gmail.com> On Tue, Dec 16, 2025 at 05:15:18PM +0100, Dirk Behme wrote: > On 15.12.25 18:57, Lyude Paul wrote: > > Due to the introduction of Backend::BackendInContext, if we want to be able > > support Lock types with a Context we need to be able to handle the fact > > that the Backend for a returned Guard may not exactly match the Backend for > > the lock. Before we add this though, rename B to G in all of our trait > > bounds to make sure things don't become more difficult to understand once > > we add a Backend bound. > > > > There should be no functional changes in this patch. > > > > Signed-off-by: Lyude Paul > > --- > > rust/kernel/sync/atomic.rs | 2 +- > > rust/kernel/sync/lock/global.rs | 58 ++++++++++++++++----------------- > > 2 files changed, 30 insertions(+), 30 deletions(-) > > > > diff --git a/rust/kernel/sync/atomic.rs b/rust/kernel/sync/atomic.rs > > index 3afc376be42d9..c07a53f8360b4 100644 > > --- a/rust/kernel/sync/atomic.rs > > +++ b/rust/kernel/sync/atomic.rs > > @@ -21,8 +21,8 @@ > > mod predefine; > > > > pub use internal::AtomicImpl; > > -pub use ordering::{Acquire, Full, Relaxed, Release}; > > pub(crate) use internal::{AtomicArithmeticOps, AtomicBasicOps, AtomicExchangeOps}; > > +pub use ordering::{Acquire, Full, Relaxed, Release}; > > Just fyi, there is a (trivial) conflict of this with Miguel's recently > merged > I think what Lyude has here is probably automatically added by rustfmt, rebasing on v6.19-rc1 should avoid this. Regards, Boqun > commit 309e49039f124a ("rust: sync: atomic: separate import "blocks"") > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/rust/kernel/sync/atomic.rs?id=309e49039f124a9dcb99c05651af8eb8fa05bc29 > > If I haven't missed anything this is just to fix the alphabetical > order? So maybe this should go as an independent patch like Miguel's one? > > Dirk