misc: clippy: add redundant_else

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
Philipp Schuster
2025-11-18 12:30:49 +01:00
committed by Rob Bradford
parent d2b19bb969
commit a0b72dce22
10 changed files with 51 additions and 60 deletions

View File

@@ -948,12 +948,11 @@ impl PciConfiguration {
self.pending_bar_reprogram
);
return self.pending_bar_reprogram.drain(..).collect();
} else {
info!(
"MSE bit is disabled. No BAR reprogramming parameter is returned: {:x?}",
self.pending_bar_reprogram
);
}
info!(
"MSE bit is disabled. No BAR reprogramming parameter is returned: {:x?}",
self.pending_bar_reprogram
);
}
Vec::new()

View File

@@ -910,16 +910,15 @@ impl VfioCommon {
let cap_id = self.vfio_wrapper.read_config_byte(cap_next.into());
if PciCapabilityId::from(cap_id) == PciCapabilityId::MsiX {
return Some(cap_next as usize);
} else {
let cap_ptr = self.vfio_wrapper.read_config_byte((cap_next + 1).into())
& PCI_CONFIG_CAPABILITY_PTR_MASK;
}
let cap_ptr = self.vfio_wrapper.read_config_byte((cap_next + 1).into())
& PCI_CONFIG_CAPABILITY_PTR_MASK;
// See parse_capabilities below for an explanation.
if cap_ptr != cap_next {
cap_next = cap_ptr;
} else {
break;
}
// See parse_capabilities below for an explanation.
if cap_ptr != cap_next {
cap_next = cap_ptr;
} else {
break;
}
}