aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorWedson Almeida Filho <wedsonaf@gmail.com>2023-04-03 18:48:15 +0900
committerMiguel Ojeda <ojeda@kernel.org>2023-04-12 18:41:04 +0200
commitef4dc4cc7001e9cce8a3b556362171648be9ad92 (patch)
tree8e0cad51c7ef0000157066084c739aa0a459a219 /tools/perf/scripts/python/export-to-postgresql.py
parentrust: error: Add a helper to convert a C ERR_PTR to a `Result` (diff)
downloadwireguard-linux-ef4dc4cc7001e9cce8a3b556362171648be9ad92.tar.xz
wireguard-linux-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 <foxhlchen@gmail.com> Signed-off-by: Fox Chen <foxhlchen@gmail.com> Co-developed-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Signed-off-by: Asahi Lina <lina@asahilina.net> Link: https://lore.kernel.org/r/20230224-rust-error-v3-6-03779bddc02b@asahilina.net Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions