* [PATCH] samples: rust: debugfs: use `core::ffi::CStr` method names
[not found] <20251018-cstr-core-v18-7-9378a54385f8@gmail.com>
@ 2025-10-19 21:30 ` Miguel Ojeda
0 siblings, 0 replies; only message in thread
From: Miguel Ojeda @ 2025-10-19 21:30 UTC (permalink / raw)
To: tamird, Greg Kroah-Hartman, Rafael J. Wysocki, Danilo Krummrich,
Miguel Ojeda, Alex Gaynor
Cc: Liam.Howlett, a.hindborg, airlied, aliceryhl, arve, axboe,
bhelgaas, bjorn3_gh, boqun.feng, brauner, broonie, cmllamas,
dri-devel, gary, jack, joelagnelf, justinstitt, kwilczynski,
leitao, lgirdwood, linux-block, linux-clk, linux-fsdevel,
linux-kernel, linux-pci, linux-pm, llvm, longman, lorenzo.stoakes,
lossin, maco, mcgrof, mingo, mmaurer, morbo, mturquette, nathan,
nick.desaulniers+lkml, nm, peterz, russ.weight, rust-for-linux,
sboyd, simona, surenb, tamird, tkjos, tmgross, urezki, vbabka,
vireshk, viro, will, patches
Prepare for `core::ffi::CStr` taking the place of `kernel::str::CStr` by
avoiding methods that only exist on the latter.
This backslid in commit d4a5d397c7fb ("samples: rust: Add scoped debugfs
sample driver").
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
samples/rust/rust_debugfs_scoped.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/rust/rust_debugfs_scoped.rs b/samples/rust/rust_debugfs_scoped.rs
index b0c4e76b123e..eb870e9986b8 100644
--- a/samples/rust/rust_debugfs_scoped.rs
+++ b/samples/rust/rust_debugfs_scoped.rs
@@ -38,7 +38,7 @@ fn remove_file_write(
mod_data
.devices
.lock()
- .retain(|device| device.name.as_bytes() != to_remove.as_bytes());
+ .retain(|device| device.name.to_bytes() != to_remove.to_bytes());
Ok(())
}
base-commit: b214b442f2fa78aad04ebe1b5cad2c1d94120cb7
--
2.51.0
^ permalink raw reply related [flat|nested] only message in thread