mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
ci: Run clippy for each specific feature
The build is run against "--all-features", "pci,acpi", "pci" and "mmio" separately. The clippy validation must be run against the same set of features in order to validate the code is correct. Because of these new checks, this commit includes multiple fixes related to the errors generated when manually running the checks. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
@@ -12,6 +12,7 @@ use crate::device_manager::DeviceManager;
|
||||
#[cfg(feature = "acpi")]
|
||||
use acpi_tables::{aml, aml::Aml, sdt::SDT};
|
||||
use arc_swap::ArcSwap;
|
||||
#[cfg(feature = "acpi")]
|
||||
use arch::layout;
|
||||
use devices::{ioapic, BusDevice};
|
||||
use kvm_bindings::CpuId;
|
||||
@@ -197,6 +198,7 @@ impl CpuidPatch {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "acpi")]
|
||||
#[repr(packed)]
|
||||
struct LocalAPIC {
|
||||
pub r#type: u8,
|
||||
@@ -747,10 +749,12 @@ impl CpuManager {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "acpi")]
|
||||
struct CPU {
|
||||
cpu_id: u8,
|
||||
}
|
||||
|
||||
#[cfg(feature = "acpi")]
|
||||
const MADT_CPU_ENABLE_FLAG: usize = 0;
|
||||
|
||||
#[cfg(feature = "acpi")]
|
||||
@@ -813,6 +817,7 @@ impl Aml for CPU {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "acpi")]
|
||||
struct CPUNotify {
|
||||
cpu_id: u8,
|
||||
}
|
||||
@@ -829,6 +834,7 @@ impl Aml for CPUNotify {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "acpi")]
|
||||
struct CPUMethods {
|
||||
max_vcpus: u8,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user