Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/428dba426b20
branches:  trunk
changeset: 1029078:428dba426b20
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Dec 21 06:51:16 2021 +0000

description:
KNF

diffstat:

 sys/arch/arm/pic/pic.c |  17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diffs (59 lines):

diff -r 98c2d988a91b -r 428dba426b20 sys/arch/arm/pic/pic.c
--- a/sys/arch/arm/pic/pic.c    Tue Dec 21 06:00:45 2021 +0000
+++ b/sys/arch/arm/pic/pic.c    Tue Dec 21 06:51:16 2021 +0000
@@ -1,4 +1,5 @@
-/*     $NetBSD: pic.c,v 1.75 2021/10/31 16:29:18 skrll Exp $   */
+/*     $NetBSD: pic.c,v 1.76 2021/12/21 06:51:16 skrll Exp $   */
+
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -33,7 +34,7 @@
 #include "opt_multiprocessor.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.75 2021/10/31 16:29:18 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.76 2021/12/21 06:51:16 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -83,9 +84,9 @@
 struct intrsource *pic_sources[PIC_MAXMAXSOURCES];
 struct intrsource *pic__iplsources[PIC_MAXMAXSOURCES];
 struct intrsource **pic_iplsource[NIPL] = {
-       [0 ... NIPL-1] = pic__iplsources,
+       [0 ... NIPL - 1] = pic__iplsources,
 };
-size_t pic_ipl_offset[NIPL+1];
+size_t pic_ipl_offset[NIPL + 1];
 
 static kmutex_t pic_lock;
 static size_t pic_sourcebase;
@@ -756,7 +757,7 @@
        /*
         * First try to use an existing slot which is empty.
         */
-       for (off = pic_ipl_offset[ipl]; off < pic_ipl_offset[ipl+1]; off++) {
+       for (off = pic_ipl_offset[ipl]; off < pic_ipl_offset[ipl + 1]; off++) {
                if (pic__iplsources[off] == NULL) {
                        is->is_iplidx = off - pic_ipl_offset[ipl];
                        pic__iplsources[off] = is;
@@ -768,15 +769,15 @@
         * Move up all the sources by one.
         */
        if (ipl < NIPL) {
-               off = pic_ipl_offset[ipl+1];
-               memmove(&pic__iplsources[off+1], &pic__iplsources[off],
+               off = pic_ipl_offset[ipl + 1];
+               memmove(&pic__iplsources[off + 1], &pic__iplsources[off],
                    sizeof(pic__iplsources[0]) * (pic_ipl_offset[NIPL] - off));
        }
 
        /*
         * Advance the offset of all IPLs higher than this.  Include an
         * extra one as well.  Thus the number of sources per ipl is
-        * pic_ipl_offset[ipl+1] - pic_ipl_offset[ipl].
+        * pic_ipl_offset[ipl + 1] - pic_ipl_offset[ipl].
         */
        for (nipl = ipl + 1; nipl <= NIPL; nipl++)
                pic_ipl_offset[nipl]++;



Home | Main Index | Thread Index | Old Index