* [PATCH v2 1/2] rust: add example for `alias` argument in `module` macro documentation
@ 2024-05-12 11:23 Aswin Unnikrishnan
2024-05-12 11:23 ` [PATCH v2 2/2] rust: fix datatype in docs for `module` macro arguments Aswin Unnikrishnan
2024-05-27 19:31 ` [PATCH v2 1/2] rust: add example for `alias` argument in `module` macro documentation Benno Lossin
0 siblings, 2 replies; 5+ messages in thread
From: Aswin Unnikrishnan @ 2024-05-12 11:23 UTC (permalink / raw
To: Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho
Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Alice Ryhl, rust-for-linux, Aswin Unnikrishnan
Add example for `alias` argument supported by `module` macro.
`alias` accepts an array of alternate names for the module as string.
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Aswin Unnikrishnan <aswinunni01@gmail.com>
---
Changes in v2:
- Add Reviewed-by tag
- Link to v1: https://lore.kernel.org/rust-for-linux/20240419215015.157258-2-aswinunni01@gmail.com/
rust/macros/lib.rs | 1 +
1 file changed, 1 insertion(+)
diff --git a/rust/macros/lib.rs b/rust/macros/lib.rs
index 520eae5fd792..aa89b41fa10e 100644
--- a/rust/macros/lib.rs
+++ b/rust/macros/lib.rs
@@ -35,6 +35,7 @@
/// author: "Rust for Linux Contributors",
/// description: "My very own kernel module!",
/// license: "GPL",
+/// alias: ["alternate_module_name"],
/// }
///
/// struct MyModule;
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] rust: fix datatype in docs for `module` macro arguments
2024-05-12 11:23 [PATCH v2 1/2] rust: add example for `alias` argument in `module` macro documentation Aswin Unnikrishnan
@ 2024-05-12 11:23 ` Aswin Unnikrishnan
2024-05-27 19:31 ` Benno Lossin
2024-05-29 18:55 ` Vincenzo Palazzo
2024-05-27 19:31 ` [PATCH v2 1/2] rust: add example for `alias` argument in `module` macro documentation Benno Lossin
1 sibling, 2 replies; 5+ messages in thread
From: Aswin Unnikrishnan @ 2024-05-12 11:23 UTC (permalink / raw
To: Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho
Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Alice Ryhl, rust-for-linux, Aswin Unnikrishnan
Remove the mention of byte array as datatype for `module` macro arguments
since the arguments are defined as string, and `alias` is a string array.
Signed-off-by: Aswin Unnikrishnan <aswinunni01@gmail.com>
---
Changes in v2:
- Add expected string literal type in documentation for `module` macro
arguments since some `module` macro arguments expect ASCII string
literals.
- Link to v1: https://lore.kernel.org/rust-for-linux/20240419215015.157258-3-aswinunni01@gmail.com/T/#t
rust/macros/lib.rs | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/rust/macros/lib.rs b/rust/macros/lib.rs
index aa89b41fa10e..5214e07367c5 100644
--- a/rust/macros/lib.rs
+++ b/rust/macros/lib.rs
@@ -58,11 +58,11 @@
///
/// # Supported argument types
/// - `type`: type which implements the [`Module`] trait (required).
-/// - `name`: byte array of the name of the kernel module (required).
-/// - `author`: byte array of the author of the kernel module.
-/// - `description`: byte array of the description of the kernel module.
-/// - `license`: byte array of the license of the kernel module (required).
-/// - `alias`: byte array of alias name of the kernel module.
+/// - `name`: ASCII string literal of the name of the kernel module (required).
+/// - `author`: string literal of the author of the kernel module.
+/// - `description`: string literal of the description of the kernel module.
+/// - `license`: ASCII string literal of the license of the kernel module (required).
+/// - `alias`: array of ASCII string literals of the alias names of the kernel module.
#[proc_macro]
pub fn module(ts: TokenStream) -> TokenStream {
module::module(ts)
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/2] rust: fix datatype in docs for `module` macro arguments
2024-05-12 11:23 ` [PATCH v2 2/2] rust: fix datatype in docs for `module` macro arguments Aswin Unnikrishnan
@ 2024-05-27 19:31 ` Benno Lossin
2024-05-29 18:55 ` Vincenzo Palazzo
1 sibling, 0 replies; 5+ messages in thread
From: Benno Lossin @ 2024-05-27 19:31 UTC (permalink / raw
To: Aswin Unnikrishnan, Miguel Ojeda, Alex Gaynor,
Wedson Almeida Filho
Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Andreas Hindborg,
Alice Ryhl, rust-for-linux
On 12.05.24 13:23, Aswin Unnikrishnan wrote:
> Remove the mention of byte array as datatype for `module` macro arguments
> since the arguments are defined as string, and `alias` is a string array.
>
> Signed-off-by: Aswin Unnikrishnan <aswinunni01@gmail.com>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
---
Cheers,
Benno
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/2] rust: fix datatype in docs for `module` macro arguments
2024-05-12 11:23 ` [PATCH v2 2/2] rust: fix datatype in docs for `module` macro arguments Aswin Unnikrishnan
2024-05-27 19:31 ` Benno Lossin
@ 2024-05-29 18:55 ` Vincenzo Palazzo
1 sibling, 0 replies; 5+ messages in thread
From: Vincenzo Palazzo @ 2024-05-29 18:55 UTC (permalink / raw
To: Aswin Unnikrishnan
Cc: Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho, Boqun Feng,
Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
Alice Ryhl, rust-for-linux
> Remove the mention of byte array as datatype for `module` macro arguments
> since the arguments are defined as string, and `alias` is a string array.
>
> Signed-off-by: Aswin Unnikrishnan <aswinunni01@gmail.com>
> ---
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] rust: add example for `alias` argument in `module` macro documentation
2024-05-12 11:23 [PATCH v2 1/2] rust: add example for `alias` argument in `module` macro documentation Aswin Unnikrishnan
2024-05-12 11:23 ` [PATCH v2 2/2] rust: fix datatype in docs for `module` macro arguments Aswin Unnikrishnan
@ 2024-05-27 19:31 ` Benno Lossin
1 sibling, 0 replies; 5+ messages in thread
From: Benno Lossin @ 2024-05-27 19:31 UTC (permalink / raw
To: Aswin Unnikrishnan, Miguel Ojeda, Alex Gaynor,
Wedson Almeida Filho
Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Andreas Hindborg,
Alice Ryhl, rust-for-linux
On 12.05.24 13:23, Aswin Unnikrishnan wrote:
> Add example for `alias` argument supported by `module` macro.
> `alias` accepts an array of alternate names for the module as string.
>
> Reviewed-by: Alice Ryhl <aliceryhl@google.com>
> Signed-off-by: Aswin Unnikrishnan <aswinunni01@gmail.com>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
---
Cheers,
Benno
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-05-29 18:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-12 11:23 [PATCH v2 1/2] rust: add example for `alias` argument in `module` macro documentation Aswin Unnikrishnan
2024-05-12 11:23 ` [PATCH v2 2/2] rust: fix datatype in docs for `module` macro arguments Aswin Unnikrishnan
2024-05-27 19:31 ` Benno Lossin
2024-05-29 18:55 ` Vincenzo Palazzo
2024-05-27 19:31 ` [PATCH v2 1/2] rust: add example for `alias` argument in `module` macro documentation Benno Lossin
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 read-only IMAP folder(s) and NNTP newsgroup(s).