Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/arm32 KNF



details:   https://anonhg.NetBSD.org/src/rev/f9c45bacfbea
branches:  trunk
changeset: 973108:f9c45bacfbea
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Jun 20 15:45:22 2020 +0000

description:
KNF

diffstat:

 sys/arch/arm/arm32/arm32_machdep.c |  18 +++++++++---------
 sys/arch/arm/arm32/db_interface.c  |   6 +++---
 sys/arch/arm/arm32/fault.c         |  24 ++++++++++++------------
 sys/arch/arm/arm32/kgdb_machdep.c  |   8 ++++----
 sys/arch/arm/arm32/stubs.c         |  14 +++++++-------
 sys/arch/arm/arm32/sys_machdep.c   |  14 +++++++-------
 6 files changed, 42 insertions(+), 42 deletions(-)

diffs (truncated from 336 to 300 lines):

diff -r 4ba514ce31a4 -r f9c45bacfbea sys/arch/arm/arm32/arm32_machdep.c
--- a/sys/arch/arm/arm32/arm32_machdep.c        Sat Jun 20 10:53:28 2020 +0000
+++ b/sys/arch/arm/arm32/arm32_machdep.c        Sat Jun 20 15:45:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arm32_machdep.c,v 1.133 2020/04/18 11:00:37 skrll Exp $        */
+/*     $NetBSD: arm32_machdep.c,v 1.134 2020/06/20 15:45:22 skrll Exp $        */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.133 2020/04/18 11:00:37 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.134 2020/06/20 15:45:22 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_arm_start.h"
@@ -371,12 +371,12 @@
        struct sysctlnode node;
 
        if (booted_device == NULL)
-               return (EOPNOTSUPP);
+               return EOPNOTSUPP;
 
        node = *rnode;
        node.sysctl_data = __UNCONST(device_xname(booted_device));
        node.sysctl_size = strlen(device_xname(booted_device)) + 1;
-       return (sysctl_lookup(SYSCTLFN_CALL(&node)));
+       return sysctl_lookup(SYSCTLFN_CALL(&node));
 }
 
 static int
@@ -385,12 +385,12 @@
        struct sysctlnode node;
 
        if (booted_kernel == NULL || booted_kernel[0] == '\0')
-               return (EOPNOTSUPP);
+               return EOPNOTSUPP;
 
        node = *rnode;
        node.sysctl_data = booted_kernel;
        node.sysctl_size = strlen(booted_kernel) + 1;
-       return (sysctl_lookup(SYSCTLFN_CALL(&node)));
+       return sysctl_lookup(SYSCTLFN_CALL(&node));
 }
 
 static int
@@ -414,13 +414,13 @@
                node.sysctl_flags &= ~CTLFLAG_READWRITE;
        error = sysctl_lookup(SYSCTLFN_CALL(&node));
        if (error || newp == NULL || newval == cpu_do_powersave)
-               return (error);
+               return error;
 
        if (newval < 0 || newval > 1)
-               return (EINVAL);
+               return EINVAL;
        cpu_do_powersave = newval;
 
-       return (0);
+       return 0;
 }
 
 SYSCTL_SETUP(sysctl_machdep_setup, "sysctl machdep subtree setup")
diff -r 4ba514ce31a4 -r f9c45bacfbea sys/arch/arm/arm32/db_interface.c
--- a/sys/arch/arm/arm32/db_interface.c Sat Jun 20 10:53:28 2020 +0000
+++ b/sys/arch/arm/arm32/db_interface.c Sat Jun 20 15:45:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.60 2020/06/20 07:10:36 skrll Exp $  */
+/*     $NetBSD: db_interface.c,v 1.61 2020/06/20 15:45:22 skrll Exp $  */
 
 /*
  * Copyright (c) 1996 Scott K. Stevens
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.60 2020/06/20 07:10:36 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.61 2020/06/20 15:45:22 skrll Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -210,7 +210,7 @@
        else
                pmap = p->p_vmspace->vm_map.pmap;
 
-       return (pmap_extract(pmap, addr, NULL) == false);
+       return pmap_extract(pmap, addr, NULL) == false;
 }
 
 /*
diff -r 4ba514ce31a4 -r f9c45bacfbea sys/arch/arm/arm32/fault.c
--- a/sys/arch/arm/arm32/fault.c        Sat Jun 20 10:53:28 2020 +0000
+++ b/sys/arch/arm/arm32/fault.c        Sat Jun 20 15:45:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fault.c,v 1.112 2020/06/20 07:10:36 skrll Exp $        */
+/*     $NetBSD: fault.c,v 1.113 2020/06/20 15:45:22 skrll Exp $        */
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -81,7 +81,7 @@
 #include "opt_kgdb.h"
 
 #include <sys/types.h>
-__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.112 2020/06/20 07:10:36 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.113 2020/06/20 15:45:22 skrll Exp $");
 
 #include <sys/param.h>
 
@@ -194,7 +194,7 @@
        /* Call the CPU specific data abort fixup routine */
        error = cpu_dataabt_fixup(tf);
        if (__predict_true(error != ABORT_FIXUP_FAILED))
-               return (error);
+               return error;
 
        /*
         * Oops, couldn't fix up the instruction
@@ -219,9 +219,9 @@
        if (!TRAP_USERMODE(tf))
                dab_fatal(tf, fsr, far, l, NULL);
 
-       return (error);
+       return error;
 #else
-       return (ABORT_FIXUP_OK);
+       return ABORT_FIXUP_OK;
 #endif /* CPU_ABORT_FIXUP_REQUIRED */
 }
 
@@ -641,7 +641,7 @@
 
        KASSERTMSG(tf == lwp_trapframe(l), "tf %p vs %p", tf, lwp_trapframe(l));
 
-       return (1);
+       return 1;
 }
 
 /*
@@ -727,7 +727,7 @@
                KDASSERT(TRAP_USERMODE(tf) == 0);
                tf->tf_r0 = EFAULT;
                tf->tf_pc = (register_t)(intptr_t) pcb->pcb_onfault;
-               return (0);
+               return 0;
        }
 
        /* See if the CPU state needs to be fixed up */
@@ -748,7 +748,7 @@
 
        KASSERTMSG(tf == lwp_trapframe(l), "tf %p vs %p", tf, lwp_trapframe(l));
 
-       return (1);
+       return 1;
 }
 
 static inline int
@@ -760,7 +760,7 @@
        /* Call the CPU specific prefetch abort fixup routine */
        error = cpu_prefetchabt_fixup(tf);
        if (__predict_true(error != ABORT_FIXUP_FAILED))
-               return (error);
+               return error;
 
        /*
         * Oops, couldn't fix up the instruction
@@ -785,9 +785,9 @@
        if (!TRAP_USERMODE(tf))
                dab_fatal(tf, 0, tf->tf_pc, NULL, NULL);
 
-       return (error);
+       return error;
 #else
-       return (ABORT_FIXUP_OK);
+       return ABORT_FIXUP_OK;
 #endif /* CPU_ABORT_FIXUP_REQUIRED */
 }
 
@@ -993,5 +993,5 @@
        splx(s);
 
        /* Return EFAULT if the address was invalid, else zero */
-       return (rv);
+       return rv;
 }
diff -r 4ba514ce31a4 -r f9c45bacfbea sys/arch/arm/arm32/kgdb_machdep.c
--- a/sys/arch/arm/arm32/kgdb_machdep.c Sat Jun 20 10:53:28 2020 +0000
+++ b/sys/arch/arm/arm32/kgdb_machdep.c Sat Jun 20 15:45:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kgdb_machdep.c,v 1.9 2020/06/20 07:10:36 skrll Exp $   */
+/*     $NetBSD: kgdb_machdep.c,v 1.10 2020/06/20 15:45:22 skrll Exp $  */
 
 /*
  * Copyright (c) 1996 Matthias Pfaller.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.9 2020/06/20 07:10:36 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.10 2020/06/20 15:45:22 skrll Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -56,11 +56,11 @@
 
        do {
                if (db_validate_address(va))
-                       return (0);
+                       return 0;
                va  += PAGE_SIZE;
        } while (va < last_va);
 
-       return (1);
+       return 1;
 }
 
 /*
diff -r 4ba514ce31a4 -r f9c45bacfbea sys/arch/arm/arm32/stubs.c
--- a/sys/arch/arm/arm32/stubs.c        Sat Jun 20 10:53:28 2020 +0000
+++ b/sys/arch/arm/arm32/stubs.c        Sat Jun 20 15:45:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: stubs.c,v 1.25 2020/06/20 07:10:36 skrll Exp $ */
+/*     $NetBSD: stubs.c,v 1.26 2020/06/20 15:45:22 skrll Exp $ */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: stubs.c,v 1.25 2020/06/20 07:10:36 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: stubs.c,v 1.26 2020/06/20 15:45:22 skrll Exp $");
 
 #include <sys/param.h>
 
@@ -133,7 +133,7 @@
 
        bdev = bdevsw_lookup(dumpdev);
        if (bdev == NULL)
-               return (ENXIO);
+               return ENXIO;
        dump = bdev->d_dump;
 
        memset(bf, 0, sizeof bf);
@@ -165,7 +165,7 @@
                memsegp[i].size = bootconfig.dram[i].pages * PAGE_SIZE;
        }
 
-       return (dump(dumpdev, dumplo, bf, dbtob(1)));
+       return dump(dumpdev, dumplo, bf, dbtob(1));
 }
 
 /*
@@ -179,9 +179,9 @@
        size = ALIGN(sizeof(kcore_seg_t)) + ALIGN(sizeof(cpu_kcore_hdr_t)) +
            ALIGN( bootconfig.dramblocks * sizeof(phys_ram_seg_t));
        if (roundup(size, dbtob(1)) != dbtob(1))
-               return (-1);
+               return -1;
 
-       return (1);
+       return 1;
 }
 
 
@@ -198,7 +198,7 @@
                n += bootconfig.dram[i].pages;
        }
 
-       return (n);
+       return n;
 }
 
 /* This should be moved to machdep.c */
diff -r 4ba514ce31a4 -r f9c45bacfbea sys/arch/arm/arm32/sys_machdep.c
--- a/sys/arch/arm/arm32/sys_machdep.c  Sat Jun 20 10:53:28 2020 +0000
+++ b/sys/arch/arm/arm32/sys_machdep.c  Sat Jun 20 15:45:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sys_machdep.c,v 1.25 2020/06/20 07:10:36 skrll Exp $   */
+/*     $NetBSD: sys_machdep.c,v 1.26 2020/06/20 15:45:22 skrll Exp $   */
 
 /*
  * Copyright (c) 1995-1997 Mark Brinicombe.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.25 2020/06/20 07:10:36 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.26 2020/06/20 15:45:22 skrll Exp $");
 
 #include <sys/param.h>
 
@@ -71,13 +71,13 @@
        int error;
 
        if ((error = copyin(args, &ua, sizeof(ua))) != 0)
-               return (error);
+               return error;
 



Home | Main Index | Thread Index | Old Index