diff options
author | 2023-04-08 12:26:12 +0000 | |
---|---|---|
committer | 2023-04-12 18:41:05 +0200 | |
commit | 38cde0bd7b6772003a37b9aa6822568409556ee9 (patch) | |
tree | ff98bf79b564584914cefda0c9eedf1dd7cee218 /tools/spi | |
parent | rust: init: add `stack_pin_init!` macro (diff) | |
download | linux-38cde0bd7b6772003a37b9aa6822568409556ee9.tar.gz linux-38cde0bd7b6772003a37b9aa6822568409556ee9.tar.bz2 linux-38cde0bd7b6772003a37b9aa6822568409556ee9.zip |
rust: init: add `Zeroable` trait and `init::zeroed` function
Add the `Zeroable` trait which marks types that can be initialized by
writing `0x00` to every byte of the type. Also add the `init::zeroed`
function that creates an initializer for a `Zeroable` type that writes
`0x00` to every byte.
Signed-off-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Andreas Hindborg <a.hindborg@samsung.com>
Link: https://lore.kernel.org/r/20230408122429.1103522-12-y86-dev@protonmail.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'tools/spi')
0 files changed, 0 insertions, 0 deletions