From 061a8ac6deab9c9043e59dcceea2e4de17dc450b Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Sat, 18 Oct 2025 15:16:22 -0400 Subject: samples: rust: platform: remove trailing commas This prepares for a later commit in which we introduce a custom formatting macro; that macro doesn't handle trailing commas so just remove them. Acked-by: Danilo Krummrich Reviewed-by: Benno Lossin Signed-off-by: Tamir Duberstein Link: https://patch.msgid.link/20251018-cstr-core-v18-1-9378a54385f8@gmail.com Signed-off-by: Miguel Ojeda --- samples/rust/rust_driver_platform.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'samples/rust') diff --git a/samples/rust/rust_driver_platform.rs b/samples/rust/rust_driver_platform.rs index 6473baf4f120..8a82e251820f 100644 --- a/samples/rust/rust_driver_platform.rs +++ b/samples/rust/rust_driver_platform.rs @@ -146,7 +146,7 @@ impl SampleDriver { let name = c_str!("test,u32-optional-prop"); let prop = fwnode.property_read::(name).or(0x12); - dev_info!(dev, "'{name}'='{prop:#x}' (default = 0x12)\n",); + dev_info!(dev, "'{name}'='{prop:#x}' (default = 0x12)\n"); // A missing required property will print an error. Discard the error to // prevent properties_parse from failing in that case. @@ -161,7 +161,7 @@ impl SampleDriver { let prop: [i16; 4] = fwnode.property_read(name).required_by(dev)?; dev_info!(dev, "'{name}'='{prop:?}'\n"); let len = fwnode.property_count_elem::(name)?; - dev_info!(dev, "'{name}' length is {len}\n",); + dev_info!(dev, "'{name}' length is {len}\n"); let name = c_str!("test,i16-array"); let prop: KVec = fwnode.property_read_array_vec(name, 4)?.required_by(dev)?; -- cgit v1.3 From 7b0c32cbed761335b0fa7f3db232ad69bc23ce69 Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Sun, 19 Oct 2025 22:13:49 +0200 Subject: samples: rust: debugfs: use `core::ffi::CStr` method names 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"). Link: https://patch.msgid.link/20251019213049.2060970-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda --- samples/rust/rust_debugfs_scoped.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'samples/rust') 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(()) } -- cgit v1.3