]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rust: error: Add EOVERFLOW
authorAbdiel Janulgue <abdiel.janulgue@gmail.com>
Mon, 17 Mar 2025 18:52:08 +0000 (20:52 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Thu, 20 Mar 2025 20:44:46 +0000 (21:44 +0100)
Trivial addition for missing EOVERFLOW error. This is used by a
subsequent patch that might require returning EOVERFLOW as a result
of `checked_mul`.

Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@gmail.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20250317185345.2608976-2-abdiel.janulgue@gmail.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/kernel/error.rs

index 376f6a6ae5e381c96cfd9d9b72f97c0db73bb195..30014d507ed3688c26977a6d02ae9973792312aa 100644 (file)
@@ -64,6 +64,7 @@ pub mod code {
     declare_err!(EPIPE, "Broken pipe.");
     declare_err!(EDOM, "Math argument out of domain of func.");
     declare_err!(ERANGE, "Math result not representable.");
+    declare_err!(EOVERFLOW, "Value too large for defined data type.");
     declare_err!(ERESTARTSYS, "Restart the system call.");
     declare_err!(ERESTARTNOINTR, "System call was interrupted by a signal and will be restarted.");
     declare_err!(ERESTARTNOHAND, "Restart if no handler.");