rust/pv: Fix new warnings for rustc 1.80

`sizeof` was added into the prelude in rustc 1.80.
This triggers a lint-warning for `unused_qualifications` if rustc 1.80+
is used. Fix this warning by using a use statement to stay compatible
for <1.80.

Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Steffen Eiden
2024-09-03 11:20:05 +02:00
committed by Jan Höppner
parent 73d8597db1
commit 7031429d1e

View File

@@ -2,6 +2,8 @@
//
// Copyright IBM Corp. 2023
use std::mem::size_of;
use crate::{assert_size, static_assert};
use zerocopy::{AsBytes, FromBytes, FromZeroes};
@@ -103,7 +105,7 @@ assert_size!(uvio_attest, 0x138);
/// corresponds to the UV_IOCTL macro
pub(crate) const fn uv_ioctl(nr: u8) -> u64 {
iowr(UVIO_TYPE_UVC, nr, std::mem::size_of::<uvio_ioctl_cb>())
iowr(UVIO_TYPE_UVC, nr, size_of::<uvio_ioctl_cb>())
}
static_assert!(uv_ioctl(UVIO_IOCTL_ATT_NR) == 0xc0407501);