* [PATCH 0/3] author field in module! macro should be a array
@ 2025-02-12 19:44 Guilherme Giacomo Simoes
0 siblings, 0 replies; 5+ messages in thread
From: Guilherme Giacomo Simoes @ 2025-02-12 19:44 UTC (permalink / raw)
To: a.hindborg, alex.gaynor, aliceryhl, apw, arnd, aswinunni01, axboe,
benno.lossin, bhelgaas, bjorn3_gh, boqun.feng, dakr,
dwaipayanray1, ethan.twardy, fujita.tomonori, gary, gregkh, joe,
lukas.bulwahn, ojeda, pbonzini, tmgross, walmeida
Cc: trintaeoitogc, rust-for-linux, linux-kernel
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.
- Change the check patch to find poorly formatted arrays in the macro
module!
Guilherme Giacomo Simoes (3):
rust: module: change author to be a array
rust: macros: change author field to array
checkpatch: throw error in malformed arrays
drivers/block/rnull.rs | 2 +-
rust/kernel/net/phy.rs | 4 +-
rust/kernel/pci.rs | 2 +-
rust/macros/lib.rs | 4 +-
rust/macros/module.rs | 8 ++--
samples/rust/rust_driver_pci.rs | 2 +-
samples/rust/rust_minimal.rs | 2 +-
samples/rust/rust_misc_device.rs | 2 +-
samples/rust/rust_print_main.rs | 2 +-
scripts/checkpatch.pl | 68 ++++++++++++++++++++++++++++++++
10 files changed, 83 insertions(+), 13 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 0/3] author field in module! macro should be a array
@ 2025-02-12 19:47 Guilherme Giacomo Simoes
2025-02-12 19:47 ` [PATCH 1/3] rust: module: change author to " Guilherme Giacomo Simoes
2025-02-13 12:47 ` [PATCH 0/3] author field in module! macro should " Miguel Ojeda
0 siblings, 2 replies; 5+ messages in thread
From: Guilherme Giacomo Simoes @ 2025-02-12 19:47 UTC (permalink / raw)
To: a.hindborg, alex.gaynor, aliceryhl, apw, arnd, aswinunni01, axboe,
benno.lossin, bhelgaas, bjorn3_gh, boqun.feng, dakr,
dwaipayanray1, ethan.twardy, fujita.tomonori, gary, gregkh, joe,
lukas.bulwahn, ojeda, pbonzini, tmgross, walmeida
Cc: trintaeoitogc, rust-for-linux, linux-kernel
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.
- Change the check patch to find poorly formatted arrays in the macro
module!
Guilherme Giacomo Simoes (3):
rust: module: change author to be a array
rust: macros: change author field to array
checkpatch: throw error in malformed arrays
drivers/block/rnull.rs | 2 +-
rust/kernel/net/phy.rs | 4 +-
rust/kernel/pci.rs | 2 +-
rust/macros/lib.rs | 4 +-
rust/macros/module.rs | 8 ++--
samples/rust/rust_driver_pci.rs | 2 +-
samples/rust/rust_minimal.rs | 2 +-
samples/rust/rust_misc_device.rs | 2 +-
samples/rust/rust_print_main.rs | 2 +-
scripts/checkpatch.pl | 68 ++++++++++++++++++++++++++++++++
10 files changed, 83 insertions(+), 13 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] rust: module: change author to be a array
2025-02-12 19:47 [PATCH 0/3] author field in module! macro should be a array Guilherme Giacomo Simoes
@ 2025-02-12 19:47 ` Guilherme Giacomo Simoes
2025-02-13 12:47 ` [PATCH 0/3] author field in module! macro should " Miguel Ojeda
1 sibling, 0 replies; 5+ messages in thread
From: Guilherme Giacomo Simoes @ 2025-02-12 19:47 UTC (permalink / raw)
To: a.hindborg, alex.gaynor, aliceryhl, apw, arnd, aswinunni01, axboe,
benno.lossin, bhelgaas, bjorn3_gh, boqun.feng, dakr,
dwaipayanray1, ethan.twardy, fujita.tomonori, gary, gregkh, joe,
lukas.bulwahn, ojeda, pbonzini, tmgross, walmeida
Cc: trintaeoitogc, rust-for-linux, linux-kernel, Miguel Ojeda
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 <miguel.ojeda.sandonis@gmail.com>
Link: https://github.com/Rust-for-Linux/linux/issues/244
Signed-off-by: Guilherme Giacomo Simoes <trintaeoitogc@gmail.com>
---
rust/macros/module.rs | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/rust/macros/module.rs b/rust/macros/module.rs
index cdf94f4982df..09265d18b44d 100644
--- a/rust/macros/module.rs
+++ b/rust/macros/module.rs
@@ -94,7 +94,7 @@ struct ModuleInfo {
type_: String,
license: String,
name: String,
- author: Option<String>,
+ author: Option<Vec<String>>,
description: Option<String>,
alias: Option<Vec<String>>,
firmware: Option<Vec<String>>,
@@ -135,7 +135,7 @@ 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)),
+ "author" => info.author = Some(expect_string_array(it)),
"description" => info.description = Some(expect_string(it)),
"license" => info.license = expect_string_ascii(it),
"alias" => info.alias = Some(expect_string_array(it)),
@@ -184,7 +184,9 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream {
let mut modinfo = ModInfoBuilder::new(info.name.as_ref());
if let Some(author) = info.author {
- modinfo.emit("author", &author);
+ for author in author {
+ modinfo.emit("author", &author);
+ }
}
if let Some(description) = info.description {
modinfo.emit("description", &description);
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] author field in module! macro should be a array
2025-02-12 19:47 [PATCH 0/3] author field in module! macro should be a array Guilherme Giacomo Simoes
2025-02-12 19:47 ` [PATCH 1/3] rust: module: change author to " Guilherme Giacomo Simoes
@ 2025-02-13 12:47 ` Miguel Ojeda
2025-02-13 17:53 ` Guilherme Giacomo Simoes
1 sibling, 1 reply; 5+ messages in thread
From: Miguel Ojeda @ 2025-02-13 12:47 UTC (permalink / raw)
To: Guilherme Giacomo Simoes
Cc: a.hindborg, alex.gaynor, aliceryhl, apw, arnd, aswinunni01, axboe,
benno.lossin, bhelgaas, bjorn3_gh, boqun.feng, dakr,
dwaipayanray1, ethan.twardy, fujita.tomonori, gary, gregkh, joe,
lukas.bulwahn, ojeda, pbonzini, tmgross, walmeida, rust-for-linux,
linux-kernel
On Wed, Feb 12, 2025 at 8:47 PM Guilherme Giacomo Simoes
<trintaeoitogc@gmail.com> wrote:
>
> 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.
I think this was a re-send -- in general, please change the title
(e.g. increase the version number or at least add "[ PATCH RESEND" or
similar) if you need to do a re-send, because otherwise it is hard to
follow which is which (e.g. in Lore).
Also, for some reason, Lore has your #2 and #3 patch in another thread
-- please try to see if you can fix that when you send the next
version. Both `git send-email` and `b4` should do the right thing by
default when sending a series.
Thanks!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] author field in module! macro should be a array
2025-02-13 12:47 ` [PATCH 0/3] author field in module! macro should " Miguel Ojeda
@ 2025-02-13 17:53 ` Guilherme Giacomo Simoes
0 siblings, 0 replies; 5+ messages in thread
From: Guilherme Giacomo Simoes @ 2025-02-13 17:53 UTC (permalink / raw)
To: miguel.ojeda.sandonis
Cc: a.hindborg, alex.gaynor, aliceryhl, apw, arnd, aswinunni01, axboe,
benno.lossin, bhelgaas, bjorn3_gh, boqun.feng, dakr,
dwaipayanray1, ethan.twardy, fujita.tomonori, gary, gregkh, joe,
linux-kernel, lukas.bulwahn, ojeda, pbonzini, rust-for-linux,
tmgross, trintaeoitogc, walmeida
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrotes:
> I think this was a re-send -- in general, please change the title
> (e.g. increase the version number or at least add "[ PATCH RESEND" or
> similar) if you need to do a re-send, because otherwise it is hard to
> follow which is which (e.g. in Lore).
This would can be a v2, because I already sended a patch for authors. But how
this patch a lot of changes in comparison to the previous patch I was thinnk
that is better send this patch how a new patch, but maybe was be a error.
> Also, for some reason, Lore has your #2 and #3 patch in another thread
> -- please try to see if you can fix that when you send the next
> version. Both `git send-email` and `b4` should do the right thing by
> default when sending a series.
Yeah, I maked a mistake when I send via `git send-email`... inattention
Thanks,
Guilherme
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-02-13 17:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-12 19:47 [PATCH 0/3] author field in module! macro should be a array Guilherme Giacomo Simoes
2025-02-12 19:47 ` [PATCH 1/3] rust: module: change author to " Guilherme Giacomo Simoes
2025-02-13 12:47 ` [PATCH 0/3] author field in module! macro should " Miguel Ojeda
2025-02-13 17:53 ` Guilherme Giacomo Simoes
-- strict thread matches above, loose matches on Subject: below --
2025-02-12 19:44 Guilherme Giacomo Simoes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).