Skip to content

Commit

Permalink
fixup: riscv: lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rmsyn committed Jan 7, 2025
1 parent 9fd2f73 commit e9ff3ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions riscv/src/register/satp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl Satp {
#[inline]
#[cfg(target_pointer_width = "64")]
pub fn asid(&self) -> usize {
self.bits >> 44 & 0xFFFF // bits 44-59
(self.bits >> 44) & 0xFFFF // bits 44-59
}

/// Physical page number
Expand Down Expand Up @@ -203,7 +203,7 @@ pub unsafe fn try_set(mode: Mode, asid: usize, ppn: usize) -> Result<()> {
bitmask: 0xFFF_FFFF_FFFF,
})
} else {
let bits = (mode as usize) << 60 | (asid << 44) | ppn;
let bits = ((mode as usize) << 60) | (asid << 44) | ppn;
_try_write(bits)
}
}

0 comments on commit e9ff3ad

Please sign in to comment.