From e4bb50154a08f7862fadcd01a60b344ce84fb771 Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 11 May 2021 14:58:25 +0000 Subject: [PATCH] more whitespace cleanups --- sys/arch/riscv64/dev/plic.c | 8 ++++---- sys/arch/riscv64/include/ieee.h | 4 ++-- sys/arch/riscv64/riscv64/machdep.c | 4 ++-- sys/arch/riscv64/riscv64/pmap.c | 2 +- sys/arch/riscv64/riscv64/trap.c | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/arch/riscv64/dev/plic.c b/sys/arch/riscv64/dev/plic.c index a1ffd009561..7d8428767a5 100644 --- a/sys/arch/riscv64/dev/plic.c +++ b/sys/arch/riscv64/dev/plic.c @@ -326,7 +326,7 @@ plic_irq_handler(void *frame) pending = bus_space_read_4(sc->sc_iot, sc->sc_ioh, PLIC_CLAIM(sc, cpu)); - if(pending >= sc->sc_ndev) { + if (pending >= sc->sc_ndev) { printf("plic0: pending %x\n", pending); return 0; } @@ -617,7 +617,7 @@ plic_get_cpuid(int intc) */ parent_node = OF_parent(intc); CPU_INFO_FOREACH(cii, ci) { - if(ci->ci_node == parent_node) + if (ci->ci_node == parent_node) return ci->ci_cpuid; } return -1; @@ -636,7 +636,7 @@ plic_set_priority(int irq, uint32_t pri) * is for IPI. They should NEVER be passed to plic. * So we calculate plic priority in the following way: */ - if(pri <= 4 || pri >= 12)//invalid input + if (pri <= 4 || pri >= 12)//invalid input prival = 0;//effectively disable this intr source else prival = pri - 4; @@ -673,7 +673,7 @@ plic_intr_route_grid(int irq, int enable, int cpu) struct plic_softc *sc = plic; uint32_t val, mask; - if(irq == 0) + if (irq == 0) return; KASSERT(cpu < MAXCPUS); diff --git a/sys/arch/riscv64/include/ieee.h b/sys/arch/riscv64/include/ieee.h index e5685edd054..67b298cc296 100644 --- a/sys/arch/riscv64/include/ieee.h +++ b/sys/arch/riscv64/include/ieee.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee.h,v 1.1 2021/04/23 02:42:16 drahn Exp $ */ +/* $OpenBSD: ieee.h,v 1.2 2021/05/11 14:58:25 deraadt Exp $ */ /* $NetBSD: ieee.h,v 1.1 1996/09/30 16:34:25 ws Exp $ */ /* @@ -97,7 +97,7 @@ (a)[1] = (uint32_t)(p)->ext_fraclm; \ (a)[2] = (uint32_t)(p)->ext_frachm; \ (a)[3] = (uint32_t)(p)->ext_frach; \ -} while(0) +} while (0) struct ieee_single { u_int sng_frac:23; diff --git a/sys/arch/riscv64/riscv64/machdep.c b/sys/arch/riscv64/riscv64/machdep.c index c7ed96f98ef..d5192418ab7 100644 --- a/sys/arch/riscv64/riscv64/machdep.c +++ b/sys/arch/riscv64/riscv64/machdep.c @@ -507,7 +507,7 @@ sys_sysarch(struct proc *p, void *v, register_t *retval) } */ *uap = v; int error = 0; - switch(SCARG(uap, op)) { + switch (SCARG(uap, op)) { default: error = EINVAL; break; @@ -875,7 +875,7 @@ process_kernel_args(void) return; while (*cp != 0) { - switch(*cp) { + switch (*cp) { case 'a': boothowto |= RB_ASKNAME; break; diff --git a/sys/arch/riscv64/riscv64/pmap.c b/sys/arch/riscv64/riscv64/pmap.c index e86bba0daa7..7c703562a6e 100644 --- a/sys/arch/riscv64/riscv64/pmap.c +++ b/sys/arch/riscv64/riscv64/pmap.c @@ -1986,7 +1986,7 @@ pmap_avail_fixup(void) vaddr_t end; mp = pmap_avail; - while(mp->size !=0) { + while (mp->size !=0) { align = round_page(mp->start); if (mp->start != align) { pmap_remove_avail(mp->start, align); diff --git a/sys/arch/riscv64/riscv64/trap.c b/sys/arch/riscv64/riscv64/trap.c index 6a9c41028e3..5ad673ea003 100644 --- a/sys/arch/riscv64/riscv64/trap.c +++ b/sys/arch/riscv64/riscv64/trap.c @@ -77,7 +77,7 @@ do_trap_supervisor(struct trapframe *frame) } exception = (frame->tf_scause & EXCP_MASK); - switch(exception) { + switch (exception) { case EXCP_FAULT_LOAD: case EXCP_FAULT_STORE: case EXCP_FAULT_FETCH: @@ -147,7 +147,7 @@ do_trap_user(struct trapframe *frame) curcpu()->ci_curproc, frame->tf_sepc, frame->tf_ra, frame); #endif - switch(exception) { + switch (exception) { case EXCP_FAULT_LOAD: case EXCP_FAULT_STORE: case EXCP_FAULT_FETCH: -- 2.20.1