Skip to content

Commit e0c18c8

Browse files
committed
refactor(pci): remove unused type
Drop PciBarConfiguration type which wasn't used anywhere any more. Signed-off-by: Babis Chalios <[email protected]>
1 parent 79af300 commit e0c18c8

File tree

3 files changed

+6
-27
lines changed

3 files changed

+6
-27
lines changed

src/pci/src/configuration.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -423,15 +423,6 @@ impl From<PciBarPrefetchable> for bool {
423423
}
424424
}
425425

426-
#[derive(Debug, Copy, Clone, Serialize, Deserialize)]
427-
pub struct PciBarConfiguration {
428-
pub addr: u64,
429-
pub size: u64,
430-
pub idx: usize,
431-
pub region_type: PciBarRegionType,
432-
pub prefetchable: PciBarPrefetchable,
433-
}
434-
435426
impl PciConfiguration {
436427
#[allow(clippy::too_many_arguments)]
437428
pub fn new(
@@ -793,18 +784,6 @@ impl PciConfiguration {
793784
}
794785
}
795786

796-
impl Default for PciBarConfiguration {
797-
fn default() -> Self {
798-
PciBarConfiguration {
799-
idx: 0,
800-
addr: 0,
801-
size: 0,
802-
region_type: PciBarRegionType::Memory64BitRegion,
803-
prefetchable: PciBarPrefetchable::NotPrefetchable,
804-
}
805-
}
806-
}
807-
808787
#[cfg(test)]
809788
mod tests {
810789

src/pci/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ use serde::de::Visitor;
2222

2323
pub use self::bus::{PciBus, PciConfigIo, PciConfigMmio, PciRoot, PciRootError};
2424
pub use self::configuration::{
25-
PciBarConfiguration, PciBarPrefetchable, PciBarRegionType, PciCapability, PciCapabilityId,
26-
PciClassCode, PciConfiguration, PciConfigurationState, PciExpressCapabilityId, PciHeaderType,
25+
PciBarPrefetchable, PciBarRegionType, PciCapability, PciCapabilityId, PciClassCode,
26+
PciConfiguration, PciConfigurationState, PciExpressCapabilityId, PciHeaderType,
2727
PciMassStorageSubclass, PciNetworkControllerSubclass, PciSerialBusSubClass, PciSubclass,
2828
PCI_CONFIGURATION_ID,
2929
};

src/vmm/src/devices/virtio/transport/pci/device.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ use anyhow::anyhow;
1818
use kvm_ioctls::{IoEventAddress, NoDatamatch};
1919
use log::warn;
2020
use pci::{
21-
BarReprogrammingParams, MsixCap, MsixConfig, MsixConfigState, PciBarConfiguration,
22-
PciBarRegionType, PciBdf, PciCapability, PciCapabilityId, PciClassCode, PciConfiguration,
23-
PciConfigurationState, PciDevice, PciDeviceError, PciHeaderType, PciMassStorageSubclass,
24-
PciNetworkControllerSubclass, PciSubclass,
21+
BarReprogrammingParams, MsixCap, MsixConfig, MsixConfigState, PciBarRegionType, PciBdf,
22+
PciCapability, PciCapabilityId, PciClassCode, PciConfiguration, PciConfigurationState,
23+
PciDevice, PciDeviceError, PciHeaderType, PciMassStorageSubclass, PciNetworkControllerSubclass,
24+
PciSubclass,
2525
};
2626
use serde::{Deserialize, Serialize};
2727
use thiserror::Error;

0 commit comments

Comments
 (0)