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 19B9336CE0C; Wed, 20 Aug 2025 18:22:01 +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=1755714122; cv=none; b=siRNIPPUeCym6eXiN0LT7DehroFOML4kua5NPDupZxcGBgBmDIj4srY5eXKVbbTpAqNfQpeXvX/Z4pdY6TrxHaNcHRaOh65/je9TBJ8PSrYJ1yVF+BaFSBhWx2bcGVU4fKgYFwVxa8LRMecpyAcwlPn5UFuZ7nUTUs/2p1wSnhQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755714122; c=relaxed/simple; bh=t6tJzwnHnWECPhXyeIvkMQmPIqdRvPTb6HMo81749GE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=HeZr2Ox7TFeefUF0ybLKWWxO7kYSVs5i3FchPqCZ7upQ5yEgpFE6WPSN21d455ELvpZmloxL57/ns0z3Qg9Q4HooZLrr9tfs+VJY8tUc9vRyzi+1Rbj/phaubpdHgP+X8GcXvrhm29oHpzyOxq6yAcP0YRURdkFsTUgrNapi/cs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WqxUUqFx; 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="WqxUUqFx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CAAAC4CEE7; Wed, 20 Aug 2025 18:21:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755714121; bh=t6tJzwnHnWECPhXyeIvkMQmPIqdRvPTb6HMo81749GE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=WqxUUqFxIjgFlULTMJfuFUZIkoxOgyNbrhTYimwZ82ujfiSItRchf5EHRuncsQHy6 Gm3z5HPoArYvBfi+R5yAtq8vJMeIecw61bZS9bswVuMsG75vSxUSHOT3lJQ3n3Hcwm go5XkMhKzKtlDfpaG2U9nxJNLG95t9ooAMdThw6Ix1al7aGtGTWaaAX1nmkHAl1xW5 L5eR8tm48PQbuSmJWtPA6yRfg3LGw1SSOGKzySBKW90CBtOQE30kdeMdfbOknwghac emPEyia1TT91dw3ymbjII6YO7z6YKn0PsbWbPWg5hfztSCoFZd3HGvEW+M2K8HPUCr maG0Rv62EFinw== From: Andreas Hindborg To: Darin Morrison 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 , Benno Lossin , Nicolas Schier , Trevor Gross , Adam Bratschi-Kaye , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Petr Pavlu , Sami Tolvanen , Daniel Gomez , Simona Vetter , Greg KH , Fiona Behrens , Daniel Almeida , linux-modules@vger.kernel.org Subject: Re: [v17,6/7] rust: samples: add a module parameter to the rust_minimal sample In-Reply-To: <20250819191133.39413-1-darinmorrison@gmail.com> References: <20250819191133.39413-1-darinmorrison@gmail.com> Date: Wed, 20 Aug 2025 20:21:19 +0200 Message-ID: <871pp5dfc0.fsf@t14s.mail-host-address-is-not-set> 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 "Darin Morrison" writes: >> Showcase the rust module parameter support by adding a module parameter to >> the `rust_minimal` sample. >> >> Reviewed-by: Benno Lossin >> Signed-off-by: Andreas Hindborg >> --- >> samples/rust/rust_minimal.rs | 10 ++++++++++ >> 1 file changed, 10 insertions(+) >> diff --git a/samples/rust/rust_minimal.rs b/samples/rust/rust_minimal.rs >> index 1fc7a1be6b6d..8eb9583571d7 100644 >> --- a/samples/rust/rust_minimal.rs >> +++ b/samples/rust/rust_minimal.rs >> @@ -10,6 +10,12 @@ >> authors: ["Rust for Linux Contributors"], >> description: "Rust minimal sample", >> license: "GPL", >> + params: { >> + test_parameter: i64 { >> + default: 1, >> + description: "This parameter has a default of 1", >> + }, >> + }, > > Thanks for the patches. > > I've been using these in a new PCI device driver module and noticed > that the inclusion of `params:` in the rustdoc test here causes the > `rusttest` target to fail with a linker error (below) complaining about > undefined references for `rust_helper_atomic_try_cmpxchg_relaxed` and > `rust_helper_atomic_set_release`. > > Building a real module and using the `params:` field seems to work > fine though so it must be something specific to the test configuration. > > Any ideas how to fix this? Thanks for reporting! I don't have that issue locally. Do you have a tree and a config you can point me to, so I can try to reproduce? Best regards, Andreas Hindborg