linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rust: init: remove old workaround
@ 2025-07-09 22:34 Tamir Duberstein
  2025-07-10  7:20 ` Alice Ryhl
  2025-07-13 20:33 ` Miguel Ojeda
  0 siblings, 2 replies; 3+ messages in thread
From: Tamir Duberstein @ 2025-07-09 22:34 UTC (permalink / raw)
  To: Benno Lossin, Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
	Björn Roy Baron, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	Danilo Krummrich
  Cc: rust-for-linux, linux-kernel, Tamir Duberstein

`Error::from_errno` is `pub` since commit 5ed147473458 ("rust: error:
make conversion functions public"), thus remove this workaround which is
no longer needed.

Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
 rust/kernel/init.rs | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/rust/kernel/init.rs b/rust/kernel/init.rs
index 8d228c237954..be3a25932342 100644
--- a/rust/kernel/init.rs
+++ b/rust/kernel/init.rs
@@ -77,13 +77,6 @@
 //! #     pub unsafe fn destroy_foo(_ptr: *mut foo) {}
 //! #     pub unsafe fn enable_foo(_ptr: *mut foo, _flags: u32) -> i32 { 0 }
 //! # }
-//! # // `Error::from_errno` is `pub(crate)` in the `kernel` crate, thus provide a workaround.
-//! # trait FromErrno {
-//! #     fn from_errno(errno: core::ffi::c_int) -> Error {
-//! #         // Dummy error that can be constructed outside the `kernel` crate.
-//! #         Error::from(core::fmt::Error)
-//! #     }
-//! # }
 //! # impl FromErrno for Error {}
 //! /// # Invariants
 //! ///

---
base-commit: 2009a2d5696944d85c34d75e691a6f3884e787c0
change-id: 20250709-init-remove-old-workaround-a6ec6792e010

Best regards,
--  
Tamir Duberstein <tamird@gmail.com>


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

* Re: [PATCH] rust: init: remove old workaround
  2025-07-09 22:34 [PATCH] rust: init: remove old workaround Tamir Duberstein
@ 2025-07-10  7:20 ` Alice Ryhl
  2025-07-13 20:33 ` Miguel Ojeda
  1 sibling, 0 replies; 3+ messages in thread
From: Alice Ryhl @ 2025-07-10  7:20 UTC (permalink / raw)
  To: Tamir Duberstein
  Cc: Benno Lossin, Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
	Björn Roy Baron, Andreas Hindborg, Trevor Gross,
	Danilo Krummrich, rust-for-linux, linux-kernel

On Wed, Jul 09, 2025 at 06:34:33PM -0400, Tamir Duberstein wrote:
> `Error::from_errno` is `pub` since commit 5ed147473458 ("rust: error:
> make conversion functions public"), thus remove this workaround which is
> no longer needed.
> 
> Signed-off-by: Tamir Duberstein <tamird@gmail.com>

Huh. We should just have made it `pub` right away when we felt the need
to add this workaround.

Reviewed-by: Alice Ryhl <aliceryhl@google.com>

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

* Re: [PATCH] rust: init: remove old workaround
  2025-07-09 22:34 [PATCH] rust: init: remove old workaround Tamir Duberstein
  2025-07-10  7:20 ` Alice Ryhl
@ 2025-07-13 20:33 ` Miguel Ojeda
  1 sibling, 0 replies; 3+ messages in thread
From: Miguel Ojeda @ 2025-07-13 20:33 UTC (permalink / raw)
  To: Tamir Duberstein
  Cc: Benno Lossin, Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
	Björn Roy Baron, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	Danilo Krummrich, rust-for-linux, linux-kernel

On Thu, Jul 10, 2025 at 12:34 AM Tamir Duberstein <tamird@gmail.com> wrote:
>
> `Error::from_errno` is `pub` since commit 5ed147473458 ("rust: error:
> make conversion functions public"), thus remove this workaround which is
> no longer needed.
>
> Signed-off-by: Tamir Duberstein <tamird@gmail.com>

This seems the same as this one applied a few weeks ago:

    https://lore.kernel.org/rust-for-linux/20250526152914.2453949-2-ojeda@kernel.org/

Cheers,
Miguel

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

end of thread, other threads:[~2025-07-13 20:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-09 22:34 [PATCH] rust: init: remove old workaround Tamir Duberstein
2025-07-10  7:20 ` Alice Ryhl
2025-07-13 20:33 ` 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).