From 27ba8133a456e7511b21f971da58006a13a4d049 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Wed, 24 Mar 2021 16:43:40 +0000 Subject: [PATCH] vmm: interrupt: drop RoutingEntryExt trait We can now directly use associated functions. This simplifies code and causes no functional change. Signed-off-by: Wei Liu --- vmm/src/interrupt.rs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/vmm/src/interrupt.rs b/vmm/src/interrupt.rs index a8e9082d7..04852dfa1 100644 --- a/vmm/src/interrupt.rs +++ b/vmm/src/interrupt.rs @@ -115,14 +115,6 @@ impl MsiInterruptGroup { } } -pub trait RoutingEntryExt { - fn make_entry( - vm: &Arc, - gsi: u32, - config: &InterruptSourceConfig, - ) -> Result>; -} - impl MsiInterruptGroup { fn new( vm: Arc, @@ -349,8 +341,8 @@ pub mod kvm { type KvmRoutingEntry = RoutingEntry; pub type KvmMsiInterruptManager = MsiInterruptManager; - impl RoutingEntryExt for KvmRoutingEntry { - fn make_entry( + impl KvmRoutingEntry { + pub fn make_entry( vm: &Arc, gsi: u32, config: &InterruptSourceConfig, @@ -409,8 +401,8 @@ pub mod mshv { type MshvRoutingEntry = RoutingEntry; pub type MshvMsiInterruptManager = MsiInterruptManager; - impl RoutingEntryExt for MshvRoutingEntry { - fn make_entry( + impl MshvRoutingEntry { + pub fn make_entry( _vm: &Arc, gsi: u32, config: &InterruptSourceConfig,