Skip to content

Commit e9ff3ad

Browse files
committed
fixup: riscv: lint fixes
1 parent 9fd2f73 commit e9ff3ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

riscv/src/register/satp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl Satp {
5858
#[inline]
5959
#[cfg(target_pointer_width = "64")]
6060
pub fn asid(&self) -> usize {
61-
self.bits >> 44 & 0xFFFF // bits 44-59
61+
(self.bits >> 44) & 0xFFFF // bits 44-59
6262
}
6363

6464
/// Physical page number
@@ -203,7 +203,7 @@ pub unsafe fn try_set(mode: Mode, asid: usize, ppn: usize) -> Result<()> {
203203
bitmask: 0xFFF_FFFF_FFFF,
204204
})
205205
} else {
206-
let bits = (mode as usize) << 60 | (asid << 44) | ppn;
206+
let bits = ((mode as usize) << 60) | (asid << 44) | ppn;
207207
_try_write(bits)
208208
}
209209
}

0 commit comments

Comments
 (0)