Commit Graph

9 Commits

Author SHA1 Message Date
Suyono 358c1104dc compatibility: updated module declaration 2023-04-09 23:37:43 +10:00
Raphael Nestler e36fc14c01 Update for Linux 6.2
Signed-off-by: Raphael Nestler <raphael.nestler@gmail.com>
2023-01-24 15:22:41 +01:00
Raphael Nestler 2fcc7219e4 Fix build for Linux 6.1 2022-12-18 20:47:44 +01:00
Miguel Ojeda 48c6c6477a rust_out_of_tree: change example data to a `Vec`
This follows the contents of `samples/rust/rust_minimal.rs` in v9, which
is the trimmed down version of v8 where `String` is not in `alloc` anymore.

Now, the log looks like:

    [    1.076945] rust_out_of_tree: Rust out-of-tree sample (init)
    [    1.084944] rust_out_of_tree: My numbers are [72, 108, 200]
    [    1.085944] rust_out_of_tree: Rust out-of-tree sample (exit)

Link: https://lore.kernel.org/lkml/20220805154231.31257-27-ojeda@kernel.org/
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-08-06 14:19:29 +02:00
Miguel Ojeda b1da1b5ff9 rust_out_of_tree: use string literals in `module!` macro
See commit 593e65924b2e ("rust: take str literal instead bstr literal
in `module!` macro") in the main repository:

    For simplicity (avoid parsing), escape sequences and raw string literals
    are not yet handled.

    Module names, aliases and license strings are restricted to ASCII only.

    Signed-off-by: Gary Guo <gary@garyguo.net>

Link: https://github.com/Rust-for-Linux/linux/issues/252
Link: https://lore.kernel.org/lkml/YukvvPOOu8uZl7+n@yadro.com/
Link: 593e65924b
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-08-06 14:19:06 +02:00
Miguel Ojeda e22f8fe803 rust_out_of_tree: use `GPL` as the license string instead of `GPL v2`
See commit dda49a0a5bb6 ("treewide: use `GPL` as the license string
instead of `GPL v2`") in the main repository:

    Since commit bf7fbeeae6db ("module: Cure the MODULE_LICENSE "GPL" vs.
    "GPL v2" bogosity"), Documentation/process/license-rules.rst explains
    that `MODULE_LICENSE` arguments can simply use `GPL` instead of `GPL v2`,
    because it is not meant to replace the proper licensing information.

    Since the `license:` field of the `module!` macro is the same as
    `MODULE_LICENSE`, use the simpler form in Rust too.

Link: dda49a0a5b
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-08-06 14:18:46 +02:00
Sean Nash 44c8594a77 Rename KernelModule to kernel::Module
Signed-off-by: Sean Nash <sean.c.nash@gmail.com>
2022-05-01 09:54:12 -04:00
Miguel Ojeda c53324dd9a Remove `no_std` and `feature(...)` crate attributes
Since PR https://github.com/Rust-for-Linux/linux/pull/635 ("rust:
avoid the need of crate attributes in kernel modules") in the main
repository, these attributes are handled by the build system, thus
there is no need (and it is an error) to specify them.

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-02-09 00:43:23 +01:00
Miguel Ojeda 6f1b54e2dc Initial commit
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-12-22 21:46:30 +01:00