From d6e59a0be7a4d65c8b7e27ac5ae3e255dc634709 Mon Sep 17 00:00:00 2001 From: Tushar Khatri Date: Fri, 12 Jun 2026 15:50:05 +0000 Subject: [PATCH] arch: reevaluate #[allow] attributes Remove stale #[allow]s whose lints no longer fire (a module-level non_camel_case_types in mpspec, and a too_many_arguments on a riscv64 configure_system that no longer exceeds the argument threshold), and convert the still-needed ones to #[expect]. Part of #8326. Signed-off-by: Tushar Khatri --- arch/src/aarch64/fdt.rs | 2 +- arch/src/aarch64/mod.rs | 2 +- arch/src/riscv64/fdt.rs | 2 +- arch/src/riscv64/mod.rs | 1 - arch/src/x86_64/mod.rs | 4 ++-- arch/src/x86_64/mpspec.rs | 1 - 6 files changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/src/aarch64/fdt.rs b/arch/src/aarch64/fdt.rs index 0310cf5b0..3b8f02d90 100644 --- a/arch/src/aarch64/fdt.rs +++ b/arch/src/aarch64/fdt.rs @@ -204,7 +204,7 @@ pub fn get_cache_shared(cache_level: CacheLevel) -> bool { } /// Creates the flattened device tree for this aarch64 VM. -#[allow(clippy::too_many_arguments)] +#[expect(clippy::too_many_arguments)] pub fn create_fdt( guest_mem: &GuestMemoryMmap, cmdline: &str, diff --git a/arch/src/aarch64/mod.rs b/arch/src/aarch64/mod.rs index 79c267092..494a32dd8 100644 --- a/arch/src/aarch64/mod.rs +++ b/arch/src/aarch64/mod.rs @@ -121,7 +121,7 @@ pub fn arch_memory_regions() -> Vec<(GuestAddress, usize, RegionType)> { } /// Configures the system and should be called once per vm before starting vcpu threads. -#[allow(clippy::too_many_arguments)] +#[expect(clippy::too_many_arguments)] pub fn configure_system( guest_mem: &GuestMemoryMmap, cmdline: &str, diff --git a/arch/src/riscv64/fdt.rs b/arch/src/riscv64/fdt.rs index b4a6160f3..f05b0200f 100644 --- a/arch/src/riscv64/fdt.rs +++ b/arch/src/riscv64/fdt.rs @@ -61,7 +61,7 @@ pub enum Error { type Result = result::Result; /// Creates the flattened device tree for this riscv64 VM. -#[allow(clippy::too_many_arguments)] +#[expect(clippy::too_many_arguments)] pub fn create_fdt( guest_mem: &GuestMemoryMmap, cmdline: &str, diff --git a/arch/src/riscv64/mod.rs b/arch/src/riscv64/mod.rs index 8b89b94a5..ad00a4ddb 100644 --- a/arch/src/riscv64/mod.rs +++ b/arch/src/riscv64/mod.rs @@ -160,7 +160,6 @@ fn isa_string_from_host() -> Result { } /// Configures the system and should be called once per vm before starting vcpu threads. -#[allow(clippy::too_many_arguments)] pub fn configure_system( guest_mem: &GuestMemoryMmap, cmdline: &str, diff --git a/arch/src/x86_64/mod.rs b/arch/src/x86_64/mod.rs index 8c0f179f4..82964713a 100644 --- a/arch/src/x86_64/mod.rs +++ b/arch/src/x86_64/mod.rs @@ -913,7 +913,7 @@ fn common_cpuid_tdx_configuration( Ok(()) } -#[allow(clippy::too_many_arguments)] +#[expect(clippy::too_many_arguments)] pub fn configure_vcpu( vcpu: &dyn hypervisor::Vcpu, id: u32, @@ -1053,7 +1053,7 @@ pub fn arch_memory_regions() -> Vec<(GuestAddress, usize, RegionType)> { /// * `cmdline_addr` - Address in `guest_mem` where the kernel command line was loaded. /// * `cmdline_size` - Size of the kernel command line in bytes including the null terminator. /// * `num_cpus` - Number of virtual CPUs the guest will have. -#[allow(clippy::too_many_arguments)] +#[expect(clippy::too_many_arguments)] pub fn configure_system( guest_mem: &GuestMemoryMmap, cmdline_addr: GuestAddress, diff --git a/arch/src/x86_64/mpspec.rs b/arch/src/x86_64/mpspec.rs index dacda287c..dc60f0d5a 100644 --- a/arch/src/x86_64/mpspec.rs +++ b/arch/src/x86_64/mpspec.rs @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-BSD-3-Clause file. -#![allow(non_camel_case_types)] use vm_memory::ByteValued; pub const MP_PROCESSOR: ::std::os::raw::c_uint = 0;