Skip to content

Commit

Permalink
clippy: fix cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
yfblock committed Feb 12, 2025
1 parent cf50a5d commit 0105b0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion modules/axhal/src/platform/loongarch64_qemu_virt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ pub mod misc {
info!("Shutting down...");
const HALT_ADDR: *mut u8 = phys_to_virt(pa!(axconfig::devices::GED_PADDR)).as_mut_ptr();
unsafe { HALT_ADDR.write_volatile(0x34) };
loop { crate::arch::halt() };
loop {
crate::arch::halt();
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions modules/axmm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ pub fn new_kernel_aspace() -> AxResult<AddrSpace> {
pub fn new_user_aspace(base: VirtAddr, size: usize) -> AxResult<AddrSpace> {
let mut aspace = AddrSpace::new_empty(base, size)?;
if !cfg!(target_arch = "aarch64") && !cfg!(target_arch = "loongarch64") {
// ARMv8 and loongarch64 use a separate page table (aarch64: TTBR0_EL1,
// loongarch64: pgdl) for user space, it doesn't need to copy the kernel
// ARMv8 and loongarch64 use a separate page table (aarch64: TTBR0_EL1,
// loongarch64: pgdl) for user space, it doesn't need to copy the kernel
// portion to the user page table.
aspace.copy_mappings_from(&kernel_aspace().lock())?;
}
Expand Down

0 comments on commit 0105b0a

Please sign in to comment.