linux/rust
Danilo Krummrich a321f3ad0a 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 <aliceryhl@google.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Link: https://lore.kernel.org/r/20240223163726.12397-1-dakr@redhat.com
[ Reworded to fix typo and to make the link use the `Link:` tag. ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2024-04-02 17:41:56 +02:00
..
alloc rust: upgrade to Rust 1.77.1 2024-03-29 20:12:30 +01:00
bindings rust: bindings: Order headers alphabetically 2024-02-18 21:21:48 +01:00
kernel rust: str: add {make,to}_{upper,lower}case() to CString 2024-04-02 17:41:56 +02:00
macros rust: module: place generated init_module() function in .init.text 2024-02-25 19:17:31 +01:00
uapi net: phy: add Rust Asix PHY driver 2023-12-15 09:35:50 +00:00
.gitignore rust: support running Rust documentation tests as KUnit ones 2023-07-19 09:32:53 -06:00
bindgen_parameters rust: Ignore preserve-most functions 2023-12-13 01:09:55 +01:00
build_error.rs rust: add build_error crate 2022-12-04 01:59:16 +01:00
compiler_builtins.rs rust: upgrade to Rust 1.73.0 2023-10-15 21:25:08 +02:00
exports.c rust: replace <linux/module.h> with <linux/export.h> in rust/exports.c 2023-12-13 01:09:55 +01:00
helpers.c rust: workqueue: add helper for defining work_struct fields 2023-09-25 09:46:42 -10:00
Makefile Kbuild updates for v6.9 2024-03-21 14:41:00 -07:00