diff options
| author | Daniel Almeida <[email protected]> | 2025-07-14 23:29:58 +0000 |
|---|---|---|
| committer | Miguel Ojeda <[email protected]> | 2025-07-19 21:18:18 +0000 |
| commit | cc84ef3b88f407e8bd5a5f7b6906d1e69851c856 (patch) | |
| tree | 43e765162217ea01d519a895eadf8678dca99e96 /scripts/rustdoc_test_gen.rs | |
| parent | rust: list: remove OFFSET constants (diff) | |
| download | kernel-cc84ef3b88f407e8bd5a5f7b6906d1e69851c856.tar.gz kernel-cc84ef3b88f407e8bd5a5f7b6906d1e69851c856.zip | |
rust: bits: add support for bits/genmask macros
In light of bindgen being unable to generate bindings for macros, and
owing to the widespread use of these macros in drivers, manually define
the bit and genmask C macros in Rust.
The *_checked version of the functions provide runtime checking while
the const version performs compile-time assertions on the arguments via
the build_assert!() macro.
Reviewed-by: Alice Ryhl <[email protected]>
Reviewed-by: Alexandre Courbot <[email protected]>
Signed-off-by: Daniel Almeida <[email protected]>
Reviewed-by: Danilo Krummrich <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ `expect`ed Clippy warning in doctests, hid single `use`, grouped
examples. Reworded title. - Miguel ]
Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'scripts/rustdoc_test_gen.rs')
0 files changed, 0 insertions, 0 deletions
