]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rust: module: introduce `authors` key
authorGuilherme Giacomo Simoes <trintaeoitogc@gmail.com>
Sun, 9 Mar 2025 17:57:11 +0000 (14:57 -0300)
committerMiguel Ojeda <ojeda@kernel.org>
Mon, 10 Mar 2025 14:12:17 +0000 (15:12 +0100)
commit38559da6afb239e271e709588babe7f98195096b
tree70d2d504487f453a5ca03b27859a6efc14f4d391
parentfc2f191f850d9a2fb1b78c51d49076e60fb42c49
rust: module: introduce `authors` key

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.

Add an `authors` field as `Option<Vec<String>>` to allow creating
modules with multiple authors, and change the documentation and all
current users to use it. Eventually, the single `author` field may
be removed.

[ The `modinfo` key needs to still be `author`; otherwise, tooling
  may not work properly, e.g.:

      $ modinfo --author 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 ]

Suggested-by: Miguel Ojeda <ojeda@kernel.org>
Link: https://github.com/Rust-for-Linux/linux/issues/244
Reviewed-by: Charalampos Mitrodimas <charmitro@posteo.net>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
Signed-off-by: Guilherme Giacomo Simoes <trintaeoitogc@gmail.com>
Link: https://lore.kernel.org/r/20250309175712.845622-2-trintaeoitogc@gmail.com
[ Fixed `modinfo` key. Kept `author` field. Reworded message
  accordingly. Updated my email. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
14 files changed:
drivers/block/rnull.rs
drivers/net/phy/ax88796b_rust.rs
drivers/net/phy/qt2025.rs
rust/kernel/net/phy.rs
rust/kernel/pci.rs
rust/kernel/platform.rs
rust/macros/lib.rs
rust/macros/module.rs
samples/rust/rust_driver_faux.rs
samples/rust/rust_driver_pci.rs
samples/rust/rust_driver_platform.rs
samples/rust/rust_minimal.rs
samples/rust/rust_misc_device.rs
samples/rust/rust_print_main.rs