Replace MALLOC(9) with malloc(9) in non critical path.
This commit is contained in:
parent
739b734996
commit
2e1bb9e9d2
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: grf_subr.c,v 1.12 2005/12/11 12:17:14 christos Exp $ */
|
||||
/* $NetBSD: grf_subr.c,v 1.13 2006/03/19 06:13:43 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: grf_subr.c,v 1.12 2005/12/11 12:17:14 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: grf_subr.c,v 1.13 2006/03/19 06:13:43 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -67,7 +67,7 @@ grfdev_attach(struct grfdev_softc *sc,
|
|||
if (sc->sc_isconsole)
|
||||
sc->sc_data = gp = &grf_cn;
|
||||
else {
|
||||
MALLOC(sc->sc_data, struct grf_data *, sizeof(struct grf_data),
|
||||
sc->sc_data = malloc(sizeof(struct grf_data),
|
||||
M_DEVBUF, M_NOWAIT | M_ZERO);
|
||||
if (sc->sc_data == NULL) {
|
||||
printf("\n%s: can't allocate grf data\n",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hpib.c,v 1.31 2005/12/11 12:17:14 christos Exp $ */
|
||||
/* $NetBSD: hpib.c,v 1.32 2006/03/19 06:13:43 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -72,7 +72,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hpib.c,v 1.31 2005/12/11 12:17:14 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hpib.c,v 1.32 2006/03/19 06:13:43 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -168,8 +168,7 @@ hpibbusattach(struct device *parent, struct device *self, void *aux)
|
|||
/*
|
||||
* Initialize the DMA queue entry.
|
||||
*/
|
||||
MALLOC(sc->sc_dq, struct dmaqueue *, sizeof(struct dmaqueue),
|
||||
M_DEVBUF, M_NOWAIT);
|
||||
sc->sc_dq = malloc(sizeof(struct dmaqueue), M_DEVBUF, M_NOWAIT);
|
||||
if (sc->sc_dq == NULL) {
|
||||
printf("%s: can't allocate DMA queue entry\n", self->dv_xname);
|
||||
return;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ite.c,v 1.69 2005/12/11 12:17:14 christos Exp $ */
|
||||
/* $NetBSD: ite.c,v 1.70 2006/03/19 06:13:43 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -119,7 +119,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.69 2005/12/11 12:17:14 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.70 2006/03/19 06:13:43 tsutsui Exp $");
|
||||
|
||||
#include "hil.h"
|
||||
|
||||
|
@ -262,8 +262,8 @@ iteattach(struct device *parent, struct device *self, void *aux)
|
|||
cn_tab->cn_dev = makedev(cdevsw_lookup_major(&ite_cdevsw),
|
||||
self->dv_unit);
|
||||
} else {
|
||||
MALLOC(ite->sc_data, struct ite_data *,
|
||||
sizeof(struct ite_data), M_DEVBUF, M_NOWAIT | M_ZERO);
|
||||
ite->sc_data = malloc(sizeof(struct ite_data), M_DEVBUF,
|
||||
M_NOWAIT | M_ZERO);
|
||||
if (ite->sc_data == NULL) {
|
||||
printf("\n%s: malloc for ite_data failed\n",
|
||||
ite->sc_dev.dv_xname);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: autoconf.c,v 1.77 2006/02/26 05:31:54 thorpej Exp $ */
|
||||
/* $NetBSD: autoconf.c,v 1.78 2006/03/19 06:13:43 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 2002 The NetBSD Foundation, Inc.
|
||||
|
@ -143,7 +143,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.77 2006/02/26 05:31:54 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.78 2006/03/19 06:13:43 tsutsui Exp $");
|
||||
|
||||
#include "hil.h"
|
||||
#include "dvbox.h"
|
||||
|
@ -452,8 +452,7 @@ device_register(struct device *dev, void *aux)
|
|||
* we can mount as root.
|
||||
*/
|
||||
|
||||
MALLOC(dd, struct dev_data *, sizeof(struct dev_data),
|
||||
M_DEVBUF, M_NOWAIT | M_ZERO);
|
||||
dd = malloc(sizeof(struct dev_data), M_DEVBUF, M_NOWAIT | M_ZERO);
|
||||
if (dd == NULL)
|
||||
panic("device_register: can't allocate dev_data");
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: intr.c,v 1.26 2005/12/11 12:17:18 christos Exp $ */
|
||||
/* $NetBSD: intr.c,v 1.27 2006/03/19 06:13:43 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.26 2005/12/11 12:17:18 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.27 2006/03/19 06:13:43 tsutsui Exp $");
|
||||
|
||||
#define _HP300_INTR_H_PRIVATE
|
||||
|
||||
|
@ -197,8 +197,7 @@ intr_establish(int (*func)(void *), void *arg, int ipl, int priority)
|
|||
if ((ipl < 0) || (ipl >= NISR))
|
||||
panic("intr_establish: bad ipl %d", ipl);
|
||||
|
||||
MALLOC(newih, struct hp300_intrhand *, sizeof(struct hp300_intrhand),
|
||||
M_DEVBUF, M_NOWAIT);
|
||||
newih = malloc(sizeof(struct hp300_intrhand), M_DEVBUF, M_NOWAIT);
|
||||
if (newih == NULL)
|
||||
panic("intr_establish: can't allocate space for handler");
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mem.c,v 1.42 2005/12/11 12:17:18 christos Exp $ */
|
||||
/* $NetBSD: mem.c,v 1.43 2006/03/19 06:13:43 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
|
@ -77,7 +77,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.42 2005/12/11 12:17:18 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.43 2006/03/19 06:13:43 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -197,7 +197,7 @@ mmrw(dev_t dev, struct uio *uio, int flags)
|
|||
* of memory for use with /dev/zero.
|
||||
*/
|
||||
if (devzeropage == NULL) {
|
||||
MALLOC(devzeropage, caddr_t, PAGE_SIZE, M_TEMP,
|
||||
devzeropage = malloc(PAGE_SIZE, M_TEMP,
|
||||
M_WAITOK | M_ZERO);
|
||||
}
|
||||
c = min(iov->iov_len, PAGE_SIZE);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: softintr.c,v 1.7 2005/12/11 12:17:18 christos Exp $ */
|
||||
/* $NetBSD: softintr.c,v 1.8 2006/03/19 06:13:43 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -42,7 +42,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: softintr.c,v 1.7 2005/12/11 12:17:18 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: softintr.c,v 1.8 2006/03/19 06:13:43 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -146,8 +146,7 @@ softintr_establish(int ipl, void (*func)(void *), void *arg)
|
|||
|
||||
hsi = &hp300_soft_intrs[ipl];
|
||||
|
||||
MALLOC(sih, struct hp300_soft_intrhand *,
|
||||
sizeof(struct hp300_soft_intrhand), M_DEVBUF, M_NOWAIT);
|
||||
sih = malloc(sizeof(struct hp300_soft_intrhand), M_DEVBUF, M_NOWAIT);
|
||||
if (__predict_true(sih != NULL)) {
|
||||
sih->sih_intrhead = hsi;
|
||||
sih->sih_fn = func;
|
||||
|
|
Loading…
Reference in New Issue