Skip to content

module!: author should take a list #244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ojeda opened this issue May 1, 2021 · 7 comments · May be fixed by #278
Closed

module!: author should take a list #244

ojeda opened this issue May 1, 2021 · 7 comments · May be fixed by #278
Labels
• lib Related to the `rust/` library.

Comments

@ojeda
Copy link
Member

ojeda commented May 1, 2021

MODULE_AUTHOR is supposed to be repeated in C.

Perhaps we should rename it authors, too.

@ojeda ojeda added • lib Related to the `rust/` library. prio: normal labels May 1, 2021
@wcampbell0x2a
Copy link

Is this the API you are looking for?

-    author: b"Rust for Linux Contributors",
+    author: [b"Rust for Linux Contributors", b"john@doe"],

@ojeda
Copy link
Member Author

ojeda commented May 6, 2021

Something like that, yeah!

@GuilhermeGiacomoSimoes
Copy link

@ojeda
I sent a patch for this

https://lore.kernel.org/all/[email protected]/

@ojeda
Copy link
Member Author

ojeda commented Dec 6, 2024

Thanks!

@wcampbell0x2a submitted a PR a while ago (#904) that was reviewed etc., did you see that? I think the patches were never submitted, though.

@GuilhermeGiacomoSimoes
Copy link

@ojeda

Yes, I saw that, but since @wcampbell0x2a never sent his patches, and it was a long time ago, I did the change my way and sent my patches.

@ojeda
Copy link
Member Author

ojeda commented Dec 6, 2024

In general, I recommend contacting the person, even if just out of deference. If there is no reply, then you could still consider submitting their patches etc.

Moreover, it is also a good idea to mention prior work in the commit message, and discuss why you used a different approach, since the PR was discussed by a few people back then.

Thanks!

GuilhermeGiacomoSimoes added a commit to GuilhermeGiacomoSimoes/linux that referenced this issue Feb 12, 2025
In the module! macro, the author field has a string type. Once that the
modules can has more than one author, this is impossible in the current
scenary.
Change the author field for accept a array string type and enable module
creations with more than one author.

Suggested-by: Miguel Ojeda <[email protected]>
Link: Rust-for-Linux#244
Signed-off-by: Guilherme Giacomo Simoes <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Feb 14, 2025
In the module! macro, the author field has a string type. Once that the
modules can has more than one author, this is impossible in the current
scenary.
Change the author field for accept a array string type and enable module
creations with more than one author.
In modules that use the author field, change its value to a string
array.

Suggested-by: Miguel Ojeda <[email protected]>
Link: Rust-for-Linux#244
Signed-off-by: Guilherme Giacomo Simoes <[email protected]>
GuilhermeGiacomoSimoes added a commit to GuilhermeGiacomoSimoes/linux that referenced this issue Feb 20, 2025
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.
Change the author field to Option<Vec<String>> to allow creating modules
with multiple authors. Additionally, rename the field from author to
authors to make it explicit that it can refer to multiple authors.  In
modules that use the author field, update its value to an array of
strings, and also rename it from author to authors.

Suggested-by: Miguel Ojeda <[email protected]>
Link: Rust-for-Linux#244
Signed-off-by: Guilherme Giacomo Simoes <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Feb 20, 2025
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.
Change the author field to Option<Vec<String>> to allow creating modules
with multiple authors. Additionally, rename the field from author to
authors to make it explicit that it can refer to multiple authors.  In
modules that use the author field, update its value to an array of
strings, and also rename it from author to authors.

Suggested-by: Miguel Ojeda <[email protected]>
Link: Rust-for-Linux#244
Signed-off-by: Guilherme Giacomo Simoes <[email protected]>
GuilhermeGiacomoSimoes added a commit to GuilhermeGiacomoSimoes/linux that referenced this issue Feb 21, 2025
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.
Change the author field to Option<Vec<String>> to allow creating modules
with multiple authors. Additionally, rename the field from author to
authors to make it explicit that it can refer to multiple authors.  In
modules that use the author field, update its value to an array of
strings, and also rename it from author to authors.

Suggested-by: Miguel Ojeda <[email protected]>
Link: Rust-for-Linux#244
Signed-off-by: Guilherme Giacomo Simoes <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Feb 21, 2025
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.
Change the author field to Option<Vec<String>> to allow creating modules
with multiple authors. Additionally, rename the field from author to
authors to make it explicit that it can refer to multiple authors.  In
modules that use the author field, update its value to an array of
strings, and also rename it from author to authors.

Suggested-by: Miguel Ojeda <[email protected]>
Link: Rust-for-Linux#244
Signed-off-by: Guilherme Giacomo Simoes <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Feb 23, 2025
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.
Change the author field to Option<Vec<String>> to allow creating modules
with multiple authors. Additionally, rename the field from author to
authors to make it explicit that it can refer to multiple authors.  In
modules that use the author field, update its value to an array of
strings, and also rename it from author to authors.

Suggested-by: Miguel Ojeda <[email protected]>
Link: Rust-for-Linux#244
Signed-off-by: Guilherme Giacomo Simoes <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Feb 23, 2025
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.
Change the author field to Option<Vec<String>> to allow creating modules
with multiple authors. Additionally, rename the field from author to
authors to make it explicit that it can refer to multiple authors.  In
modules that use the author field, update its value to an array of
strings, and also rename it from author to authors.

Suggested-by: Miguel Ojeda <[email protected]>
Link: Rust-for-Linux#244
Signed-off-by: Guilherme Giacomo Simoes <[email protected]>
GuilhermeGiacomoSimoes added a commit to GuilhermeGiacomoSimoes/linux that referenced this issue Feb 25, 2025
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.
Change the author field to Option<Vec<String>> to allow creating modules
with multiple authors. Additionally, rename the field from author to
authors to make it explicit that it can refer to multiple authors.  In
modules that use the author field, update its value to an array of
strings, and also rename it from author to authors.

Suggested-by: Miguel Ojeda <[email protected]>
Link: Rust-for-Linux#244
Signed-off-by: Guilherme Giacomo Simoes <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Mar 7, 2025
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.
Change the author field to Option<Vec<String>> to allow creating modules
with multiple authors. Additionally, rename the field from author to
authors to make it explicit that it can refer to multiple authors.  In
modules that use the author field, update its value to an array of
strings, and also rename it from author to authors.

Suggested-by: Miguel Ojeda <[email protected]>
Link: Rust-for-Linux#244
Signed-off-by: Guilherme Giacomo Simoes <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Mar 7, 2025
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.
Change the author field to Option<Vec<String>> to allow creating modules
with multiple authors. Additionally, rename the field from author to
authors to make it explicit that it can refer to multiple authors.  In
modules that use the author field, update its value to an array of
strings, and also rename it from author to authors.

Suggested-by: Miguel Ojeda <[email protected]>
Link: Rust-for-Linux#244
Reviewed-by: Charalampos Mitrodimas <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Reviewed-by: Andreas Hindborg <[email protected]>
Signed-off-by: Guilherme Giacomo Simoes <[email protected]>
GuilhermeGiacomoSimoes added a commit to GuilhermeGiacomoSimoes/linux that referenced this issue Mar 9, 2025
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.
Change the author field to Option<Vec<String>> to allow creating modules
with multiple authors. Additionally, rename the field from author to
authors to make it explicit that it can refer to multiple authors.  In
modules that use the author field, update its value to an array of
strings, and also rename it from author to authors.

Suggested-by: Miguel Ojeda <[email protected]>
Link: Rust-for-Linux#244
Reviewed-by: Charalampos Mitrodimas <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Reviewed-by: Andreas Hindborg <[email protected]>
Signed-off-by: Guilherme Giacomo Simoes <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Mar 9, 2025
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.
Change the author field to Option<Vec<String>> to allow creating modules
with multiple authors. Additionally, rename the field from author to
authors to make it explicit that it can refer to multiple authors.  In
modules that use the author field, update its value to an array of
strings, and also rename it from author to authors.

Suggested-by: Miguel Ojeda <[email protected]>
Link: Rust-for-Linux#244
Reviewed-by: Charalampos Mitrodimas <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Reviewed-by: Andreas Hindborg <[email protected]>
Signed-off-by: Guilherme Giacomo Simoes <[email protected]>
ojeda pushed a commit that referenced this issue Mar 10, 2025
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 -k . -a 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 <[email protected]>
Link: #244
Reviewed-by: Charalampos Mitrodimas <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Reviewed-by: Andreas Hindborg <[email protected]>
Signed-off-by: Guilherme Giacomo Simoes <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ Fixed `modinfo` key. Kept `author` field. Reworded message
  accordingly. Updated my email. - Miguel ]
Signed-off-by: Miguel Ojeda <[email protected]>
@ojeda
Copy link
Member Author

ojeda commented Mar 10, 2025

https://lore.kernel.org/rust-for-linux/[email protected]/

Applied to rust-next, so closing since it will likely land in mainline.

@ojeda ojeda closed this as completed Mar 10, 2025
ojeda pushed a commit that referenced this issue Mar 10, 2025
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 <[email protected]>
Link: #244
Reviewed-by: Charalampos Mitrodimas <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Reviewed-by: Andreas Hindborg <[email protected]>
Signed-off-by: Guilherme Giacomo Simoes <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ Fixed `modinfo` key. Kept `author` field. Reworded message
  accordingly. Updated my email. - Miguel ]
Signed-off-by: Miguel Ojeda <[email protected]>
dylanmtaylor pushed a commit to dylanmtaylor/linux that referenced this issue Mar 28, 2025
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 <[email protected]>
Link: Rust-for-Linux#244
Reviewed-by: Charalampos Mitrodimas <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Reviewed-by: Andreas Hindborg <[email protected]>
Signed-off-by: Guilherme Giacomo Simoes <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ Fixed `modinfo` key. Kept `author` field. Reworded message
  accordingly. Updated my email. - Miguel ]
Signed-off-by: Miguel Ojeda <[email protected]>
MingcongBai pushed a commit to AOSC-Tracking/linux that referenced this issue Apr 8, 2025
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 <[email protected]>
Link: Rust-for-Linux#244
Reviewed-by: Charalampos Mitrodimas <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Reviewed-by: Andreas Hindborg <[email protected]>
Signed-off-by: Guilherme Giacomo Simoes <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ Fixed `modinfo` key. Kept `author` field. Reworded message
  accordingly. Updated my email. - Miguel ]
Signed-off-by: Miguel Ojeda <[email protected]>
jannau pushed a commit to AsahiLinux/linux that referenced this issue Apr 11, 2025
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 <[email protected]>
Link: Rust-for-Linux#244
Reviewed-by: Charalampos Mitrodimas <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Reviewed-by: Andreas Hindborg <[email protected]>
Signed-off-by: Guilherme Giacomo Simoes <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ Fixed `modinfo` key. Kept `author` field. Reworded message
  accordingly. Updated my email. - Miguel ]
Signed-off-by: Miguel Ojeda <[email protected]>
MingcongBai pushed a commit to AOSC-Tracking/linux that referenced this issue May 3, 2025
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 <[email protected]>
Link: Rust-for-Linux#244
Reviewed-by: Charalampos Mitrodimas <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Reviewed-by: Andreas Hindborg <[email protected]>
Signed-off-by: Guilherme Giacomo Simoes <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ Fixed `modinfo` key. Kept `author` field. Reworded message
  accordingly. Updated my email. - Miguel ]
Signed-off-by: Miguel Ojeda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
• lib Related to the `rust/` library.
Development

Successfully merging a pull request may close this issue.

3 participants