Commit bfb9e46b authored by Guilherme Giacomo Simoes's avatar Guilherme Giacomo Simoes Committed by Miguel Ojeda
Browse files

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



Commit 38559da6 ("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: default avatarGuilherme Giacomo Simoes <trintaeoitogc@gmail.com>
Acked-by: default avatarAndreas Hindborg <a.hindborg@kernel.org>
Reviewed-by: default avatarBenno Lossin <lossin@kernel.org>
Acked-by: default avatarDanilo Krummrich <dakr@kernel.org>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20250609122200.179307-1-trintaeoitogc@gmail.com


[ Reworded slightly. - Miguel ]
Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent b61b0092
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -220,7 +220,7 @@ fn probe(
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",
}
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
kernel::module_auxiliary_driver! {
    type: NovaDriver,
    name: "Nova",
    author: "Danilo Krummrich",
    authors: ["Danilo Krummrich"],
    description: "Nova GPU driver",
    license: "GPL v2",
}
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
kernel::module_pci_driver! {
    type: driver::NovaCore,
    name: "NovaCore",
    author: "Danilo Krummrich",
    authors: ["Danilo Krummrich"],
    description: "Nova Core GPU driver",
    license: "GPL v2",
    firmware: [],
+1 −1
Original line number Diff line number Diff line
@@ -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",
/// }
+0 −6
Original line number Diff line number Diff line
@@ -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 @@ fn parse(it: &mut token_stream::IntoIter) -> Self {
        const EXPECTED_KEYS: &[&str] = &[
            "type",
            "name",
            "author",
            "authors",
            "description",
            "license",
@@ -134,7 +132,6 @@ fn parse(it: &mut token_stream::IntoIter) -> Self {
            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);
Loading