Re: [PATCH v2] rust: error: add missing error codes

From: Martin Rodriguez Reboredo
Date: Thu May 04 2023 - 08:40:40 EST


On 5/4/23 03:48, Alice Ryhl wrote:
This adds the error codes from `include/linux/errno.h` to the list of
Rust error constants. These errors were not included originally, because
they are not supposed to be visible from userspace. However, they are
still a perfectly valid error to use when writing a kernel driver. For
example, you might want to return ERESTARTSYS if you receive a signal
during a call to `schedule`.

This patch inserts an annotation to skip rustfmt on the list of error
codes. Without it, three of the error codes are split over several
lines, which looks terribly inconsistent.

Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
---
rust/kernel/error.rs | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

[...]

Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@xxxxxxxxx>