diff options
Diffstat (limited to 'rust/kernel/net')
| -rw-r--r-- | rust/kernel/net/phy.rs | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/kernel/net/phy.rs b/rust/kernel/net/phy.rs index 602609027aa6..7de5cc7a0eee 100644 --- a/rust/kernel/net/phy.rs +++ b/rust/kernel/net/phy.rs @@ -142,7 +142,7 @@ impl Device {          // SAFETY: The struct invariant ensures that we may access          // this field without additional synchronization.          let bit_field = unsafe { &(*self.0.get())._bitfield_1 }; -        bit_field.get(13, 1) == bindings::AUTONEG_ENABLE as u64 +        bit_field.get(13, 1) == u64::from(bindings::AUTONEG_ENABLE)      }      /// Gets the current auto-negotiation state. @@ -419,7 +419,7 @@ impl<T: Driver> Adapter<T> {          // where we hold `phy_device->lock`, so the accessors on          // `Device` are okay to call.          let dev = unsafe { Device::from_raw(phydev) }; -        T::match_phy_device(dev) as i32 +        T::match_phy_device(dev).into()      }      /// # Safety  | 
