rust: error: declare errors using macro
authorFinn Behrens <me@kloenk.dev>
Thu, 10 Nov 2022 16:41:20 +0000 (17:41 +0100)
committerMiguel Ojeda <ojeda@kernel.org>
Sun, 4 Dec 2022 00:59:15 +0000 (01:59 +0100)
commit4b0c68bd0d8b0e23ab1763d4a6632720dd3f1a83
tree4b0fa83c8260c2352244abb7f72fd6d9a563a9a2
parentb13c9880f909ca5e406d9b3d061359fd8fb0c514
rust: error: declare errors using macro

Add a macro to declare errors, which simplifies the work needed to
add each one, avoids repetition of the code and makes it easier to
change the way they are declared.

Signed-off-by: Finn Behrens <me@kloenk.dev>
Reviewed-by: Gary Guo <gary@garyguo.net>
[Reworded, adapted for upstream and applied latest changes]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/kernel/error.rs