virtio-devices: Automatically fix operator precedence clippy warning

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
This commit is contained in:
Rob Bradford
2025-01-06 18:09:49 +00:00
committed by Bo Chen
parent 21f05ebb4f
commit 2624f17ffe
9 changed files with 110 additions and 108 deletions
+2 -2
View File
@@ -344,7 +344,7 @@ where
info!("Restoring virtio-vsock {}", id);
(state.avail_features, state.acked_features, true)
} else {
let mut avail_features = 1u64 << VIRTIO_F_VERSION_1 | 1u64 << VIRTIO_F_IN_ORDER;
let mut avail_features = (1u64 << VIRTIO_F_VERSION_1) | (1u64 << VIRTIO_F_IN_ORDER);
if iommu {
avail_features |= 1u64 << VIRTIO_F_IOMMU_PLATFORM;
@@ -529,7 +529,7 @@ mod tests {
#[test]
fn test_virtio_device() {
let mut ctx = TestContext::new();
let avail_features = 1u64 << VIRTIO_F_VERSION_1 | 1u64 << VIRTIO_F_IN_ORDER;
let avail_features = (1u64 << VIRTIO_F_VERSION_1) | (1u64 << VIRTIO_F_IN_ORDER);
let device_features = avail_features;
let driver_features: u64 = avail_features | 1 | (1 << 32);
let device_pages = [