rust: macros: remove module!'s deprecated author key

Commit 38559da6af ("rust: module: introduce `authors` key") introduced
a new `authors` key to support multiple module authors, while keeping
the old `author` key for backward compatibility.

Now that most in-tree modules have migrated to `authors`, remove:
1. The deprecated `author` key support from the module macro
2. Legacy `author` entries from remaining modules

Signed-off-by: Guilherme Giacomo Simoes <trintaeoitogc@gmail.com>
Acked-by: Andreas Hindborg <a.hindborg@kernel.org>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20250609122200.179307-1-trintaeoitogc@gmail.com
[ Reworded slightly. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
Guilherme Giacomo Simoes
2025-06-09 09:22:00 -03:00
committed by Miguel Ojeda
parent b61b0092ea
commit bfb9e46b5b
7 changed files with 6 additions and 12 deletions

View File

@@ -220,7 +220,7 @@ impl platform::Driver for CPUFreqDTDriver {
module_platform_driver! { module_platform_driver! {
type: CPUFreqDTDriver, type: CPUFreqDTDriver,
name: "cpufreq-dt", name: "cpufreq-dt",
author: "Viresh Kumar <viresh.kumar@linaro.org>", authors: ["Viresh Kumar <viresh.kumar@linaro.org>"],
description: "Generic CPUFreq DT driver", description: "Generic CPUFreq DT driver",
license: "GPL v2", license: "GPL v2",
} }

View File

@@ -12,7 +12,7 @@ use crate::driver::NovaDriver;
kernel::module_auxiliary_driver! { kernel::module_auxiliary_driver! {
type: NovaDriver, type: NovaDriver,
name: "Nova", name: "Nova",
author: "Danilo Krummrich", authors: ["Danilo Krummrich"],
description: "Nova GPU driver", description: "Nova GPU driver",
license: "GPL v2", license: "GPL v2",
} }

View File

@@ -13,7 +13,7 @@ pub(crate) const MODULE_NAME: &kernel::str::CStr = <LocalModule as kernel::Modul
kernel::module_pci_driver! { kernel::module_pci_driver! {
type: driver::NovaCore, type: driver::NovaCore,
name: "NovaCore", name: "NovaCore",
author: "Danilo Krummrich", authors: ["Danilo Krummrich"],
description: "Nova Core GPU driver", description: "Nova Core GPU driver",
license: "GPL v2", license: "GPL v2",
firmware: [], firmware: [],

View File

@@ -182,7 +182,7 @@ unsafe impl Sync for Firmware {}
/// module! { /// module! {
/// type: MyModule, /// type: MyModule,
/// name: "module_firmware_test", /// name: "module_firmware_test",
/// author: "Rust for Linux", /// authors: ["Rust for Linux"],
/// description: "module_firmware! test module", /// description: "module_firmware! test module",
/// license: "GPL", /// license: "GPL",
/// } /// }

View File

@@ -94,7 +94,6 @@ struct ModuleInfo {
type_: String, type_: String,
license: String, license: String,
name: String, name: String,
author: Option<String>,
authors: Option<Vec<String>>, authors: Option<Vec<String>>,
description: Option<String>, description: Option<String>,
alias: Option<Vec<String>>, alias: Option<Vec<String>>,
@@ -108,7 +107,6 @@ impl ModuleInfo {
const EXPECTED_KEYS: &[&str] = &[ const EXPECTED_KEYS: &[&str] = &[
"type", "type",
"name", "name",
"author",
"authors", "authors",
"description", "description",
"license", "license",
@@ -134,7 +132,6 @@ impl ModuleInfo {
match key.as_str() { match key.as_str() {
"type" => info.type_ = expect_ident(it), "type" => info.type_ = expect_ident(it),
"name" => info.name = expect_string_ascii(it), "name" => info.name = expect_string_ascii(it),
"author" => info.author = Some(expect_string(it)),
"authors" => info.authors = Some(expect_string_array(it)), "authors" => info.authors = Some(expect_string_array(it)),
"description" => info.description = Some(expect_string(it)), "description" => info.description = Some(expect_string(it)),
"license" => info.license = expect_string_ascii(it), "license" => info.license = expect_string_ascii(it),
@@ -179,9 +176,6 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream {
// Rust does not allow hyphens in identifiers, use underscore instead. // Rust does not allow hyphens in identifiers, use underscore instead.
let ident = info.name.replace('-', "_"); let ident = info.name.replace('-', "_");
let mut modinfo = ModInfoBuilder::new(ident.as_ref()); let mut modinfo = ModInfoBuilder::new(ident.as_ref());
if let Some(author) = info.author {
modinfo.emit("author", &author);
}
if let Some(authors) = info.authors { if let Some(authors) = info.authors {
for author in authors { for author in authors {
modinfo.emit("author", &author); modinfo.emit("author", &author);

View File

@@ -14,7 +14,7 @@ use kernel::sync::Mutex;
module! { module! {
type: RustConfigfs, type: RustConfigfs,
name: "rust_configfs", name: "rust_configfs",
author: "Rust for Linux Contributors", authors: ["Rust for Linux Contributors"],
description: "Rust configfs sample", description: "Rust configfs sample",
license: "GPL", license: "GPL",
} }

View File

@@ -114,7 +114,7 @@ impl InPlaceModule for SampleModule {
module! { module! {
type: SampleModule, type: SampleModule,
name: "rust_driver_auxiliary", name: "rust_driver_auxiliary",
author: "Danilo Krummrich", authors: ["Danilo Krummrich"],
description: "Rust auxiliary driver", description: "Rust auxiliary driver",
license: "GPL v2", license: "GPL v2",
} }