Skip to content

Commit 926d10e

Browse files
committed
clippy
1 parent 82e6511 commit 926d10e

File tree

2 files changed

+4
-23
lines changed

2 files changed

+4
-23
lines changed

src/arch.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,6 @@ pub fn isb() {
3434
}
3535
}
3636

37-
/// Invalidate all instruction caches.
38-
#[allow(dead_code)]
39-
pub fn ic_iallu() {
40-
// SAFETY: `ic iallu` is always safe.
41-
unsafe {
42-
asm!("ic iallu", options(nostack, preserves_flags));
43-
}
44-
}
45-
46-
/// Invalidate all TLB entries for EL2.
47-
#[allow(dead_code)]
48-
pub fn tlbi_alle2is() {
49-
// SAFETY: `tlbi alle2is` is always safe.
50-
unsafe {
51-
asm!("tlbi alle2is", options(nostack, preserves_flags));
52-
}
53-
}
54-
5537
/// Get the current stack pointer.
5638
pub fn sp() -> u64 {
5739
let val: u64;

src/hypervisor.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,6 @@ unsafe fn handle_psci(fn_id: u64, arg0: u64, arg1: u64, arg2: u64) -> Result<u64
179179
#[allow(clippy::enum_glob_use)]
180180
use arm_psci::Function::*;
181181

182-
#[allow(
183-
clippy::cast_possible_truncation,
184-
reason = "the fn_id is a u32 per specification, so can be truncated"
185-
)]
186182
let psci_fn = arm_psci::Function::try_from(&[fn_id, arg0, arg1, arg2])?;
187183
match psci_fn {
188184
CpuSuspend { state, entry } => {
@@ -213,7 +209,10 @@ unsafe fn handle_psci(fn_id: u64, arg0: u64, arg1: u64, arg2: u64) -> Result<u64
213209
smc_args[0] = arg0;
214210
smc_args[1] = arg1;
215211
smc_args[2] = arg2;
216-
#[allow(clippy::cast_possible_truncation)]
212+
#[expect(
213+
clippy::cast_possible_truncation,
214+
reason = "the fn_id is a u32 per specification, so can be truncated"
215+
)]
217216
let result = smccc::smc64(fn_id as u32, smc_args);
218217
Ok(result[0])
219218
}

0 commit comments

Comments
 (0)