diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-06 23:12:18 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-06 23:12:18 +0000 |
commit | fd70724e0c6df0ffd868e0c7d80b8f683072b49a (patch) | |
tree | 140851dd496663ab3addada146fd76ce4f7d40fe /sys/arch/alpha | |
parent | 938a1718c74fd46e0af3080125cc5fa95e489e0c (diff) |
Some archs used memset() rather than bzero(). So duplicate diff
previously applied to other archs deleting a memset() this time. e.g.
- if ((mapstore = malloc(mapsize, M_DEVBUF,
- (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL)
+ if ((mapstore = malloc(mapsize, M_DEVBUF, (flags & BUS_DMA_NOWAIT) ?
+ (M_NOWAIT | M_ZERO) : (M_WAITOK | M_ZERO))) == NULL)
return (ENOMEM);
- memset(mapstore, 0, mapsize);
Diffstat (limited to 'sys/arch/alpha')
-rw-r--r-- | sys/arch/alpha/isa/isadma_bounce.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/arch/alpha/isa/isadma_bounce.c b/sys/arch/alpha/isa/isadma_bounce.c index 508583cfa6c..5bb4bea5ed6 100644 --- a/sys/arch/alpha/isa/isadma_bounce.c +++ b/sys/arch/alpha/isa/isadma_bounce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isadma_bounce.c,v 1.6 2006/05/12 20:48:19 brad Exp $ */ +/* $OpenBSD: isadma_bounce.c,v 1.7 2007/10/06 23:12:17 krw Exp $ */ /* $NetBSD: isadma_bounce.c,v 1.3 2000/06/29 09:02:57 mrg Exp $ */ /*- @@ -155,12 +155,11 @@ isadma_bounce_dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments, /* * Allocate our cookie. */ - if ((cookiestore = malloc(cookiesize, M_DEVBUF, - (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) { + if ((cookiestore = malloc(cookiesize, M_DEVBUF, (flags & BUS_DMA_NOWAIT) + ? (M_NOWAIT | M_ZERO) : (M_WAITOK | M_ZERO))) == NULL) { error = ENOMEM; goto out; } - memset(cookiestore, 0, cookiesize); cookie = (struct isadma_bounce_cookie *)cookiestore; cookie->id_flags = cookieflags; map->_dm_cookie = cookie; |