8000 rust: macros: remove `module!`'s deprecated `author` key · Rust-for-Linux/linux@bfb9e46 · GitHub
[go: up one dir, main page]

Skip to content

Commit bfb9e46

Browse files
GuilhermeGiacomoSimoesojeda
authored andcommitted
rust: macros: remove module!'s deprecated author key
Commit 38559da ("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>
1 parent b61b009 commit bfb9e46

File tree

7 files changed

+6
-12
lines changed

7 files changed

+6
-12
lines changed

drivers/cpufreq/rcpufreq_dt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ impl platform::Driver for CPUFreqDTDriver {
220220
module_platform_driver! {
221221
type: CPUFreqDTDriver,
222222
name: "cpufreq-dt",
223-
author: "Viresh Kumar <viresh.kumar@linaro.org>",
223+
authors: ["Viresh Kumar <viresh.kumar@linaro.org>"],
224224
description: "Generic CPUFreq DT driver",
225225
license: "GPL v2",
226226
}

drivers/gpu/drm/nova/nova.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::driver::NovaDriver;
1212
kernel::module_auxiliary_driver! {
1313
type: NovaDriver,
1414
name: "Nova",
15-
author: "Danilo Krummrich",
15+
authors: ["Danilo Krummrich"],
1616
description: "Nova GPU driver",
1717
license: "GPL v2",
1818
}

drivers/gpu/nova-core/nova_core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub(crate) const MODULE_NAME: &kernel::str::CStr = <LocalModule as kernel::Modul 8000
1313
kernel::module_pci_driver! {
1414
type: driver::NovaCore,
1515
name: "NovaCore",
16-
author: "Danilo Krummrich",
16+
authors: ["Danilo Krummrich"],
1717
description: "Nova Core GPU driver",
1818
license: "GPL v2",
1919
firmware: [],

rust/kernel/firmware.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ unsafe impl Sync for Firmware {}
182182
/// module! {
183183
/// type: MyModule,
184184
/// name: "module_firmware_test",
185-
/// author: "Rust for Linux",
185+
/// authors: ["Rust for Linux"],
186186
/// description: "module_firmware! test module",
187187
/// license: "GPL",
188188
/// }

rust/macros/module.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ struct ModuleInfo {
9494
type_: String,
9595
license: String,
9696
name: String,
97-
author: Option<String>,
9897
authors: Option<Vec<String>>,
9998
description: Option<String>,
10099
alias: Option<Vec<String>>,
@@ -108,7 +107,6 @@ impl ModuleInfo {
108107
const EXPECTED_KEYS: &[&str] = &[
109108
"type",
110109
"name",
111-
"author",
112110
"authors",
113111
"description",
114112
"license",
@@ -134,7 +132,6 @@ impl ModuleInfo {
134132
match key.as_str() {
135133
"type" => info.type_ = expect_ident(it),
136134
"name" => info.name = expect_string_ascii(it),
137-
"author" => info.author = Some(expect_string(it)),
138135
"authors" => info.authors = Some(expect_string_array(it)),
139136
"description" => info.description = Some(expect_string(it)),
140137
"license" => info.license = expect_string_ascii(it),
@@ -179,9 +176,6 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream {
179176
// Rust does not allow hyphens in identifiers, use underscore instead.
180177
let ident = info.name.replace('-', "_");
181178
let mut modinfo = ModInfoBuilder::new(ident.as_ref());
182-
if let Some(author) = info.author {
183-
modinfo.emit("author", &author);
184-
}
185179
if let Some(authors) = info.authors {
186180
for author in authors {
187181
modinfo.emit("author", &author);

samples/rust/rust_configfs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use kernel::sync::Mutex;
1414
module! {
1515
type: RustConfigfs,
1616
name: "rust_configfs",
17-
author: "Rust for Linux Contributors",
17+
authors: ["Rust for Linux Contributors"],
1818
description: "Rust configfs sample",
1919
license: "GPL",
2020
}

samples/rust/rust_driver_auxiliary.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl InPlaceModule for SampleModule {
114114
module! {
115115
type: SampleModule,
116116
name: "rust_driver_auxiliary",
117-
author: "Danilo Krummrich",
117+
authors: ["Danilo Krummrich"],
118118
description: "Rust auxiliary driver",
119119
license: "GPL v2",
120120
}

0 commit comments

Comments
 (0)
0