Re: [PATCH 3/3] samples: rust: Updated the example using the Rust MiscDevice abstraction
From: gregkh@xxxxxxxxxxxxxxxxxxx
Date: Thu Sep 18 2025 - 11:01:29 EST
On Thu, Sep 18, 2025 at 02:45:44PM +0000, ManeraKai wrote:
> This sample driver will now:
> - use the new general `FileOperations` abstraction.
> - have `read` and `write` methods, that use a persistent kernel buffer to
> store data.
>
> Signed-off-by: ManeraKai <manerakai@xxxxxxxxxxxxxx>
> ---
> samples/rust/rust_misc_device.rs | 283 +++++++++++++++++++++----------
> 1 file changed, 195 insertions(+), 88 deletions(-)
>
> diff --git a/samples/rust/rust_misc_device.rs b/samples/rust/rust_misc_device.rs
> index d052294cebb8..c8e90eb9b9ad 100644
> --- a/samples/rust/rust_misc_device.rs
> +++ b/samples/rust/rust_misc_device.rs
> @@ -7,92 +7,139 @@
> //! Below is an example userspace C program that exercises this sample's functionality.
> //!
> //! ```c
> -//! #include <stdio.h>
You seem to have dropped the leading ' ' character, which makes this
diff almost impossible to review :(
Please fix that up and only change the modified files, not all of them,
in the example.
thanks,
greg k-h