|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5 |
|
| #
211dcf77 |
| 02-May-2025 |
Miguel Ojeda <[email protected]> |
rust: clean Rust 1.88.0's `clippy::uninlined_format_args` lint
Starting with Rust 1.88.0 (expected 2025-06-26) [1], `rustc` may move back the `uninlined_format_args` to `style` from `pedantic` (it w
rust: clean Rust 1.88.0's `clippy::uninlined_format_args` lint
Starting with Rust 1.88.0 (expected 2025-06-26) [1], `rustc` may move back the `uninlined_format_args` to `style` from `pedantic` (it was there waiting for rust-analyzer suppotr), and thus we will start to see lints like:
warning: variables can be used directly in the `format!` string --> rust/macros/kunit.rs:105:37 | 105 | let kunit_wrapper_fn_name = format!("kunit_rust_wrapper_{}", test); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 105 - let kunit_wrapper_fn_name = format!("kunit_rust_wrapper_{}", test); 105 + let kunit_wrapper_fn_name = format!("kunit_rust_wrapper_{test}");
There is even a case that is a pure removal:
warning: variables can be used directly in the `format!` string --> rust/macros/module.rs:51:13 | 51 | format!("{field}={content}\0", field = field, content = content) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 51 - format!("{field}={content}\0", field = field, content = content) 51 + format!("{field}={content}\0")
The lints all seem like nice cleanups, thus just apply them.
We may want to disable `allow-mixed-uninlined-format-args` in the future.
Cc: [email protected] # Needed in 6.12.y and later (Rust is pinned in older LTSs). Link: https://github.com/rust-lang/rust-clippy/pull/14160 [1] Acked-by: Benno Lossin <[email protected]> Reviewed-by: Tamir Duberstein <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
|
Revision tags: v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5 |
|
| #
5928642b |
| 27-Feb-2025 |
Andreas Hindborg <[email protected]> |
rust: str: implement `strip_prefix` for `BStr`
Implement `strip_prefix` for `BStr` by deferring to `slice::strip_prefix` on the underlying `&[u8]`.
Reviewed-by: Gary Guo <[email protected]> Reviewed
rust: str: implement `strip_prefix` for `BStr`
Implement `strip_prefix` for `BStr` by deferring to `slice::strip_prefix` on the underlying `&[u8]`.
Reviewed-by: Gary Guo <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Daniel Almeida <[email protected]> Tested-by: Daniel Almeida <[email protected]> Signed-off-by: Andreas Hindborg <[email protected]> Tested-by: Daniel Gomez <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ Pluralized section name. Hid `use`. - Miguel ] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
| #
d2e3f798 |
| 27-Feb-2025 |
Andreas Hindborg <[email protected]> |
rust: str: implement `AsRef<BStr>` for `[u8]` and `BStr`
Implement `AsRef<BStr>` for `[u8]` and `BStr` so these can be used interchangeably for operations on `BStr`.
Reviewed-by: Gary Guo <gary@gar
rust: str: implement `AsRef<BStr>` for `[u8]` and `BStr`
Implement `AsRef<BStr>` for `[u8]` and `BStr` so these can be used interchangeably for operations on `BStr`.
Reviewed-by: Gary Guo <[email protected]> Tested-by: Daniel Almeida <[email protected]> Reviewed-by: Daniel Almeida <[email protected]> Signed-off-by: Andreas Hindborg <[email protected]> Reviewed-by: Fiona Behrens <[email protected]> Tested-by: Daniel Gomez <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
| #
50a5ff0a |
| 27-Feb-2025 |
Andreas Hindborg <[email protected]> |
rust: str: implement `Index` for `BStr`
The `Index` implementation on `BStr` was lost when we switched `BStr` from a type alias of `[u8]` to a newtype. Add back `Index` by implementing `Index` for `
rust: str: implement `Index` for `BStr`
The `Index` implementation on `BStr` was lost when we switched `BStr` from a type alias of `[u8]` to a newtype. Add back `Index` by implementing `Index` for `BStr` when `Index` would be implemented for `[u8]`.
Reviewed-by: Daniel Almeida <[email protected]> Tested-by: Daniel Almeida <[email protected]> Reviewed-by: Fiona Behrens <[email protected]> Signed-off-by: Andreas Hindborg <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Tested-by: Daniel Gomez <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
| #
3eff946d |
| 27-Feb-2025 |
Andreas Hindborg <[email protected]> |
rust: str: implement `PartialEq` for `BStr`
Implement `PartialEq` for `BStr` by comparing underlying byte slices.
Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Gary Guo <gary@garyguo.
rust: str: implement `PartialEq` for `BStr`
Implement `PartialEq` for `BStr` by comparing underlying byte slices.
Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Gary Guo <[email protected]> Reviewed-by: Daniel Almeida <[email protected]> Tested-by: Daniel Almeida <[email protected]> Signed-off-by: Andreas Hindborg <[email protected]> Reviewed-by: Fiona Behrens <[email protected]> Tested-by: Daniel Gomez <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1 |
|
| #
b6357e26 |
| 23-Nov-2024 |
Daniel Sedlak <[email protected]> |
rust: str: replace unwraps with question mark operators
Simplify the error handling by replacing unwraps with the question mark operator. Furthermore, unwraps can convey a wrong impression that unwr
rust: str: replace unwraps with question mark operators
Simplify the error handling by replacing unwraps with the question mark operator. Furthermore, unwraps can convey a wrong impression that unwrapping is fine in general, thus this patch removes this unwrapping.
Suggested-by: Miguel Ojeda <[email protected]> Link: https://lore.kernel.org/rust-for-linux/CANiq72nsK1D4NuQ1U7NqMWoYjXkqQSj4QuUEL98OmFbq022Z9A@mail.gmail.com/ Reviewed-by: Alice Ryhl <[email protected]> Signed-off-by: Daniel Sedlak <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ Slightly reworded commit. - Miguel ] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
| #
2a87f8b0 |
| 23-Nov-2024 |
Miguel Ojeda <[email protected]> |
rust: kbuild: run Clippy for `rusttest` code
Running Clippy for `rusttest` code is useful to catch issues there too, even if the code is not as critical. In the future, this code may also run in ker
rust: kbuild: run Clippy for `rusttest` code
Running Clippy for `rusttest` code is useful to catch issues there too, even if the code is not as critical. In the future, this code may also run in kernelspace and could be copy-pasted. Thus it is useful to keep it under the same standards. For instance, it will now make us add `// SAFETY` comments.
It also makes everything more consistent.
Thus clean the few issues spotted by Clippy and start running it.
Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
|
Revision tags: v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11 |
|
| #
9b98be76 |
| 13-Sep-2024 |
Gary Guo <[email protected]> |
rust: cleanup unnecessary casts
With `long` mapped to `isize`, `size_t`/`__kernel_size_t` mapped to `usize` and `char` mapped to `u8`, many of the existing casts are no longer necessary.
Signed-off
rust: cleanup unnecessary casts
With `long` mapped to `isize`, `size_t`/`__kernel_size_t` mapped to `usize` and `char` mapped to `u8`, many of the existing casts are no longer necessary.
Signed-off-by: Gary Guo <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ Moved `uaccess` changes to the previous commit, since they were irrefutable patterns that Rust >= 1.82.0 warns about. Removed a couple casts that now use `c""` literals. Rebased on top of `rust-next`. - Miguel ] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
| #
d072acda |
| 13-Sep-2024 |
Gary Guo <[email protected]> |
rust: use custom FFI integer types
Currently FFI integer types are defined in libcore. This commit creates the `ffi` crate and asks bindgen to use that crate for FFI integer types instead of `core::
rust: use custom FFI integer types
Currently FFI integer types are defined in libcore. This commit creates the `ffi` crate and asks bindgen to use that crate for FFI integer types instead of `core::ffi`.
This commit is preparatory and no type changes are made in this commit yet.
Signed-off-by: Gary Guo <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ Added `rustdoc`, `rusttest` and KUnit tests support. Rebased on top of `rust-next` (e.g. migrated more `core::ffi` cases). Reworded crate docs slightly and formatted. - Miguel ] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
| #
eb6f92cd |
| 04-Oct-2024 |
Danilo Krummrich <[email protected]> |
rust: str: test: replace `alloc::format`
The current implementation of tests in str.rs use `format!` to format strings for comparison, which, internally, creates a new `String`.
In order to prepare
rust: str: test: replace `alloc::format`
The current implementation of tests in str.rs use `format!` to format strings for comparison, which, internally, creates a new `String`.
In order to prepare for getting rid of Rust's alloc crate, we have to cut this dependency. Instead, implement `format!` for `CString`.
Note that for userspace tests, `Kmalloc`, which is backing `CString`'s memory, is just a type alias to `Cmalloc`.
Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Benno Lossin <[email protected]> Reviewed-by: Gary Guo <[email protected]> Signed-off-by: Danilo Krummrich <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
| #
58eff8e8 |
| 04-Oct-2024 |
Danilo Krummrich <[email protected]> |
rust: treewide: switch to the kernel `Vec` type
Now that we got the kernel `Vec` in place, convert all existing `Vec` users to make use of it.
Reviewed-by: Alice Ryhl <[email protected]> Reviewe
rust: treewide: switch to the kernel `Vec` type
Now that we got the kernel `Vec` in place, convert all existing `Vec` users to make use of it.
Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Benno Lossin <[email protected]> Reviewed-by: Gary Guo <[email protected]> Signed-off-by: Danilo Krummrich <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ Converted `kasan_test_rust.rs` too, as discussed. - Miguel ] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
|
Revision tags: v6.11-rc7 |
|
| #
db4f72c9 |
| 04-Sep-2024 |
Miguel Ojeda <[email protected]> |
rust: enable `clippy::undocumented_unsafe_blocks` lint
Checking that we are not missing any `// SAFETY` comments in our `unsafe` blocks is something we have wanted to do for a long time, as well as
rust: enable `clippy::undocumented_unsafe_blocks` lint
Checking that we are not missing any `// SAFETY` comments in our `unsafe` blocks is something we have wanted to do for a long time, as well as cleaning up the remaining cases that were not documented [1].
Back when Rust for Linux started, this was something that could have been done via a script, like Rust's `tidy`. Soon after, in Rust 1.58.0, Clippy implemented the `undocumented_unsafe_blocks` lint [2].
Even though the lint has a few false positives, e.g. in some cases where attributes appear between the comment and the `unsafe` block [3], there are workarounds and the lint seems quite usable already.
Thus enable the lint now.
We still have a few cases to clean up, so just allow those for the moment by writing a `TODO` comment -- some of those may be good candidates for new contributors.
Link: https://github.com/Rust-for-Linux/linux/issues/351 [1] Link: https://rust-lang.github.io/rust-clippy/master/#/undocumented_unsafe_blocks [2] Link: https://github.com/rust-lang/rust-clippy/issues/13189 [3] Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Trevor Gross <[email protected]> Tested-by: Gary Guo <[email protected]> Reviewed-by: Gary Guo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
|
Revision tags: v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3 |
|
| #
00280272 |
| 01-Apr-2024 |
Miguel Ojeda <[email protected]> |
rust: kernel: remove redundant imports
Rust's `unused_imports` lint covers both unused and redundant imports. In the upcoming 1.78.0, the lint detects more cases of redundant imports [1], e.g.:
rust: kernel: remove redundant imports
Rust's `unused_imports` lint covers both unused and redundant imports. In the upcoming 1.78.0, the lint detects more cases of redundant imports [1], e.g.:
error: the item `bindings` is imported redundantly --> rust/kernel/print.rs:38:9 | 38 | use crate::bindings; | ^^^^^^^^^^^^^^^ the item `bindings` is already defined by prelude
Most cases are `use crate::bindings`, plus a few other items like `Box`. Thus clean them up.
Note that, in the `bindings` case, the message "defined by prelude" above means the extern prelude, i.e. the `--extern` flags we pass.
Link: https://github.com/rust-lang/rust/pull/117772 [1] Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
|
Revision tags: v6.9-rc2 |
|
| #
2c109285 |
| 28-Mar-2024 |
Wedson Almeida Filho <[email protected]> |
rust: kernel: remove usage of `allocator_api` unstable feature
With the adoption of `BoxExt` and `VecExt`, we don't need the functions provided by this feature (namely the methods prefixed with `try
rust: kernel: remove usage of `allocator_api` unstable feature
With the adoption of `BoxExt` and `VecExt`, we don't need the functions provided by this feature (namely the methods prefixed with `try_` and different allocator per collection instance).
We do need `AllocError`, but we define our own as it is a trivial empty struct.
Reviewed-by: Benno Lossin <[email protected]> Signed-off-by: Wedson Almeida Filho <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
| #
5ab560ce |
| 28-Mar-2024 |
Wedson Almeida Filho <[email protected]> |
rust: alloc: update `VecExt` to take allocation flags
We also rename the methods by removing the `try_` prefix since the names are available due to our usage of the `no_global_oom_handling` config w
rust: alloc: update `VecExt` to take allocation flags
We also rename the methods by removing the `try_` prefix since the names are available due to our usage of the `no_global_oom_handling` config when building the `alloc` crate.
Reviewed-by: Boqun Feng <[email protected]> Signed-off-by: Wedson Almeida Filho <[email protected]> Reviewed-by: Benno Lossin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
| #
11795ae4 |
| 28-Mar-2024 |
Wedson Almeida Filho <[email protected]> |
kbuild: use the upstream `alloc` crate
Switch away from our fork of the `alloc` crate. We remove it altogether in the next commit.
Signed-off-by: Wedson Almeida Filho <[email protected]> Link:
kbuild: use the upstream `alloc` crate
Switch away from our fork of the `alloc` crate. We remove it altogether in the next commit.
Signed-off-by: Wedson Almeida Filho <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
|
Revision tags: v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6 |
|
| #
a321f3ad |
| 23-Feb-2024 |
Danilo Krummrich <[email protected]> |
rust: str: add {make,to}_{upper,lower}case() to CString
Add functions to convert a CString to upper- / lowercase, either in-place or by creating a copy of the original CString.
Naming follows the o
rust: str: add {make,to}_{upper,lower}case() to CString
Add functions to convert a CString to upper- / lowercase, either in-place or by creating a copy of the original CString.
Naming follows the one from the Rust stdlib, where functions starting with 'to' create a copy and functions starting with 'make' perform an in-place conversion.
This is required by the Nova project (GSP only Rust successor of Nouveau) to convert stringified enum values (representing different GPU chipsets) to strings in order to generate the corresponding firmware paths. See also [1].
Link: https://rust-for-linux.zulipchat.com/#narrow/stream/288089-General/topic/String.20manipulation.20in.20kernel.20Rust [1] Reviewed-by: Alice Ryhl <[email protected]> Signed-off-by: Danilo Krummrich <[email protected]> Reviewed-by: Benno Lossin <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ Reworded to fix typo and to make the link use the `Link:` tag. ] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
|
Revision tags: v6.8-rc5, v6.8-rc4 |
|
| #
4951ddd5 |
| 08-Feb-2024 |
Yutaro Ohno <[email protected]> |
rust: str: implement `Display` and `Debug` for `BStr`
Currently, `BStr` is just a type alias of `[u8]`, limiting its representation to a byte list rather than a character list, which is not ideal fo
rust: str: implement `Display` and `Debug` for `BStr`
Currently, `BStr` is just a type alias of `[u8]`, limiting its representation to a byte list rather than a character list, which is not ideal for printing and debugging.
Implement `Display` and `Debug` traits for `BStr` to facilitate easier printing and debugging.
Also, for this purpose, change `BStr` from a type alias of `[u8]` to a struct wrapper of `[u8]`.
Co-developed-by: Virgile Andreani <[email protected]> Signed-off-by: Virgile Andreani <[email protected]> Signed-off-by: Yutaro Ohno <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/ZcSlGMGP-e9HqybA@ohnotp [ Formatted code comment. ] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
|
Revision tags: v6.8-rc3 |
|
| #
4c62348d |
| 31-Jan-2024 |
Valentin Obst <[email protected]> |
rust: str: move SAFETY comment in front of unsafe block
SAFETY comments should immediately precede the unsafe block they justify. Move assignment to `bar` past comment as it is safe.
Signed-off-by:
rust: str: move SAFETY comment in front of unsafe block
SAFETY comments should immediately precede the unsafe block they justify. Move assignment to `bar` past comment as it is safe.
Signed-off-by: Valentin Obst <[email protected]> Reviewed-by: Trevor Gross <[email protected]> Reviewed-by: Martin Rodriguez Reboredo <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
| #
8cfce47d |
| 31-Jan-2024 |
Valentin Obst <[email protected]> |
rust: str: use `NUL` instead of 0 in doc comments
Throughout the module, bytes with the value zero are referred to as `NUL` bytes. Adapt the only two outliers.
Signed-off-by: Valentin Obst <kernel@
rust: str: use `NUL` instead of 0 in doc comments
Throughout the module, bytes with the value zero are referred to as `NUL` bytes. Adapt the only two outliers.
Signed-off-by: Valentin Obst <[email protected]> Reviewed-by: Trevor Gross <[email protected]> Reviewed-by: Martin Rodriguez Reboredo <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
| #
b6cda913 |
| 31-Jan-2024 |
Valentin Obst <[email protected]> |
rust: kernel: fix multiple typos in documentation
Fixes multiple trivial typos in documentation and comments of the kernel crate.
allocator: - Fix a trivial list item alignment issue in the last SA
rust: kernel: fix multiple typos in documentation
Fixes multiple trivial typos in documentation and comments of the kernel crate.
allocator: - Fix a trivial list item alignment issue in the last SAFETY comment of `krealloc_aligned`.
init: - Replace 'type' with 'trait' in the doc comments of the `PinInit` and `Init` traits. - Add colons before starting lists. - Add spaces between the type and equal sign to respect the code formatting rules in example code. - End a sentence with a full stop instead of a colon.
ioctl: - Replace 'an' with 'a' where appropriate.
str: - Replace 'Return' with 'Returns' in the doc comment of `bytes_written` as the text describes what the function does.
sync/lock: - Fix a trivial list item alignment issue in the Safety section of the `Backend` trait's description.
sync/lock/spinlock: - The code in this module operates on spinlocks, not mutexes. Thus, replace 'mutex' with 'spinlock' in the SAFETY comment of `unlock`.
workqueue: - Replace "wont" with "won't" in the doc comment of `__enqueue`.
Signed-off-by: Valentin Obst <[email protected]> Reviewed-by: Trevor Gross <[email protected]> Reviewed-by: Martin Rodriguez Reboredo <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
|
Revision tags: v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4, v6.5-rc3, v6.5-rc2 |
|
| #
c3f41b00 |
| 14-Jul-2023 |
Asahi Lina <[email protected]> |
rust: kernel: str: Implement Debug for CString
Make it possible to use a `CString` with the `pr_*` macros directly. That is, instead of:
pr_debug!("trying to open {:?}\n", &*filename);
we can
rust: kernel: str: Implement Debug for CString
Make it possible to use a `CString` with the `pr_*` macros directly. That is, instead of:
pr_debug!("trying to open {:?}\n", &*filename);
we can now write:
pr_debug!("trying to open {:?}\n", filename);
Signed-off-by: Asahi Lina <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Benno Lossin <[email protected]> Reviewed-by: Martin Rodriguez Reboredo <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ Reworded to use Alice's commit message as discussed. ] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
| #
cf36a495 |
| 18-Jul-2023 |
Miguel Ojeda <[email protected]> |
rust: str: make doctests compilable/testable
Rust documentation tests are going to be build/run-tested with the KUnit integration added in a future patch, thus update them to make them compilable/te
rust: str: make doctests compilable/testable
Rust documentation tests are going to be build/run-tested with the KUnit integration added in a future patch, thus update them to make them compilable/testable so that we may start enforcing it.
Reviewed-by: Björn Roy Baron <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Martin Rodriguez Reboredo <[email protected]> Reviewed-by: Vincenzo Palazzo <[email protected]> Reviewed-by: David Gow <[email protected]> Signed-off-by: Miguel Ojeda <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1 |
|
| #
66bd7533 |
| 03-May-2023 |
Alice Ryhl <[email protected]> |
rust: str: add conversion from `CStr` to `CString`
These methods can be used to copy the data in a temporary c string into a separate allocation, so that it can be accessed later even if the origina
rust: str: add conversion from `CStr` to `CString`
These methods can be used to copy the data in a temporary c string into a separate allocation, so that it can be accessed later even if the original is deallocated.
The API in this change mirrors the standard library API for the `&str` and `String` types. The `ToOwned` trait is not implemented because it assumes that allocations are infallible.
Reviewed-by: Benno Lossin <[email protected]> Signed-off-by: Alice Ryhl <[email protected]> Reviewed-by: Martin Rodriguez Reboredo <[email protected]> Reviewed-by: Andreas Hindborg <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
|
Revision tags: v6.3, v6.3-rc7, v6.3-rc6, v6.3-rc5, v6.3-rc4, v6.3-rc3, v6.3-rc2, v6.3-rc1 |
|
| #
88e8c2ec |
| 03-Mar-2023 |
Patrick Blass <[email protected]> |
rust: str: fix requierments->requirements typo
Fix a trivial spelling error in the `rust/kernel/str.rs` file.
Fixes: 247b365dc8dc ("rust: add `kernel` crate") Reported-by: Miguel Ojeda <ojeda@kerne
rust: str: fix requierments->requirements typo
Fix a trivial spelling error in the `rust/kernel/str.rs` file.
Fixes: 247b365dc8dc ("rust: add `kernel` crate") Reported-by: Miguel Ojeda <[email protected]> Link: https://github.com/Rust-for-Linux/linux/issues/978 Signed-off-by: Patrick Blass <[email protected]> Reviewed-by: Vincenzo Palazzo <[email protected]> [Reworded slightly] Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|