diff options
author | Gary Guo <gary@garyguo.net> | 2024-09-13 23:29:23 +0200 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2024-11-10 23:58:00 +0100 |
commit | d072acda4862f095ec9056979b654cc06a22cc68 (patch) | |
tree | 270061d20e18a9c5ff90cef8e4deed75bdb93c63 /rust/kernel/block/mq/raw_writer.rs | |
parent | rust: map `__kernel_size_t` and friends also to usize/isize (diff) | |
download | linux-d072acda4862f095ec9056979b654cc06a22cc68.tar.xz linux-d072acda4862f095ec9056979b654cc06a22cc68.zip |
rust: use custom FFI integer types
Currently FFI integer types are defined in libcore. This commit creates
the `ffi` crate and asks bindgen to use that crate for FFI integer types
instead of `core::ffi`.
This commit is preparatory and no type changes are made in this commit
yet.
Signed-off-by: Gary Guo <gary@garyguo.net>
Link: https://lore.kernel.org/r/20240913213041.395655-4-gary@garyguo.net
[ Added `rustdoc`, `rusttest` and KUnit tests support. Rebased on top of
`rust-next` (e.g. migrated more `core::ffi` cases). Reworded crate
docs slightly and formatted. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel/block/mq/raw_writer.rs')
-rw-r--r-- | rust/kernel/block/mq/raw_writer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/kernel/block/mq/raw_writer.rs b/rust/kernel/block/mq/raw_writer.rs index 9222465d670b..7e2159e4f6a6 100644 --- a/rust/kernel/block/mq/raw_writer.rs +++ b/rust/kernel/block/mq/raw_writer.rs @@ -25,7 +25,7 @@ impl<'a> RawWriter<'a> { } pub(crate) fn from_array<const N: usize>( - a: &'a mut [core::ffi::c_char; N], + a: &'a mut [crate::ffi::c_char; N], ) -> Result<RawWriter<'a>> { Self::new( // SAFETY: the buffer of `a` is valid for read and write as `u8` for |