Re: [PATCH v7 0/6] rust: extend `module!` macro with integer parameter support

From: Andreas Hindborg
Date: Sat Feb 22 2025 - 04:25:49 EST


"Daniel Almeida" <daniel.almeida@xxxxxxxxxxxxx> writes:

> Hi Andreas,
>
>> On 18 Feb 2025, at 10:00, Andreas Hindborg <a.hindborg@xxxxxxxxxx> wrote:
>>
>> This series extends the `module!` macro with support module parameters. It
>> also adds some string to integer parsing functions and updates `BStr` with
>> a method to strip a string prefix.
>>
>> This series stated out as code by Adam Bratschi-Kaye lifted from the original
>> `rust` branch [1].
>>
>> After a bit of discussion on v3 about whether or not module parameters
>> is a good idea, it seems that module parameters in Rust has a place
>> in the kernel for now. This series is a dependency for `rnull`, the Rust
>> null block driver [2].
>>
>
> ```
> $ sudo modprobe rust_minimal test_parameter=2
> [ 251.384125] rust_minimal: Rust minimal sample (init)
> [ 251.384600] rust_minimal: Am I built-in? false
> [ 251.385010] rust_minimal: My parameter: 2
> ```
>
> Tested-by: Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx>
>
> IMHO, this is slightly confusing, since the parameter is named
> “test_parameter”, but you’re printing “My parameter”.

You are right, let's change that to "test_parameter: ".


Best regards,
Andreas Hindborg