Module Name:    src
Committed By:   nakayama
Date:           Fri May 13 21:22:47 UTC 2016

Modified Files:
        src/sys/arch/sparc64/dev: ebus_mainbus.c
        src/sys/arch/sparc64/sparc64: machdep.c

Log Message:
Use newly introduced intrhand_alloc().


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sparc64/dev/ebus_mainbus.c
cvs rdiff -u -r1.283 -r1.284 src/sys/arch/sparc64/sparc64/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sparc64/dev/ebus_mainbus.c
diff -u src/sys/arch/sparc64/dev/ebus_mainbus.c:1.15 src/sys/arch/sparc64/dev/ebus_mainbus.c:1.16
--- src/sys/arch/sparc64/dev/ebus_mainbus.c:1.15	Tue Nov  4 18:11:42 2014
+++ src/sys/arch/sparc64/dev/ebus_mainbus.c	Fri May 13 21:22:47 2016
@@ -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 @@ XXX
 	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;

Index: src/sys/arch/sparc64/sparc64/machdep.c
diff -u src/sys/arch/sparc64/sparc64/machdep.c:1.283 src/sys/arch/sparc64/sparc64/machdep.c:1.284
--- src/sys/arch/sparc64/sparc64/machdep.c:1.283	Sun Nov 22 09:32:34 2015
+++ src/sys/arch/sparc64/sparc64/machdep.c	Fri May 13 21:22:47 2016
@@ -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 @@ sparc_mainbus_intr_establish(bus_space_t
 {
 	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);

Reply via email to