chore: make clippy happy

This commit is contained in:
Paul Pan 2024-04-28 21:53:38 +08:00
parent 95dc7144c6
commit 93df10c5a2
2 changed files with 2 additions and 8 deletions

View File

@ -55,8 +55,8 @@ impl Iterator for crate::plat::backtrace::FrameWalker {
return None; return None;
} }
let prev_fp = unsafe { *(self.current_fp.as_const_ptr() as *const usize).offset(-2) }; let prev_fp = unsafe { *self.current_fp.as_const_ptr::<usize>().offset(-2) };
let prev_pc = unsafe { *(self.current_fp.as_const_ptr() as *const usize).offset(-1) }; let prev_pc = unsafe { *self.current_fp.as_const_ptr::<usize>().offset(-1) };
self.current_fp = VirtAddr::from(prev_fp); self.current_fp = VirtAddr::from(prev_fp);
self.current_pc = VirtAddr::from(prev_pc); self.current_pc = VirtAddr::from(prev_pc);

View File

@ -51,12 +51,6 @@ impl Arch {
} }
} }
pub fn bits(&self) -> u32 {
match self {
Arch::RISCV64 => 64,
}
}
pub fn board_arch_name(&self) -> String { pub fn board_arch_name(&self) -> String {
"riscv".to_string() "riscv".to_string()
} }