Skip to content

Re-export Zeroable and zeroed() from ffi module

Alice Ryhl linux-acpi linux-pm lkml rust-for-linux 1 version In review

Get series with b4
b4 am [email protected] change-id 20251202-zeroable-ffi-2beb542376c3

Versions newest first

  1. v1 Latest4 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4rust: ffi: reexport Zeroable and related itemsrust/Makefile rust/ffi.rs+13 -30 replies
2/4rust: cpufreq: import pin_init::zeroed() from ffirust/kernel/cpufreq.rs+1 -11 reply
3/4rust: i2c: import pin_init::zeroed() from ffirust/kernel/i2c.rs+2 -20 replies
4/4rust: acpi: import pin_init::zeroed() from ffirust/kernel/acpi.rs+1 -10 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchViresh Kumar
1/4
2/4A-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [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.

---
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,

Signature · 1 line
Alice Ryhl <[email protected]>