Re: [PATCH] rust: cast to the proper type

From: Alice Ryhl
Date: Wed Jun 11 2025 - 07:42:47 EST


On Wed, Jun 11, 2025 at 12:28 PM Tamir Duberstein <tamird@xxxxxxxxx> wrote:
>
> Use the ffi type rather than the resolved underlying type.
>
> Fixes: f20fd5449ada ("rust: core abstractions for network PHY drivers")

Does this need to be backported? If not, I wouldn't include a Fixes tag.

> + DuplexMode::Full => bindings::DUPLEX_FULL,
> + DuplexMode::Half => bindings::DUPLEX_HALF,
> + DuplexMode::Unknown => bindings::DUPLEX_UNKNOWN,
> + } as crate::ffi::c_int;

This file imports the prelude, so this can just be c_int without the
crate::ffI:: path.

Alice