public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 1/2] rust: error: Add EOVERFLOW
@ 2024-12-05 11:32 Abdiel Janulgue
  2024-12-05 11:32 ` [PATCH v6 2/2] rust: add dma coherent allocator abstraction Abdiel Janulgue
  0 siblings, 1 reply; 6+ messages in thread
From: Abdiel Janulgue @ 2024-12-05 11:32 UTC (permalink / raw)
  To: daniel.almeida
  Cc: Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross, Danilo Krummrich, Valentin Obst, open list:RUST,
	open list, Christoph Hellwig, Marek Szyprowski, Robin Murphy,
	airlied, open list:DMA MAPPING HELPERS, Abdiel Janulgue

Trivial addition for missing EOVERFLOW error. This is used by a
subsequent patch that might require returning EOVERFLOW as a result
of `checked_mul`.

Signed-off-by: Abdiel Janulgue <abdiel.janulgue@gmail.com>
---
 rust/kernel/error.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rust/kernel/error.rs b/rust/kernel/error.rs
index 52c502432447..cd57fac7f1f9 100644
--- a/rust/kernel/error.rs
+++ b/rust/kernel/error.rs
@@ -63,6 +63,7 @@ macro_rules! declare_err {
     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.");

base-commit: 40384c840ea1944d7c5a392e8975ed088ecf0b37
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-12-05 16:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-05 11:32 [PATCH v6 1/2] rust: error: Add EOVERFLOW Abdiel Janulgue
2024-12-05 11:32 ` [PATCH v6 2/2] rust: add dma coherent allocator abstraction Abdiel Janulgue
2024-12-05 13:07   ` Robin Murphy
2024-12-05 14:25     ` Abdiel Janulgue
2024-12-05 16:41       ` Daniel Almeida
2024-12-05 16:47         ` Robin Murphy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox