Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64 Use newly introduced intrhand_alloc().



details:   https://anonhg.NetBSD.org/src/rev/5aed5c75baa3
branches:  trunk
changeset: 345230:5aed5c75baa3
user:      nakayama <nakayama%NetBSD.org@localhost>
date:      Fri May 13 21:22:47 2016 +0000

description:
Use newly introduced intrhand_alloc().

diffstat:

 sys/arch/sparc64/dev/ebus_mainbus.c |   8 +++-----
 sys/arch/sparc64/sparc64/machdep.c  |  10 +++-------
 2 files changed, 6 insertions(+), 12 deletions(-)

diffs (60 lines):

diff -r 4a8cfd52c154 -r 5aed5c75baa3 sys/arch/sparc64/dev/ebus_mainbus.c
--- a/sys/arch/sparc64/dev/ebus_mainbus.c       Fri May 13 21:21:43 2016 +0000
+++ b/sys/arch/sparc64/dev/ebus_mainbus.c       Fri May 13 21:22:47 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ebus_mainbus.c,v 1.15 2014/11/04 18:11:42 palle Exp $  */
+/*     $NetBSD: ebus_mainbus.c,v 1.16 2016/05/13 21:22:47 nakayama Exp $       */
 /*     $OpenBSD: ebus_mainbus.c,v 1.7 2010/11/11 17:58:23 miod Exp $   */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ebus_mainbus.c,v 1.15 2014/11/04 18:11:42 palle Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ebus_mainbus.c,v 1.16 2016/05/13 21:22:47 nakayama Exp $");
 
 #ifdef DEBUG
 #define        EDB_PROM        0x01
@@ -350,9 +350,7 @@
        intrclrptr = &iclr[ino];
        ino |= INTVEC(ihandle);
 
-       ih = malloc(sizeof *ih, M_DEVBUF, M_NOWAIT);
-       if (ih == NULL)
-               return (NULL);
+       ih = intrhand_alloc();
 
        /* Register the map and clear intr registers */
        ih->ih_map = intrmapptr;
diff -r 4a8cfd52c154 -r 5aed5c75baa3 sys/arch/sparc64/sparc64/machdep.c
--- a/sys/arch/sparc64/sparc64/machdep.c        Fri May 13 21:21:43 2016 +0000
+++ b/sys/arch/sparc64/sparc64/machdep.c        Fri May 13 21:22:47 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.283 2015/11/22 09:32:34 martin Exp $ */
+/*     $NetBSD: machdep.c,v 1.284 2016/05/13 21:22:47 nakayama Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.283 2015/11/22 09:32:34 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.284 2016/05/13 21:22:47 nakayama Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -2368,11 +2368,7 @@
 {
        struct intrhand *ih;
 
-       ih = (struct intrhand *)
-               malloc(sizeof(struct intrhand), M_DEVBUF, M_NOWAIT);
-       if (ih == NULL)
-               return (NULL);
-
+       ih = intrhand_alloc();
        ih->ih_fun = handler;
        ih->ih_arg = arg;
        intr_establish(pil, level != IPL_VM, ih);



Home | Main Index | Thread Index | Old Index