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 E25B878F36; Wed, 9 Jul 2025 09:10:56 +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=1752052257; cv=none; b=iZV0nrPkn+9Z5gdNSf9WK1mEn9FQRhFqe7qLsxHmJU/ArXJOw0UaYawJYbxVOd8xLOYLBiJo1IgOE7EzTBPhAHHacArkHMh+ipcIi/ZSRF2RvxF1qYcYe6VZ+K5cXaNK/5CLGyqNkQ4EW8PsvBfSE2Hq5yp2hFMY0pcW2rYHp04= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752052257; c=relaxed/simple; bh=jLWUqCCh+P7rb/vIveEHk3VQXEsAJdl3YjBTzAm6LOw=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=CAUgxEcOM51qj+Hh/ttohkDewFo3tJ6rwhZBZAJYMOVEVLWUsVrkNcbru00BDO9W8zqdrso4eGDgdkru4el9gRGztMqegR47FCw1T1nxuE9QmaD40Qd2Vgx8GFYgCj9ddkS+8xnmfF/E3zcA4wCiRVpxTg1b8qL0MEFWGsucR0o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=A9t/r48+; 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="A9t/r48+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09609C4CEEF; Wed, 9 Jul 2025 09:10:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1752052256; bh=jLWUqCCh+P7rb/vIveEHk3VQXEsAJdl3YjBTzAm6LOw=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=A9t/r48+Y243bSoSn50mSN5GgCDWZgiWrL7nyKtXQii9+s+Mh7tgd8IfApvQWjnGJ O8NqfwqO5NgTd3qvRamriBa0DvHPxcrU8LSXKrmAHofliFJu+8/kchn2k7L/vWI1TD 8ftIme/i4uwSMseASL+xU7bTq/1aor9R+mPrlBP45s9MTcS3fcM1m3iCmkQFMFEHi+ v6ERbwDjGz/wZjzgk/mGsGU786FGanDF5jLar2vnTIMZ6/iv++v/ML9y4dhdlnICOy ly+y8I7wsXv9pXR56lK/iuW+zWiNP3RY3zHQlxGni4dyqmWbToQYxrC5NGXxIZMIuU dJvLPsThymt4g== 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: Wed, 09 Jul 2025 11:10:50 +0200 Message-Id: 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` From: "Benno Lossin" To: "Andreas Hindborg" X-Mailer: aerc 0.20.1 References: <20250707-module-params-v3-v15-0-c1f4269a57b9@kernel.org> <20250707-module-params-v3-v15-1-c1f4269a57b9@kernel.org> <87v7o2omqf.fsf@kernel.org> <87v7o1lp2g.fsf@kernel.org> In-Reply-To: <87v7o1lp2g.fsf@kernel.org> On Wed Jul 9, 2025 at 10:56 AM CEST, Andreas Hindborg wrote: > "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? Sure. --- Cheers, Benno