rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] rust: refactor `to_result`
@ 2025-10-13 12:41 Onur Özkan
  2025-10-13 12:41 ` [PATCH v3 1/2] rust: add `ToResult` trait Onur Özkan
  2025-10-13 12:41 ` [PATCH v3 2/2] rust: drop `error::to_result` and utilize `ToResult` Onur Özkan
  0 siblings, 2 replies; 7+ messages in thread
From: Onur Özkan @ 2025-10-13 12:41 UTC (permalink / raw)
  To: rust-for-linux
  Cc: ojeda, alex.gaynor, boqun.feng, gary, bjorn3_gh, lossin,
	a.hindborg, aliceryhl, tmgross, dakr, tamird, Onur Özkan

Changes in v3:
  - New trait `error::ToResult` added and implemented it on isize and
    i32 types (first patch).
  - Removed `error::to_result` entirely and replaced its usage with
    `error::ToResult` (second patch).

Changes in v2:
  - Removed `map(|_| ())` calls from v1 and replaced them with
    `to_result(...)?` and `Ok(())` (except miscdevice.rs, as it
    required `Ok::<(), Error>(())` which is less clean).

  - Rebased on latest regulator/for-next and fixed the build error.

Onur Özkan (2):
  rust: add `ToResult` trait
  rust: drop `error::to_result` and utilize `ToResult`

 drivers/android/binder/rust_binder_main.rs |   3 +-
 rust/kernel/auxiliary.rs                   |   9 +-
 rust/kernel/block/mq/gen_disk.rs           |  12 +--
 rust/kernel/block/mq/tag_set.rs            |   5 +-
 rust/kernel/clk.rs                         |  18 +++-
 rust/kernel/configfs.rs                    |   9 +-
 rust/kernel/cpufreq.rs                     |  12 ++-
 rust/kernel/device/property.rs             |  12 +--
 rust/kernel/devres.rs                      |  13 ++-
 rust/kernel/dma.rs                         |  18 ++--
 rust/kernel/drm/driver.rs                  |   4 +-
 rust/kernel/drm/gem/mod.rs                 |  12 ++-
 rust/kernel/error.rs                       | 113 +++++++++++++--------
 rust/kernel/fs/file.rs                     |   4 +-
 rust/kernel/irq/request.rs                 |  10 +-
 rust/kernel/maple_tree.rs                  |  12 ++-
 rust/kernel/miscdevice.rs                  |   6 +-
 rust/kernel/mm/virt.rs                     |   6 +-
 rust/kernel/net/phy.rs                     |  43 +++++---
 rust/kernel/net/phy/reg.rs                 |  22 ++--
 rust/kernel/opp.rs                         |  72 +++++++------
 rust/kernel/pci.rs                         |  13 ++-
 rust/kernel/platform.rs                    |   6 +-
 rust/kernel/regulator.rs                   |  32 ++++--
 rust/kernel/scatterlist.rs                 |  13 +--
 rust/kernel/security.rs                    |  23 +++--
 rust/kernel/str.rs                         |   5 +-
 rust/kernel/uaccess.rs                     |  15 ++-
 rust/kernel/usb.rs                         |   9 +-
 29 files changed, 324 insertions(+), 207 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2025-10-13 19:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-13 12:41 [PATCH v3 0/2] rust: refactor `to_result` Onur Özkan
2025-10-13 12:41 ` [PATCH v3 1/2] rust: add `ToResult` trait Onur Özkan
2025-10-13 12:48   ` Onur Özkan
2025-10-13 12:41 ` [PATCH v3 2/2] rust: drop `error::to_result` and utilize `ToResult` Onur Özkan
2025-10-13 17:04   ` Miguel Ojeda
2025-10-13 19:03     ` Onur Özkan
2025-10-13 18:29   ` Alice Ryhl

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).