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 D8DDC28031C; Wed, 9 Jul 2025 08:57:06 +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=1752051427; cv=none; b=h/188yXssiUYjQpX7DClTK4Z5Ag/dX4SeHPdKza2LnzFNBS27Z6kEh3spwVEXlWKI48lr5MuftYrmjWkFtgKUoQoxT1TAbLpk48jssks3yyPOZehLIilcqBwzD9NnZq3ueqdImUzY0Os/6RjS1LhhD0prPLX7g17MX/Vs9Z6nIE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752051427; c=relaxed/simple; bh=2BSarhHtE6GcWhGBbHI94MeCDx8b0rV3Swg56q7qjeA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=fLV62UT8jKnQIXx9YpSshbXU7UKPkFY75Qm0Wz4ASEoJ+mePzFEI08MOTC64LWO3AdyywX6iP5zCKsFJVnI9Qt09p0b4e3E6LCxKhPcQQyrk2Q5BLZHpw5Y75qQfGTg1w2qkm3JnwZAMmqU2bRFPMT7ObmfimaZti0i9KgjvqPk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qS7iiP+j; 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="qS7iiP+j" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B8C0C4CEF0; Wed, 9 Jul 2025 08:57:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1752051426; bh=2BSarhHtE6GcWhGBbHI94MeCDx8b0rV3Swg56q7qjeA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=qS7iiP+jT9vkogTOeAPZNKTAholTL15z65delebDh/e9P9GBQyhD5x2snK947D410 vQHZOW71HBjwoQhrJ7X7ClT7Po/2ceeobJcWeWfpPxy2GU/UdGgnWziSB+tbRHd8OH XGDqmip+QceUX/GmOgeU+BpBv0xXGJPhRzxnzxs64UXvVUKS0AJlYShJUCkqnjCn7D eybh7KJTT14unqLbSEYUCNMfBKYXhRNaiT8yYYTqeXHpVQ3qQoZK+GEUyzX1aT+YZl vrwQqNw6sdJVq8biaFjyTaW/DeE7rK8HjsRId07CbMj9Vz1UE03NOLY5j5Nj0/4iVl 6KDsqAvv5H4uQ== From: Andreas Hindborg To: "Benno Lossin" Cc: "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , =?utf-8?Q?Bj=C3=B6rn?= Roy Baron , "Alice Ryhl" , "Masahiro Yamada" , "Nathan Chancellor" , "Luis Chamberlain" , "Danilo Krummrich" , "Nicolas Schier" , "Trevor Gross" , "Adam Bratschi-Kaye" , , , , "Petr Pavlu" , "Sami Tolvanen" , "Daniel Gomez" , "Simona Vetter" , "Greg KH" , "Fiona Behrens" , "Daniel Almeida" , Subject: Re: [PATCH v15 1/7] rust: sync: add `SetOnce` In-Reply-To: (Benno Lossin's message of "Tue, 08 Jul 2025 16:19:04 +0200") References: <20250707-module-params-v3-v15-0-c1f4269a57b9@kernel.org> <20250707-module-params-v3-v15-1-c1f4269a57b9@kernel.org> <87v7o2omqf.fsf@kernel.org> User-Agent: mu4e 1.12.9; emacs 30.1 Date: Wed, 09 Jul 2025 10:56:55 +0200 Message-ID: <87v7o1lp2g.fsf@kernel.org> Precedence: bulk X-Mailing-List: linux-modules@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain "Benno Lossin" writes: > On Tue Jul 8, 2025 at 3:06 PM CEST, Andreas Hindborg wrote: >> "Benno Lossin" writes: >>> On Mon Jul 7, 2025 at 3:29 PM CEST, Andreas Hindborg wrote: >>>> diff --git a/rust/kernel/sync.rs b/rust/kernel/sync.rs >>>> index 81e3a806e57e2..13e6bc7fa87ac 100644 >>>> --- a/rust/kernel/sync.rs >>>> +++ b/rust/kernel/sync.rs >>>> @@ -18,6 +18,7 @@ >>>> mod locked_by; >>>> pub mod poll; >>>> pub mod rcu; >>>> +mod set_once; >>> >>> I would have named this `once`. >> >> So module `once` and struct `SetOnce`? Struct name `Once` would lead >> thoughts to `std::sync::Once`, which is a different thing. > > Hmm I thought that `Once` and `SetOnce` would live in the same module, > but if they don't then I think it's better to keep the `set_once` > module as-is. I guess they could live together. I was thinking a module for each. We can always move it, the module name is not part of a public API. Let's go with `set_once` for now and we can change it later, if we decide it is for the better? Best regards, Andreas Hindborg