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 8377A24A058; Mon, 30 Jun 2025 12:12:54 +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=1751285574; cv=none; b=KFt9hAARPcLAkcFMr4TuFP2YurNPOWQQZtZsrneQguheAEfJO/DWwzOaq8ppxwsVEGn3GYum+HxEImGwZAjDFBoYke2Xay4XykEHvD/iXX47t/AiMF4imXLu5vjun05FFVOeUw5aw+N2d51oe0vXZHQi814yoNS6Rnma5BEtYBU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751285574; c=relaxed/simple; bh=OAKKPO5WAFxNS5ms3mqTo100SLRig36uzVnDCmiO2jg=; h=From:To:Cc:Subject:In-Reply-To:Message-ID:References:Date: MIME-Version:Content-Type; b=Z/3+b3OAA17t5UnTtUMqct50iWcaVzMvbHKrZsC4F8SjLTuFd1OH9z+mIy7WcEN2nmyOr5zPWlwQkEOAZUJmw+xmvfGVz7Izn1x39K9Xd8moiIZ6AY+NTcdg1EFecxD/Zz3XktRRvVEX+4A91tfRw1tEheZQoFf7DZwSxC0oNF8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kaV5oK5c; 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="kaV5oK5c" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A127AC4CEE3; Mon, 30 Jun 2025 12:12:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1751285574; bh=OAKKPO5WAFxNS5ms3mqTo100SLRig36uzVnDCmiO2jg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=kaV5oK5cQQGMvF0zVYgdU8Dy+GsxKluitINfeXUMmlNoENC+nFheop9ZPsEK4aT2r yWkVuFOsjL9wQPm9ZGUEoWI8ABc0bSF8QrbhebjYRGRwKJeMt8n6sPhaTZRbw7RxYl NyBig3DaeWSGGqwJ+esch7hG9O0BoWlZQn1zIzAUs6tsgBLfEenDq3Q1rlkRIsVDim n1GR2vOEzp9GJH5AotscDxPxVudiPmYQ/q4gDaNtoh/qVEHLOave/dGRmqtxn4+E88 rH6vTb1fExRuIizGiYNGSMoob16xpac/lD9yaLFJaGHL2RWUbse+mh5SlVdsZymEEm Ny93+DFRINP8Q== From: Andreas Hindborg To: "Danilo Krummrich" Cc: "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , =?us-ascii?Q?=3D=3Futf-8=3FQ=3FBj=3DC3=3DB6rn=3F=3D?= Roy Baron , "Alice Ryhl" , "Masahiro Yamada" , "Nathan Chancellor" , "Luis Chamberlain" , "Benno Lossin" , "Nicolas Schier" , "Trevor Gross" , "Adam Bratschi-Kaye" , , , , "Petr Pavlu" , "Sami Tolvanen" , "Daniel Gomez" , "Simona Vetter" , "Greg KH" , "Fiona Behrens" , "Daniel Almeida" , Subject: Re: [PATCH v13 5/6] rust: samples: add a module parameter to the rust_minimal sample In-Reply-To: (Danilo Krummrich's message of "Mon, 30 Jun 2025 13:30:02 +0200") Message-ID: <87qzz1xwdg.fsf@kernel.org> References: <20250612-module-params-v3-v13-0-bc219cd1a3f8@kernel.org> <20250612-module-params-v3-v13-5-bc219cd1a3f8@kernel.org> User-Agent: mu4e 1.12.9; emacs 30.1 Date: Mon, 30 Jun 2025 14:12:44 +0200 Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain "Danilo Krummrich" writes: > (Sorry for being late on this one, just a minor nit below.) > > On 6/12/25 3:40 PM, Andreas Hindborg wrote: >> struct RustMinimal { >> @@ -20,6 +26,10 @@ impl kernel::Module for RustMinimal { >> fn init(_module: &'static ThisModule) -> Result { >> pr_info!("Rust minimal sample (init)\n"); >> pr_info!("Am I built-in? {}\n", !cfg!(MODULE)); >> + pr_info!( >> + "test_parameter: {}\n", >> + *module_parameters::test_parameter.get() > > Can we please call it something else than get(), maybe obtain(), access() or > just ref()? Probably `ref` is the most precise of the options you propose. I would go with that one. Or, should it be `as_ref`? Best regards, Andreas Hindborg