[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260126-zeroable-ffi-v1-0-0ef101d1ed85@google.com>
Date: Mon, 26 Jan 2026 13:05:13 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: Miguel Ojeda <ojeda@...nel.org>, Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
"Björn Roy Baron" <bjorn3_gh@...tonmail.com>, Benno Lossin <lossin@...nel.org>,
Andreas Hindborg <a.hindborg@...nel.org>, Trevor Gross <tmgross@...ch.edu>,
Danilo Krummrich <dakr@...nel.org>, "Rafael J. Wysocki" <rafael@...nel.org>,
Viresh Kumar <viresh.kumar@...aro.org>, Igor Korotin <igor.korotin.linux@...il.com>,
Daniel Almeida <daniel.almeida@...labora.com>, Len Brown <lenb@...nel.org>
Cc: rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, linux-acpi@...r.kernel.org,
Alice Ryhl <aliceryhl@...gle.com>
Subject: [PATCH 0/4] Re-export Zeroable and zeroed() from ffi module
Currently, the Zeroable trait is defined by pin-init because pin-init
happens to use the trait. However, zeroed types are useful for many
purposes other than pin-init. Also, we wish to implement Zeroable for
types generated by bindgen. For both of these reasons, re-export
Zeroable from the ffi crate, which is a already dependency of the crates
with bindgen output.
Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>
---
Alice Ryhl (4):
rust: ffi: reexport Zeroable and related items
rust: cpufreq: import pin_init::zeroed() from ffi
rust: i2c: import pin_init::zeroed() from ffi
rust: acpi: import pin_init::zeroed() from ffi
rust/Makefile | 9 ++++++---
rust/ffi.rs | 7 +++++++
rust/kernel/acpi.rs | 2 +-
rust/kernel/cpufreq.rs | 2 +-
rust/kernel/i2c.rs | 4 ++--
5 files changed, 17 insertions(+), 7 deletions(-)
---
base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
change-id: 20251202-zeroable-ffi-2beb542376c3
Best regards,
--
Alice Ryhl <aliceryhl@...gle.com>
Powered by blists - more mailing lists