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 32A3929D19; Fri, 4 Jul 2025 11:46:27 +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=1751629588; cv=none; b=KmjFaiEvAxRzxjRhaJjR5In/HSPKRq9moYL0t5+4F0RDFtE+29hA6VRC/P9UmyjNQ3otCbQHwjkTBNYVvbpJjrTZMd9wJtyr4RnKsdjF+LZOFTbWfBrfOoyVz12qH3LabGljv2rJf6sWY2DCf8YtCYlJ8g08/Sv7xuNNMIOhEA0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751629588; c=relaxed/simple; bh=0QkNuyPLruhS9grPTs+cSiuHE8ijHQpGHF1EGw1iN1Q=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=ALP2+6HltemaM0kcQmLDQ1qeqHxCb4tKUNGusk5340B3NElZsJKs84yc/8DsNTs16eatlG49AaXuivR7gIHuQ1a7Zr0ybdncdbSDr8N69BrzTMsnij3YAbnncmtg7tRI/dLtFaHDjfI9Y5NGIk6KpUW8mZou2bzWBMlK7IWTuxk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qu1b6mPV; 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="qu1b6mPV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D72EAC4CEE3; Fri, 4 Jul 2025 11:46:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1751629587; bh=0QkNuyPLruhS9grPTs+cSiuHE8ijHQpGHF1EGw1iN1Q=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=qu1b6mPVXPYeHuP46u/AMC7mWPtX9ONBPLMLFyb6ZR0mI+th1lJYE+JckCRAOPJJw ayxxbD98VjGKPWHbqzL9OLutC8c/2sYd6/Af9dBdNgXCwpXDcx3KBjHYsWrNSkw09m mPJ6ZcSQcgXlnPt1/6KFUmAbHu6CXmAyE2vv5DJIsB7wFRu/YMiH0cWNzi6SQz1oT2 8S/WsHJyxzBj+50Jxh0KeOLGjrh3K3dvnr2x2CYZQh/190Iy6z7Uu/6dvOlrqvy//J XEfR46eS7xav11lggBu6rK6PMEDatjbfGEr4+I6LQjbcK09CL1MFgFk20NWkY1Dem5 dDYs6WwYzgphA== From: Andreas Hindborg To: "Benno Lossin" Cc: "Danilo Krummrich" , "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , =?utf-8?Q?Bj?= =?utf-8?Q?=C3=B6rn?= Roy Baron , "Alice Ryhl" , "Masahiro Yamada" , "Nathan Chancellor" , "Luis Chamberlain" , "Nicolas Schier" , "Trevor Gross" , "Adam Bratschi-Kaye" , , , , "Petr Pavlu" , "Sami Tolvanen" , "Daniel Gomez" , "Simona Vetter" , "Greg KH" , "Fiona Behrens" , "Daniel Almeida" , Subject: Re: [PATCH v14 3/7] rust: introduce module_param module In-Reply-To: (Benno Lossin's message of "Fri, 04 Jul 2025 11:59:40 +0200") References: <20250702-module-params-v3-v14-0-5b1cc32311af@kernel.org> <20250702-module-params-v3-v14-3-5b1cc32311af@kernel.org> <0e89892f-103e-4b92-a067-e192cb7b89a6@kernel.org> <875xg8tnv7.fsf@kernel.org> <87zfdks8y2.fsf@kernel.org> <2LQQjh_rTrPN1jqJ3fD9DdDpQx17_PxIMx2wQJp4RLYlnq1oT_ei6ir6G52V9C-NnplUeRSrq6YQ4_UOA3MRog==@protonmail.internalid> User-Agent: mu4e 1.12.9; emacs 30.1 Date: Fri, 04 Jul 2025 13:46:17 +0200 Message-ID: <87ecuwrxfa.fsf@kernel.org> Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain "Benno Lossin" writes: > On Fri Jul 4, 2025 at 9:37 AM CEST, Andreas Hindborg wrote: >> Andreas Hindborg writes: >> >>> "Danilo Krummrich" writes: >>> >>>> On 7/2/25 3:18 PM, Andreas Hindborg wrote: >>>>> + /// Get a shared reference to the parameter value. >>>>> + // Note: When sysfs access to parameters are enabled, we have to pass in a >>>>> + // held lock guard here. >>>>> + pub fn get(&self) -> &T { >>>>> + self.value.as_ref().unwrap_or(&self.default) >>>>> + } >>>> >>>> I think you forgot to rename this. >>> >>> Yes, thanks for being persistent on this :) >> >> Actually, there is a discussion on whether to keep the API similar to >> `std::sync::OnceLock` [1] but also whether to rename this to something >> other than `OnceLock` [2]. Depending on how that resolves, it might make >> sense to stay with `get` or rename to something else. > > But this is for the `ModuleParamAccess`, right? There I think it makes > sense to choose `access` or `value`. Right, sorry. My context window was too small here. Best regards, Andreas Hindborg