From 9886554a027a35eb37beff6f744f2b677f7ee550 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 27 Jul 2020 16:37:18 +0000 Subject: [PATCH] Trim some extraneous parentheses. Reported by: kib (do_trap_user) Sponsored by: DARPA --- sys/riscv/riscv/intr_machdep.c | 2 +- sys/riscv/riscv/trap.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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);