mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-01 09:25:21 +00:00
devices: Automatically fix operator precedence clippy warning
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
This commit is contained in:
parent
b6667f948e
commit
dd0b95ba5c
@ -346,9 +346,9 @@ impl Ioapic {
|
|||||||
|
|
||||||
// Generate MSI message address
|
// Generate MSI message address
|
||||||
let low_addr: u32 = self.apic_address.0 as u32
|
let low_addr: u32 = self.apic_address.0 as u32
|
||||||
| u32::from(destination_id) << 12
|
| (u32::from(destination_id) << 12)
|
||||||
| u32::from(redirection_hint) << 3
|
| (u32::from(redirection_hint) << 3)
|
||||||
| u32::from(destination_mode) << 2;
|
| (u32::from(destination_mode) << 2);
|
||||||
|
|
||||||
// Validate Trigger Mode value
|
// Validate Trigger Mode value
|
||||||
let trigger_mode = trigger_mode(entry);
|
let trigger_mode = trigger_mode(entry);
|
||||||
@ -372,9 +372,9 @@ impl Ioapic {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Generate MSI message data
|
// Generate MSI message data
|
||||||
let data: u32 = u32::from(trigger_mode) << 15
|
let data: u32 = (u32::from(trigger_mode) << 15)
|
||||||
| u32::from(remote_irr(entry)) << 14
|
| (u32::from(remote_irr(entry)) << 14)
|
||||||
| u32::from(delivery_mode) << 8
|
| (u32::from(delivery_mode) << 8)
|
||||||
| u32::from(vector(entry));
|
| u32::from(vector(entry));
|
||||||
|
|
||||||
let config = MsiIrqSourceConfig {
|
let config = MsiIrqSourceConfig {
|
||||||
|
@ -152,7 +152,7 @@ impl BusDevice for Cmos {
|
|||||||
0x08 => to_bcd(month as u8),
|
0x08 => to_bcd(month as u8),
|
||||||
0x09 => to_bcd((year % 100) as u8),
|
0x09 => to_bcd((year % 100) as u8),
|
||||||
// Bit 5 for 32kHz clock. Bit 7 for Update in Progress
|
// Bit 5 for 32kHz clock. Bit 7 for Update in Progress
|
||||||
0x0a => 1 << 5 | (update_in_progress as u8) << 7,
|
0x0a => (1 << 5) | ((update_in_progress as u8) << 7),
|
||||||
// Bit 0-6 are reserved and must be 0.
|
// Bit 0-6 are reserved and must be 0.
|
||||||
// Bit 7 must be 1 (CMOS has power)
|
// Bit 7 must be 1 (CMOS has power)
|
||||||
0x0d => 1 << 7,
|
0x0d => 1 << 7,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user