Skip to content

Commit

Permalink
Remove unused Hal type parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
qwandor committed Jan 30, 2025
1 parent b47d59a commit 28b1426
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/transport/x86_64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ use super::{
},
DeviceStatus, DeviceType, Transport,
};
use crate::{
hal::{Hal, PhysAddr},
Error,
};
use crate::{hal::PhysAddr, Error};
pub use cam::HypCam;
use hypercalls::HypIoRegion;
use zerocopy::{FromBytes, Immutable, IntoBytes};
Expand Down Expand Up @@ -53,7 +50,7 @@ pub struct HypPciTransport {
impl HypPciTransport {
/// Constructs a new x86-64 pKVM PCI VirtIO transport for the given device function on the given
/// PCI root controller.
pub fn new<H: Hal, C: ConfigurationAccess>(
pub fn new<C: ConfigurationAccess>(
root: &mut PciRoot<C>,
device_function: DeviceFunction,
) -> Result<Self, VirtioPciError> {
Expand Down Expand Up @@ -114,7 +111,7 @@ impl HypPciTransport {
}
}

let common_cfg = get_bar_region::<H, CommonCfg, _>(
let common_cfg = get_bar_region::<CommonCfg, _>(
root,
device_function,
&common_cfg.ok_or(VirtioPciError::MissingCommonConfig)?,
Expand All @@ -126,16 +123,16 @@ impl HypPciTransport {
notify_off_multiplier,
));
}
let notify_region = get_bar_region::<H, u16, _>(root, device_function, &notify_cfg)?;
let notify_region = get_bar_region::<u16, _>(root, device_function, &notify_cfg)?;

let isr_status = get_bar_region::<H, u8, _>(
let isr_status = get_bar_region::<u8, _>(
root,
device_function,
&isr_cfg.ok_or(VirtioPciError::MissingIsrConfig)?,
)?;

let config_space = if let Some(device_cfg) = device_cfg {
Some(get_bar_region::<H, u32, _>(
Some(get_bar_region::<u32, _>(
root,
device_function,
&device_cfg,
Expand Down Expand Up @@ -286,7 +283,7 @@ impl Transport for HypPciTransport {
}
}

fn get_bar_region<H: Hal, T, C: ConfigurationAccess>(
fn get_bar_region<T, C: ConfigurationAccess>(
root: &mut PciRoot<C>,
device_function: DeviceFunction,
struct_info: &VirtioCapabilityInfo,
Expand Down

0 comments on commit 28b1426

Please sign in to comment.