rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] rust: error: Add missing wrappers to convert to/from kernel error codes
@ 2023-02-24  8:50 Asahi Lina
  2023-02-24  8:50 ` [PATCH 1/5] rust: error: Add Error::to_ptr() Asahi Lina
                   ` (4 more replies)
  0 siblings, 5 replies; 27+ messages in thread
From: Asahi Lina @ 2023-02-24  8:50 UTC (permalink / raw)
  To: Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho, Boqun Feng,
	Gary Guo, Björn Roy Baron, Sven Van Asbroeck
  Cc: Fox Chen, rust-for-linux, linux-kernel, asahi, Asahi Lina

Hi everyone!

This series is part of the set of dependencies for the drm/asahi
Apple M1/M2 GPU driver.

It adds a bunch of missing wrappers in kernel::error, which are useful
to convert to/from kernel error codes. Since these will be used by many
abstractions coming up soon, I think it makes sense to merge them as
soon as possible instead of bundling them with the first user. Hence,
they have allow() tags to silence dead code warnings. These can be
removed as soon as the first user is in the kernel crate.

Getting this in first allows the subsequent abstractions to be merged in
any order, so we don't have to worry about piecewise rebasing and fixing
conflicts in the Error wrappers. See [1] for a complete tree with the DRM
abstractions and all other miscellaneous work-in-progress prerequisites
rebased on top of mainline.

Most of these have been extracted from the rust-for-linux/rust branch,
with author attribution to the first/primary author and Co-developed-by:
for everyone else who touched the code.

Attribution changes:
- One of the patches had Miguel's old email in the tags, updated that per
  his request.
- Wedson's email changed from @google.com to @gmail.com (I understand
  this is the current one).

Sven: There is one patch from you in this series, do you want to send it
yourself directly? I understand Wedson and Miguel are okay with me
sending stuff on their behalf.

[1] https://github.com/Rust-for-Linux/linux/pull/969/commits

Signed-off-by: Asahi Lina <lina@asahilina.net>
---
Asahi Lina (1):
      rust: error: Add Error::to_ptr()

Miguel Ojeda (1):
      rust: error: Add Error::from_kernel_errno()

Sven Van Asbroeck (1):
      rust: error: Add a helper to convert a C ERR_PTR to a `Result`

Wedson Almeida Filho (2):
      rust: error: Add to_result() helper
      rust: error: Add from_kernel_result!() macro
 rust/helpers.c       |  19 +++++++
 rust/kernel/error.rs | 137 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 156 insertions(+)
---
base-commit: 83f978b63fa7ad474ca22d7e2772c5988101c9bd
change-id: 20230224-rust-error-f2871fbc907f

Thank you,
~~ Lina


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

end of thread, other threads:[~2023-03-07 20:21 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-24  8:50 [PATCH 0/5] rust: error: Add missing wrappers to convert to/from kernel error codes Asahi Lina
2023-02-24  8:50 ` [PATCH 1/5] rust: error: Add Error::to_ptr() Asahi Lina
2023-02-25 22:14   ` Gary Guo
2023-02-26 14:26     ` Miguel Ojeda
2023-03-07 20:21       ` Miguel Ojeda
2023-02-24  8:50 ` [PATCH 2/5] rust: error: Add Error::from_kernel_errno() Asahi Lina
2023-02-25 22:19   ` Gary Guo
2023-02-26 13:56     ` Miguel Ojeda
2023-02-27 13:27   ` Andreas Hindborg
2023-02-24  8:50 ` [PATCH 3/5] rust: error: Add to_result() helper Asahi Lina
2023-02-27 13:26   ` Andreas Hindborg
2023-02-24  8:50 ` [PATCH 4/5] rust: error: Add a helper to convert a C ERR_PTR to a `Result` Asahi Lina
2023-02-27 13:41   ` Andreas Hindborg
2023-02-27 13:52     ` Miguel Ojeda
2023-02-24  8:50 ` [PATCH 5/5] rust: error: Add from_kernel_result!() macro Asahi Lina
2023-02-24 23:56   ` Boqun Feng
2023-02-25  2:31     ` Asahi Lina
2023-02-25 22:23     ` Gary Guo
2023-02-26  2:22       ` Boqun Feng
2023-02-26 13:36         ` Gary Guo
2023-02-26 18:16           ` Boqun Feng
2023-02-26 20:59             ` Miguel Ojeda
2023-02-26 22:13               ` Boqun Feng
2023-02-27 12:10                 ` Miguel Ojeda
2023-02-27 16:11                   ` Boqun Feng
2023-02-27 13:59               ` Martin Rodriguez Reboredo
2023-02-26 13:40         ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).