Re: [PATCH V9 1/2] rust: module: change author to an array
From: Miguel Ojeda
Date: Sun Mar 09 2025 - 20:46:10 EST
On Sun, Mar 9, 2025 at 6:57 PM Guilherme Giacomo Simoes
<trintaeoitogc@xxxxxxxxx> wrote:
>
> In the module! macro, the author field is currently of type String.
> Since modules can have multiple authors, this limitation prevents
> specifying more than one.
> Change the author field to Option<Vec<String>> to allow creating modules
> with multiple authors. Additionally, rename the field from author to
> authors to make it explicit that it can refer to multiple authors. In
> modules that use the author field, update its value to an array of
> strings, and also rename it from author to authors.
>
> Suggested-by: Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx>
> Link: https://github.com/Rust-for-Linux/linux/issues/244
> Reviewed-by: Charalampos Mitrodimas <charmitro@xxxxxxxxxx>
> Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
> Reviewed-by: Andreas Hindborg <a.hindborg@xxxxxxxxxx>
> Signed-off-by: Guilherme Giacomo Simoes <trintaeoitogc@xxxxxxxxx>
Applied to `rust-next` -- thanks everyone!
[ The `modinfo` key needs to still be `author`; otherwise, tooling
may not work properly, e.g.:
$ modinfo -k . -a samples/rust/rust_print.ko
Rust for Linux Contributors
I have also kept the original `author` field (undocumented), so
that we can drop it more easily in a kernel cycle or two.
- Miguel ]
[ Fixed `modinfo` key. Kept `author` field. Reworded message
accordingly. Updated my email. - Miguel ]
I didn't drop the Reviewed-by's -- the fix I did is a single letter
change, but conceptually keeping the `author` field is a bigger change
-- if someone disagrees, please just let me know and I will drop your
tag.
Thanks!
Cheers,
Miguel