rust/pv_core: Remove !#[allow(unused)]

Remove !#[allow(unused)] in pv_core and fix all unused warnings from the
Rust compiler.

Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
Steffen Eiden
2024-04-05 13:30:29 +02:00
parent 7b94783cb7
commit cf003379ac
4 changed files with 7 additions and 27 deletions

View File

@@ -2,7 +2,6 @@
//
// Copyright IBM Corp. 2023, 2024
#![deny(missing_docs)]
#![allow(unused)]
#![doc = include_str!("../README.md")]
mod error;
mod macros;

View File

@@ -9,6 +9,8 @@ pub const UVIO_ATT_ARCB_MAX_LEN: usize = 0x100000;
pub const UVIO_ATT_MEASUREMENT_MAX_LEN: usize = 0x8000;
pub const UVIO_ATT_ADDITIONAL_MAX_LEN: usize = 0x8000;
pub const UVIO_ADD_SECRET_MAX_LEN: usize = 0x100000;
#[allow(unused)]
// here for completeness
pub const UVIO_LIST_SECRETS_LEN: usize = 0x1000;
// equal to ascii 'u'

View File

@@ -3,23 +3,8 @@
// Copyright IBM Corp. 2023
use super::ffi;
use crate::{
assert_size,
misc::to_u16,
request::MagicValue,
uv::{UvCmd, UvDevice},
uvsecret::AddSecretMagic,
Error, Result, PAGESIZE,
};
use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
use serde::{Serialize, Serializer};
use std::{
fmt::Display,
io::{Cursor, Read, Seek, Write},
slice::Iter,
vec::IntoIter,
};
use zerocopy::{AsBytes, FromBytes, FromZeroes, U16, U32};
use crate::{request::MagicValue, uv::UvCmd, uvsecret::AddSecretMagic, Error, Result, PAGESIZE};
use std::io::Read;
/// _List Secrets_ Ultravisor command.
///

View File

@@ -2,20 +2,14 @@
//
// Copyright IBM Corp. 2023
use crate::{assert_size, static_assert};
use crate::assert_size;
use crate::{
misc::to_u16,
request::{MagicValue, RequestMagic},
uv::{ListCmd, UvCmd},
Error, Result,
};
use byteorder::{BigEndian, ByteOrder};
use std::{
fmt::Display,
io::{Cursor, Read, Seek, Write},
mem::size_of,
};
use zerocopy::{AsBytes, FromBytes, U16, U32};
use std::{fmt::Display, mem::size_of};
use zerocopy::{AsBytes, U16};
/// The magic value used to identify an add-secret request`]
///