Re: [v17,6/7] rust: samples: add a module parameter to the rust_minimal sample

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Darin Morrison" <darinmorrison@xxxxxxxxx> writes:

>> Showcase the rust module parameter support by adding a module parameter to
>> the `rust_minimal` sample.
>>
>> Reviewed-by: Benno Lossin <lossin@xxxxxxxxxx>
>> Signed-off-by: Andreas Hindborg <a.hindborg@xxxxxxxxxx>
>> ---
>>  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






[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux