diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-09-17 00:50:47 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-09-17 00:50:47 +0000 |
commit | 7787a4acd7b5bace98cf0236c135ca371b07e417 (patch) | |
tree | d9f89ddb889547b4eb5e1038c93d6983e127af2c /sys/dev | |
parent | dee76242343fdb431ba6179e83aaaae3ceb4030a (diff) |
Some bzero() -> M_ZERO. ok jakemsr@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/auich.c | 5 | ||||
-rw-r--r-- | sys/dev/pci/auixp.c | 5 | ||||
-rw-r--r-- | sys/dev/pci/esa.c | 5 |
3 files changed, 6 insertions, 9 deletions
diff --git a/sys/dev/pci/auich.c b/sys/dev/pci/auich.c index 1f22577d255..4bb9c67d783 100644 --- a/sys/dev/pci/auich.c +++ b/sys/dev/pci/auich.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auich.c,v 1.64 2007/08/02 07:43:41 jakemsr Exp $ */ +/* $OpenBSD: auich.c,v 1.65 2007/09/17 00:50:46 krw Exp $ */ /* * Copyright (c) 2000,2001 Michael Shalayeff @@ -1066,10 +1066,9 @@ auich_allocm(v, direction, size, pool, flags) if (size > AUICH_DMALIST_MAX * AUICH_DMASEG_MAX) return NULL; - p = malloc(sizeof(*p), pool, flags); + p = malloc(sizeof(*p), pool, flags | M_ZERO); if (!p) return NULL; - bzero(p, sizeof(*p)); p->size = size; if ((error = bus_dmamem_alloc(sc->dmat, p->size, NBPG, 0, p->segs, diff --git a/sys/dev/pci/auixp.c b/sys/dev/pci/auixp.c index fe768466f4e..35499f99977 100644 --- a/sys/dev/pci/auixp.c +++ b/sys/dev/pci/auixp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auixp.c,v 1.10 2007/05/26 00:36:03 krw Exp $ */ +/* $OpenBSD: auixp.c,v 1.11 2007/09/17 00:50:46 krw Exp $ */ /* $NetBSD: auixp.c,v 1.9 2005/06/27 21:13:09 thorpej Exp $ */ /* @@ -781,10 +781,9 @@ auixp_allocate_dma_chain(struct auixp_softc *sc, struct auixp_dma **dmap) /* allocate keeper of dma area */ *dmap = NULL; - dma = malloc(sizeof(*dma), M_DEVBUF, M_NOWAIT); + dma = malloc(sizeof(*dma), M_DEVBUF, M_NOWAIT | M_ZERO); if (!dma) return ENOMEM; - bzero(dma, sizeof(*dma)); /* allocate for daisychain of IXP hardware-dma descriptors */ error = auixp_allocmem(sc, DMA_DESC_CHAIN * sizeof(atiixp_dma_desc_t), diff --git a/sys/dev/pci/esa.c b/sys/dev/pci/esa.c index 808644ae7a8..938b12f1c7d 100644 --- a/sys/dev/pci/esa.c +++ b/sys/dev/pci/esa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: esa.c,v 1.11 2006/01/25 23:54:21 brad Exp $ */ +/* $OpenBSD: esa.c,v 1.12 2007/09/17 00:50:46 krw Exp $ */ /* $NetBSD: esa.c,v 1.12 2002/03/24 14:17:35 jmcneill Exp $ */ /* @@ -1072,7 +1072,7 @@ esa_attach(struct device *parent, struct device *self, void *aux) /* create suspend save area */ len = sizeof(u_int16_t) * (ESA_REV_B_CODE_MEMORY_LENGTH + ESA_REV_B_DATA_MEMORY_LENGTH + 1); - sc->savemem = (u_int16_t *)malloc(len, M_DEVBUF, M_NOWAIT); + sc->savemem = malloc(len, M_DEVBUF, M_NOWAIT | M_ZERO); if (sc->savemem == NULL) { printf("%s: unable to allocate suspend buffer\n", sc->sc_dev.dv_xname); @@ -1080,7 +1080,6 @@ esa_attach(struct device *parent, struct device *self, void *aux) bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_ios); return; } - bzero(sc->savemem, len); /* * Every card I've seen has had their channels swapped with respect |