Re: [PATCH] rust: fix building firmware abstraction on 32bit arm
From: Benno Lossin
Date: Fri Apr 11 2025 - 08:54:36 EST
On Fri Apr 11, 2025 at 9:14 AM CEST, Christian Schrefl wrote:
> diff --git a/rust/kernel/firmware.rs b/rust/kernel/firmware.rs
> index f04b058b09b2d2397e26344d0e055b3aa5061432..1d6284316f2a4652ef3f76272670e5e29b0ff924 100644
> --- a/rust/kernel/firmware.rs
> +++ b/rust/kernel/firmware.rs
> @@ -5,14 +5,18 @@
> //! C header: [`include/linux/firmware.h`](srctree/include/linux/firmware.h)
>
> use crate::{bindings, device::Device, error::Error, error::Result, str::CStr};
> -use core::ptr::NonNull;
> +use core::{ffi, ptr::NonNull};
Ah I overlooked this, you should be using `kernel::ffi` (or
`crate::ffi`) instead of `core`. (for `c_char` it doesn't matter, but we
shouldn't be using `core::ffi`, since we have our own mappings).
---
Cheers,
Benno