hypervisor: reevaluate #[allow] attributes

Remove stale #[allow]s whose lints no longer fire, convert the
unconditionally-firing ones to #[expect], and keep the conditional
ones as #[allow] (e.g. large_enum_variant only fires when both kvm
and mshv are enabled; a nonminimal_bool only on x86). The many
unreachable_patterns allows are feature-gated and left as #[allow].

Part of #8326.

Signed-off-by: Tushar Khatri <hello@tusharkhatri.in>
This commit is contained in:
Tushar Khatri
2026-06-12 16:11:41 +00:00
committed by Rob Bradford
parent d6e59a0be7
commit 859bce5cae
9 changed files with 10 additions and 12 deletions

View File

@@ -165,7 +165,7 @@ pub enum ExceptionClass {
BRK = 0b111100,
}
#[allow(non_upper_case_globals)]
#[expect(non_upper_case_globals)]
// PSR (Processor State Register) bits.
// Taken from arch/arm64/include/uapi/asm/ptrace.h.
const PSR_MODE_EL1h: u64 = 0x0000_0005;

View File

@@ -4,7 +4,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#![allow(non_camel_case_types)]
#![expect(non_camel_case_types)]
//
// MOV-Move

View File

@@ -4,7 +4,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#![allow(non_camel_case_types)]
#![expect(non_camel_case_types)]
//
// MOVS - Move Data from String to String

View File

@@ -4,7 +4,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#![allow(non_camel_case_types)]
#![expect(non_camel_case_types)]
//
// OR - Logical inclusive OR

View File

@@ -4,7 +4,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#![allow(non_camel_case_types)]
#![expect(non_camel_case_types)]
//
// STOS - Store String

View File

@@ -20,9 +20,7 @@ use crate::CpuVendor;
#[cfg(all(feature = "mshv_emulator", target_arch = "x86_64"))]
pub mod emulator;
pub mod gdt;
#[allow(non_camel_case_types)]
#[allow(non_snake_case)]
#[allow(non_upper_case_globals)]
#[expect(non_upper_case_globals)]
pub mod msr_index;
// MTRR constants