[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <F882BB02-A795-4F79-A2AF-CBA9608470A5@collabora.com>
Date: Fri, 21 Feb 2025 12:45:48 -0300
From: Daniel Almeida <daniel.almeida@...labora.com>
To: Andreas Hindborg <a.hindborg@...nel.org>
Cc: Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>,
Masahiro Yamada <masahiroy@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nicolas Schier <nicolas@...sle.eu>,
Luis Chamberlain <mcgrof@...nel.org>,
rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org,
Adam Bratschi-Kaye <ark.email@...il.com>,
linux-kbuild@...r.kernel.org,
Petr Pavlu <petr.pavlu@...e.com>,
Sami Tolvanen <samitolvanen@...gle.com>,
Daniel Gomez <da.gomez@...sung.com>,
Simona Vetter <simona.vetter@...ll.ch>,
Greg KH <gregkh@...uxfoundation.org>,
linux-modules@...r.kernel.org
Subject: Re: [PATCH v7 0/6] rust: extend `module!` macro with integer
parameter support
Hi Andreas,
> On 18 Feb 2025, at 10:00, Andreas Hindborg <a.hindborg@...nel.org> 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@...labora.com>
IMHO, this is slightly confusing, since the parameter is named
“test_parameter”, but you’re printing “My parameter”.
This is of course very minor. Overall, congrats on getting this to work :)
— Daniel
Powered by blists - more mailing lists