diff --git a/sys/riscv/riscv/intr_machdep.c b/sys/riscv/riscv/intr_machdep.c index 2a45e0905261..3e4afe11989e 100644 --- a/sys/riscv/riscv/intr_machdep.c +++ b/sys/riscv/riscv/intr_machdep.c @@ -163,7 +163,7 @@ riscv_cpu_intr(struct trapframe *frame) KASSERT(frame->tf_scause & EXCP_INTR, ("riscv_cpu_intr: wrong frame passed")); - active_irq = (frame->tf_scause & EXCP_MASK); + active_irq = frame->tf_scause & EXCP_MASK; switch (active_irq) { case IRQ_SOFTWARE_USER: diff --git a/sys/riscv/riscv/trap.c b/sys/riscv/riscv/trap.c index 00b66822cbac..aa9ec534669d 100644 --- a/sys/riscv/riscv/trap.c +++ b/sys/riscv/riscv/trap.c @@ -256,7 +256,7 @@ do_trap_supervisor(struct trapframe *frame) KASSERT((csr_read(sstatus) & (SSTATUS_SPP | SSTATUS_SIE)) == SSTATUS_SPP, ("Came from S mode with interrupts enabled")); - exception = (frame->tf_scause & EXCP_MASK); + exception = frame->tf_scause & EXCP_MASK; if (frame->tf_scause & EXCP_INTR) { /* Interrupt */ riscv_cpu_intr(frame); @@ -318,7 +318,7 @@ do_trap_user(struct trapframe *frame) KASSERT((csr_read(sstatus) & (SSTATUS_SPP | SSTATUS_SIE)) == 0, ("Came from U mode with interrupts enabled")); - exception = (frame->tf_scause & EXCP_MASK); + exception = frame->tf_scause & EXCP_MASK; if (frame->tf_scause & EXCP_INTR) { /* Interrupt */ riscv_cpu_intr(frame);