summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc64/dev/ebus.c5
-rw-r--r--sys/arch/sparc64/dev/pyro.c5
-rw-r--r--sys/arch/sparc64/dev/schizo.c5
-rw-r--r--sys/dev/ic/ath.c5
-rw-r--r--sys/dev/ic/ciss.c8
-rw-r--r--sys/dev/ic/i82596.c5
-rw-r--r--sys/dev/ic/pgt.c8
-rw-r--r--sys/dev/pci/musycc.c5
8 files changed, 18 insertions, 28 deletions
diff --git a/sys/arch/sparc64/dev/ebus.c b/sys/arch/sparc64/dev/ebus.c
index 2ce0e709bc9..8ffae5cb851 100644
--- a/sys/arch/sparc64/dev/ebus.c
+++ b/sys/arch/sparc64/dev/ebus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ebus.c,v 1.17 2007/04/10 17:47:55 miod Exp $ */
+/* $OpenBSD: ebus.c,v 1.18 2007/09/18 00:46:41 krw Exp $ */
/* $NetBSD: ebus.c,v 1.24 2001/07/25 03:49:54 eeh Exp $ */
/*
@@ -373,11 +373,10 @@ _ebus_alloc_bus_tag(struct ebus_softc *sc, const char *name,
{
struct sparc_bus_space_tag *bt;
- bt = malloc(sizeof(*bt), M_DEVBUF, M_NOWAIT);
+ bt = malloc(sizeof(*bt), M_DEVBUF, M_NOWAIT | M_ZERO);
if (bt == NULL)
panic("could not allocate ebus bus tag");
- bzero(bt, sizeof *bt);
snprintf(bt->name, sizeof(bt->name), "%s_%s",
sc->sc_dev.dv_xname, name);
bt->cookie = sc;
diff --git a/sys/arch/sparc64/dev/pyro.c b/sys/arch/sparc64/dev/pyro.c
index 1f1585266f9..d69f9604c9d 100644
--- a/sys/arch/sparc64/dev/pyro.c
+++ b/sys/arch/sparc64/dev/pyro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pyro.c,v 1.7 2007/04/03 19:59:01 kettenis Exp $ */
+/* $OpenBSD: pyro.c,v 1.8 2007/09/18 00:46:41 krw Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -299,11 +299,10 @@ _pyro_alloc_bus_tag(struct pyro_pbm *pbm, const char *name, int ss,
struct pyro_softc *sc = pbm->pp_sc;
struct sparc_bus_space_tag *bt;
- bt = malloc(sizeof(*bt), M_DEVBUF, M_NOWAIT);
+ bt = malloc(sizeof(*bt), M_DEVBUF, M_NOWAIT | M_ZERO);
if (bt == NULL)
panic("pyro: could not allocate bus tag");
- bzero(bt, sizeof *bt);
snprintf(bt->name, sizeof(bt->name), "%s-pbm_%s(%d/%2.2x)",
sc->sc_dv.dv_xname, name, ss, asi);
diff --git a/sys/arch/sparc64/dev/schizo.c b/sys/arch/sparc64/dev/schizo.c
index 28546179308..998121d2d92 100644
--- a/sys/arch/sparc64/dev/schizo.c
+++ b/sys/arch/sparc64/dev/schizo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: schizo.c,v 1.48 2007/08/25 19:25:31 kettenis Exp $ */
+/* $OpenBSD: schizo.c,v 1.49 2007/09/18 00:46:41 krw Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -533,11 +533,10 @@ schizo_alloc_bus_tag(struct schizo_pbm *pbm, const char *name, int ss,
struct schizo_softc *sc = pbm->sp_sc;
struct sparc_bus_space_tag *bt;
- bt = malloc(sizeof(*bt), M_DEVBUF, M_NOWAIT);
+ bt = malloc(sizeof(*bt), M_DEVBUF, M_NOWAIT | M_ZERO);
if (bt == NULL)
panic("schizo: could not allocate bus tag");
- bzero(bt, sizeof *bt);
snprintf(bt->name, sizeof(bt->name), "%s-pbm_%s(%d/%2.2x)",
sc->sc_dv.dv_xname, name, ss, asi);
diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c
index 0936ffc6a1e..1ca938460ad 100644
--- a/sys/dev/ic/ath.c
+++ b/sys/dev/ic/ath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ath.c,v 1.66 2007/07/18 18:10:31 damien Exp $ */
+/* $OpenBSD: ath.c,v 1.67 2007/09/18 00:46:41 krw Exp $ */
/* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */
/*-
@@ -1613,14 +1613,13 @@ ath_desc_alloc(struct ath_softc *sc)
/* allocate buffers */
bsize = sizeof(struct ath_buf) * (ATH_TXBUF + ATH_RXBUF + 1);
- bf = malloc(bsize, M_DEVBUF, M_NOWAIT);
+ bf = malloc(bsize, M_DEVBUF, M_NOWAIT | M_ZERO);
if (bf == NULL) {
printf("%s: unable to allocate Tx/Rx buffers\n",
sc->sc_dev.dv_xname);
error = ENOMEM;
goto fail3;
}
- bzero(bf, bsize);
sc->sc_bufptr = bf;
TAILQ_INIT(&sc->sc_rxbuf);
diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c
index 260872fc2ba..ced349a564a 100644
--- a/sys/dev/ic/ciss.c
+++ b/sys/dev/ic/ciss.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ciss.c,v 1.27 2007/06/24 05:34:35 dlg Exp $ */
+/* $OpenBSD: ciss.c,v 1.28 2007/09/18 00:46:41 krw Exp $ */
/*
* Copyright (c) 2005,2006 Michael Shalayeff
@@ -350,12 +350,11 @@ ciss_attach(struct ciss_softc *sc)
}
if (!(sc->sc_lds = malloc(sc->maxunits * sizeof(*sc->sc_lds),
- M_DEVBUF, M_NOWAIT))) {
+ M_DEVBUF, M_NOWAIT | M_ZERO))) {
bus_dmamem_free(sc->dmat, sc->cmdseg, 1);
bus_dmamap_destroy(sc->dmat, sc->cmdmap);
return -1;
}
- bzero(sc->sc_lds, sc->maxunits * sizeof(*sc->sc_lds));
sc->sc_flush = CISS_FLUSH_ENABLE;
if (!(sc->sc_sh = shutdownhook_establish(ciss_shutdown, sc))) {
@@ -422,9 +421,8 @@ ciss_attach(struct ciss_softc *sc)
sc->sc_flags |= CISS_BIO;
#ifndef SMALL_KERNEL
sc->sensors = malloc(sizeof(struct ksensor) * sc->maxunits,
- M_DEVBUF, M_NOWAIT);
+ M_DEVBUF, M_NOWAIT | M_ZERO);
if (sc->sensors) {
- bzero(sc->sensors, sizeof(struct ksensor) * sc->maxunits);
strlcpy(sc->sensordev.xname, sc->sc_dev.dv_xname,
sizeof(sc->sensordev.xname));
for (i = 0; i < sc->maxunits;
diff --git a/sys/dev/ic/i82596.c b/sys/dev/ic/i82596.c
index 70f22039b3d..68b5fa015e8 100644
--- a/sys/dev/ic/i82596.c
+++ b/sys/dev/ic/i82596.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82596.c,v 1.27 2007/09/10 06:12:59 kettenis Exp $ */
+/* $OpenBSD: i82596.c,v 1.28 2007/09/18 00:46:41 krw Exp $ */
/* $NetBSD: i82586.c,v 1.18 1998/08/15 04:42:42 mycroft Exp $ */
/*-
@@ -325,13 +325,12 @@ i82596_attach(sc, name, etheraddr, media, nmedia, defmedia)
if (padbuf == NULL) {
padbuf = malloc(ETHER_MIN_LEN - ETHER_CRC_LEN, M_DEVBUF,
- M_NOWAIT);
+ M_NOWAIT | M_ZERO);
if (padbuf == NULL) {
printf("%s: can't allocate pad buffer\n",
sc->sc_dev.dv_xname);
return;
}
- bzero(padbuf, ETHER_MIN_LEN - ETHER_CRC_LEN);
}
/* Attach the interface. */
diff --git a/sys/dev/ic/pgt.c b/sys/dev/ic/pgt.c
index 674172fa6b0..f5652536c8c 100644
--- a/sys/dev/ic/pgt.c
+++ b/sys/dev/ic/pgt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pgt.c,v 1.44 2007/08/28 18:34:38 deraadt Exp $ */
+/* $OpenBSD: pgt.c,v 1.45 2007/09/18 00:46:41 krw Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
@@ -1812,9 +1812,8 @@ pgt_ieee80211_node_alloc(struct ieee80211com *ic)
{
struct pgt_ieee80211_node *pin;
- pin = malloc(sizeof(*pin), M_DEVBUF, M_NOWAIT);
+ pin = malloc(sizeof(*pin), M_DEVBUF, M_NOWAIT | M_ZERO);
if (pin != NULL) {
- bzero(pin, sizeof *pin);
pin->pin_dot1x_auth = PIN_DOT1X_UNAUTHORIZED;
}
return (struct ieee80211_node *)pin;
@@ -2284,8 +2283,7 @@ pgt_ioctl(struct ifnet *ifp, u_long cmd, caddr_t req)
case SIOCG80211ALLNODES: {
struct ieee80211_nodereq *nr = NULL;
na = (struct ieee80211_nodereq_all *)req;
- wreq = malloc(sizeof(*wreq), M_DEVBUF, M_WAITOK);
- bzero(wreq, sizeof(*wreq));
+ wreq = malloc(sizeof(*wreq), M_DEVBUF, M_WAITOK | M_ZERO);
maxscan = PGT_OBJ_BSSLIST_NBSS;
pob = malloc(sizeof(*pob) +
diff --git a/sys/dev/pci/musycc.c b/sys/dev/pci/musycc.c
index d347381afa0..38939ec2aa1 100644
--- a/sys/dev/pci/musycc.c
+++ b/sys/dev/pci/musycc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: musycc.c,v 1.15 2006/03/25 22:41:46 djm Exp $ */
+/* $OpenBSD: musycc.c,v 1.16 2007/09/18 00:46:41 krw Exp $ */
/*
* Copyright (c) 2004,2005 Internet Business Solutions AG, Zurich, Switzerland
@@ -1653,10 +1653,9 @@ musycc_channel_create(const char *name, u_int8_t locked)
{
struct channel_softc *cc;
- cc = malloc(sizeof(*cc), M_DEVBUF, M_NOWAIT);
+ cc = malloc(sizeof(*cc), M_DEVBUF, M_NOWAIT | M_ZERO);
if (!cc)
return (NULL);
- bzero(cc, sizeof(*cc));
cc->cc_state = CHAN_FLOAT;
cc->cc_locked = locked;