Re: [PATCH v2] rust: Use `ffi::c_char` type in firmware abstraction `FwFunc`

From: Danilo Krummrich
Date: Sat Apr 12 2025 - 10:53:19 EST


On Sat, Apr 12, 2025 at 12:29:48PM +0200, Christian Schrefl wrote:
> The `FwFunc` struct contains an function with a char pointer argument,
> for which a `*const u8` pointer was used. This is not really the
> "propper" type for this, so use a `*const kernel::ffi::c_char` pointer
> instad.
>
> This has no real functionality changes, since `kernel::ffi::c_char` is
> a type alias to `u8` anyways.
>
> This used to cause problems on 6.13 when building for 32 bit arm (with
> my patches), since rust mapped c_char to i8 instead.

Now that I read this again:

Isn't it the other way around? For arm32 c_char was mapped to u8, but FwFunc
expected i8 (since that's what c_char was mapped to for all other architectures
that are supported in v6.13).

Can you please clarify this in the commit message?