]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rust: macros: remove `module!`'s deprecated `author` key
authorGuilherme Giacomo Simoes <trintaeoitogc@gmail.com>
Mon, 9 Jun 2025 12:22:00 +0000 (09:22 -0300)
committerMiguel Ojeda <ojeda@kernel.org>
Mon, 23 Jun 2025 23:01:13 +0000 (01:01 +0200)
Commit 38559da6afb2 ("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>
drivers/cpufreq/rcpufreq_dt.rs
drivers/gpu/drm/nova/nova.rs
drivers/gpu/nova-core/nova_core.rs
rust/kernel/firmware.rs
rust/macros/module.rs
samples/rust/rust_configfs.rs
samples/rust/rust_driver_auxiliary.rs

index 43c87d0259b6ad89b7bf222fc991f043fd513957..30a170570c0e2db9f116603a0e6ddc6fb76d6cb6 100644 (file)
@@ -220,7 +220,7 @@ impl platform::Driver for CPUFreqDTDriver {
 module_platform_driver! {
     type: CPUFreqDTDriver,
     name: "cpufreq-dt",
-    author: "Viresh Kumar <viresh.kumar@linaro.org>",
+    authors: ["Viresh Kumar <viresh.kumar@linaro.org>"],
     description: "Generic CPUFreq DT driver",
     license: "GPL v2",
 }
index 902876aa14d1ffbf340303d7e16df555aced02e2..64fd670e99e1fd9a752703cce7f9ac7bfe241da7 100644 (file)
@@ -12,7 +12,7 @@ use crate::driver::NovaDriver;
 kernel::module_auxiliary_driver! {
     type: NovaDriver,
     name: "Nova",
-    author: "Danilo Krummrich",
+    authors: ["Danilo Krummrich"],
     description: "Nova GPU driver",
     license: "GPL v2",
 }
index 618632f0abcc8f5ef6945a04fc084acc4ecbf20b..f405d7a99c287c27d70c22403bb89c89e1f7590d 100644 (file)
@@ -13,7 +13,7 @@ pub(crate) const MODULE_NAME: &kernel::str::CStr = <LocalModule as kernel::Modul
 kernel::module_pci_driver! {
     type: driver::NovaCore,
     name: "NovaCore",
-    author: "Danilo Krummrich",
+    authors: ["Danilo Krummrich"],
     description: "Nova Core GPU driver",
     license: "GPL v2",
     firmware: [],
index 94fa1ea17ef0556c665d7d93d587fd5c2cde802d..7cff0edeab749ebd8a8a3a548e9e19b37db2b7ad 100644 (file)
@@ -182,7 +182,7 @@ unsafe impl Sync for Firmware {}
 /// module! {
 ///    type: MyModule,
 ///    name: "module_firmware_test",
-///    author: "Rust for Linux",
+///    authors: ["Rust for Linux"],
 ///    description: "module_firmware! test module",
 ///    license: "GPL",
 /// }
index 2ddd2eeb2852187e1c81e745133a90b6e82c9dbc..5dd276a2e5cbe9467f9549182a11185810d03ae3 100644 (file)
@@ -94,7 +94,6 @@ struct ModuleInfo {
     type_: String,
     license: String,
     name: String,
-    author: Option<String>,
     authors: Option<Vec<String>>,
     description: Option<String>,
     alias: Option<Vec<String>>,
@@ -108,7 +107,6 @@ impl ModuleInfo {
         const EXPECTED_KEYS: &[&str] = &[
             "type",
             "name",
-            "author",
             "authors",
             "description",
             "license",
@@ -134,7 +132,6 @@ impl ModuleInfo {
             match key.as_str() {
                 "type" => info.type_ = expect_ident(it),
                 "name" => info.name = expect_string_ascii(it),
-                "author" => info.author = Some(expect_string(it)),
                 "authors" => info.authors = Some(expect_string_array(it)),
                 "description" => info.description = Some(expect_string(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.
     let ident = info.name.replace('-', "_");
     let mut modinfo = ModInfoBuilder::new(ident.as_ref());
-    if let Some(author) = info.author {
-        modinfo.emit("author", &author);
-    }
     if let Some(authors) = info.authors {
         for author in authors {
             modinfo.emit("author", &author);
index 60ddbe62cda31465f799f1c15f92bdc88f855830..af04bfa35cb28e204a446884902fa46c261eb4af 100644 (file)
@@ -14,7 +14,7 @@ use kernel::sync::Mutex;
 module! {
     type: RustConfigfs,
     name: "rust_configfs",
-    author: "Rust for Linux Contributors",
+    authors: ["Rust for Linux Contributors"],
     description: "Rust configfs sample",
     license: "GPL",
 }
index 3e15e6d002bbaa77906baf818e7a5dd38542252b..abf3d55ed24934c40d55822d66f63ec4acb2d770 100644 (file)
@@ -114,7 +114,7 @@ impl InPlaceModule for SampleModule {
 module! {
     type: SampleModule,
     name: "rust_driver_auxiliary",
-    author: "Danilo Krummrich",
+    authors: ["Danilo Krummrich"],
     description: "Rust auxiliary driver",
     license: "GPL v2",
 }