mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: clippy: add semicolon_if_nothing_returned
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
committed by
Rob Bradford
parent
ea4f07d3bf
commit
b4c62bf159
+8
-6
@@ -142,8 +142,9 @@ impl MsiCap {
|
||||
let value = LittleEndian::read_u16(data);
|
||||
match offset {
|
||||
MSI_MSG_CTL_OFFSET => {
|
||||
self.msg_ctl = (self.msg_ctl & !(MSI_CTL_ENABLE | MSI_CTL_MULTI_MSG_ENABLE))
|
||||
| (value & (MSI_CTL_ENABLE | MSI_CTL_MULTI_MSG_ENABLE))
|
||||
self.msg_ctl = (self.msg_ctl
|
||||
& !(MSI_CTL_ENABLE | MSI_CTL_MULTI_MSG_ENABLE))
|
||||
| (value & (MSI_CTL_ENABLE | MSI_CTL_MULTI_MSG_ENABLE));
|
||||
}
|
||||
x if x == msg_data_offset => self.msg_data = value,
|
||||
_ => error!("invalid offset"),
|
||||
@@ -153,16 +154,17 @@ impl MsiCap {
|
||||
let value = LittleEndian::read_u32(data);
|
||||
match offset {
|
||||
0x0 => {
|
||||
self.msg_ctl = (self.msg_ctl & !(MSI_CTL_ENABLE | MSI_CTL_MULTI_MSG_ENABLE))
|
||||
| ((value >> 16) as u16 & (MSI_CTL_ENABLE | MSI_CTL_MULTI_MSG_ENABLE))
|
||||
self.msg_ctl = (self.msg_ctl
|
||||
& !(MSI_CTL_ENABLE | MSI_CTL_MULTI_MSG_ENABLE))
|
||||
| ((value >> 16) as u16 & (MSI_CTL_ENABLE | MSI_CTL_MULTI_MSG_ENABLE));
|
||||
}
|
||||
MSI_MSG_ADDR_LO_OFFSET => self.msg_addr_lo = value & MSI_MSG_ADDR_LO_MASK,
|
||||
x if x == msg_data_offset => self.msg_data = value as u16,
|
||||
x if addr_hi_offset.is_some() && x == addr_hi_offset.unwrap() => {
|
||||
self.msg_addr_hi = value
|
||||
self.msg_addr_hi = value;
|
||||
}
|
||||
x if mask_bits_offset.is_some() && x == mask_bits_offset.unwrap() => {
|
||||
self.mask_bits = value
|
||||
self.mask_bits = value;
|
||||
}
|
||||
_ => error!("invalid offset"),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user