diff options
| author | Wedson Almeida Filho <[email protected]> | 2023-04-03 09:48:15 +0000 |
|---|---|---|
| committer | Miguel Ojeda <[email protected]> | 2023-04-12 16:41:04 +0000 |
| commit | ef4dc4cc7001e9cce8a3b556362171648be9ad92 (patch) | |
| tree | 8e0cad51c7ef0000157066084c739aa0a459a219 /rust/macros/lib.rs | |
| parent | rust: error: Add a helper to convert a C ERR_PTR to a `Result` (diff) | |
| download | kernel-ef4dc4cc7001e9cce8a3b556362171648be9ad92.tar.gz kernel-ef4dc4cc7001e9cce8a3b556362171648be9ad92.zip | |
rust: error: Add from_result() helper
Add a helper function to easily return C result codes from a Rust function
that calls functions which return a Result<T>.
Lina: Imported from rust-for-linux/rust, originally developed by Wedson
as part of file_operations.rs. Added the allow() flags since there is no
user in the kernel crate yet and fixed a typo in a comment. Replaced the
macro with a function taking a closure, per discussion on the ML.
Co-developed-by: Fox Chen <[email protected]>
Signed-off-by: Fox Chen <[email protected]>
Co-developed-by: Miguel Ojeda <[email protected]>
Signed-off-by: Miguel Ojeda <[email protected]>
Signed-off-by: Wedson Almeida Filho <[email protected]>
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Signed-off-by: Asahi Lina <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/macros/lib.rs')
0 files changed, 0 insertions, 0 deletions
