"Darin Morrison" <[email protected]> writes:

>> Showcase the rust module parameter support by adding a module parameter to
>> the `rust_minimal` sample.
>>
>> Reviewed-by: Benno Lossin <[email protected]>
>> Signed-off-by: Andreas Hindborg <[email protected]>
>> ---
>>  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



Reply via email to