summaryrefslogtreecommitdiff
path: root/sys/arch/macppc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-09-08 08:29:36 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-09-08 08:29:36 +0000
commit452f8582f649a1eb981457a8286419cc454f2c54 (patch)
tree2da6697ca276d860ab386f9f3d9cea8a841af96b /sys/arch/macppc
parente7feec7ba38b0fa556832e09015184ec25caeeaa (diff)
sizes for free(); ok semarie
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r--sys/arch/macppc/dev/awacs.c10
-rw-r--r--sys/arch/macppc/dev/dbdma.c4
-rw-r--r--sys/arch/macppc/dev/i2s.c10
-rw-r--r--sys/arch/macppc/dev/macintr.c4
-rw-r--r--sys/arch/macppc/dev/openpic.c4
5 files changed, 16 insertions, 16 deletions
diff --git a/sys/arch/macppc/dev/awacs.c b/sys/arch/macppc/dev/awacs.c
index 6598493c830..58fcff171e0 100644
--- a/sys/arch/macppc/dev/awacs.c
+++ b/sys/arch/macppc/dev/awacs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: awacs.c,v 1.31 2015/05/11 06:46:21 ratchov Exp $ */
+/* $OpenBSD: awacs.c,v 1.32 2015/09/08 08:29:35 deraadt Exp $ */
/* $NetBSD: awacs.c,v 1.4 2001/02/26 21:07:51 wiz Exp $ */
/*-
@@ -870,7 +870,7 @@ awacs_allocm(void *h, int dir, size_t size, int type, int flags)
1, &p->nsegs, flags)) != 0) {
printf("%s: unable to allocate dma, error = %d\n",
sc->sc_dev.dv_xname, error);
- free(p, type, 0);
+ free(p, type, sizeof *p);
return NULL;
}
@@ -879,7 +879,7 @@ awacs_allocm(void *h, int dir, size_t size, int type, int flags)
printf("%s: unable to map dma, error = %d\n",
sc->sc_dev.dv_xname, error);
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
- free(p, type, 0);
+ free(p, type, sizeof *p);
return NULL;
}
@@ -889,7 +889,7 @@ awacs_allocm(void *h, int dir, size_t size, int type, int flags)
sc->sc_dev.dv_xname, error);
bus_dmamem_unmap(sc->sc_dmat, p->addr, size);
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
- free(p, type, 0);
+ free(p, type, sizeof *p);
return NULL;
}
@@ -900,7 +900,7 @@ awacs_allocm(void *h, int dir, size_t size, int type, int flags)
bus_dmamap_destroy(sc->sc_dmat, p->map);
bus_dmamem_unmap(sc->sc_dmat, p->addr, size);
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
- free(p, type, 0);
+ free(p, type, sizeof *p);
return NULL;
}
diff --git a/sys/arch/macppc/dev/dbdma.c b/sys/arch/macppc/dev/dbdma.c
index e47b2d0bbb7..7a2fcbfe6db 100644
--- a/sys/arch/macppc/dev/dbdma.c
+++ b/sys/arch/macppc/dev/dbdma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dbdma.c,v 1.10 2014/07/12 18:44:42 tedu Exp $ */
+/* $OpenBSD: dbdma.c,v 1.11 2015/09/08 08:29:35 deraadt Exp $ */
/* $NetBSD: dbdma.c,v 1.2 1998/08/21 16:13:28 tsubai Exp $ */
/*
@@ -153,5 +153,5 @@ dbdma_free(dbdma_t dt)
bus_dmamem_unmap(dt->d_dmat, (caddr_t)dt->d_addr, dt->d_size);
if (dt->d_nsegs)
bus_dmamem_free(dt->d_dmat, dt->d_segs, dt->d_nsegs);
- free(dt, M_DEVBUF, 0);
+ free(dt, M_DEVBUF, sizeof *dt);
}
diff --git a/sys/arch/macppc/dev/i2s.c b/sys/arch/macppc/dev/i2s.c
index 5af23bb23a5..6cbbf3f4c23 100644
--- a/sys/arch/macppc/dev/i2s.c
+++ b/sys/arch/macppc/dev/i2s.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i2s.c,v 1.29 2015/07/17 22:30:58 mpi Exp $ */
+/* $OpenBSD: i2s.c,v 1.30 2015/09/08 08:29:35 deraadt Exp $ */
/* $NetBSD: i2s.c,v 1.1 2003/12/27 02:19:34 grant Exp $ */
/*-
@@ -1056,7 +1056,7 @@ i2s_allocm(void *h, int dir, size_t size, int type, int flags)
1, &p->nsegs, flags)) != 0) {
printf("%s: unable to allocate dma, error = %d\n",
sc->sc_dev.dv_xname, error);
- free(p, type, 0);
+ free(p, type, sizeof *p);
return NULL;
}
@@ -1065,7 +1065,7 @@ i2s_allocm(void *h, int dir, size_t size, int type, int flags)
printf("%s: unable to map dma, error = %d\n",
sc->sc_dev.dv_xname, error);
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
- free(p, type, 0);
+ free(p, type, sizeof *p);
return NULL;
}
@@ -1075,7 +1075,7 @@ i2s_allocm(void *h, int dir, size_t size, int type, int flags)
sc->sc_dev.dv_xname, error);
bus_dmamem_unmap(sc->sc_dmat, p->addr, size);
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
- free(p, type, 0);
+ free(p, type, sizeof *p);
return NULL;
}
@@ -1086,7 +1086,7 @@ i2s_allocm(void *h, int dir, size_t size, int type, int flags)
bus_dmamap_destroy(sc->sc_dmat, p->map);
bus_dmamem_unmap(sc->sc_dmat, p->addr, size);
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
- free(p, type, 0);
+ free(p, type, sizeof *p);
return NULL;
}
diff --git a/sys/arch/macppc/dev/macintr.c b/sys/arch/macppc/dev/macintr.c
index ff8a657f06d..6054216554d 100644
--- a/sys/arch/macppc/dev/macintr.c
+++ b/sys/arch/macppc/dev/macintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: macintr.c,v 1.52 2015/06/24 11:58:06 mpi Exp $ */
+/* $OpenBSD: macintr.c,v 1.53 2015/09/08 08:29:35 deraadt Exp $ */
/*-
* Copyright (c) 2008 Dale Rahn <drahn@openbsd.org>
@@ -368,7 +368,7 @@ macintr_disestablish(void *lcp, void *arg)
ppc_intr_enable(s);
evcount_detach(&ih->ih_count);
- free((void *)ih, M_DEVBUF, 0);
+ free(ih, M_DEVBUF, sizeof *ih);
if (TAILQ_EMPTY(&iq->iq_list))
iq->iq_ist = IST_NONE;
diff --git a/sys/arch/macppc/dev/openpic.c b/sys/arch/macppc/dev/openpic.c
index b92a699b8d9..5ea2438fa12 100644
--- a/sys/arch/macppc/dev/openpic.c
+++ b/sys/arch/macppc/dev/openpic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openpic.c,v 1.82 2015/06/25 08:56:33 mpi Exp $ */
+/* $OpenBSD: openpic.c,v 1.83 2015/09/08 08:29:35 deraadt Exp $ */
/*-
* Copyright (c) 2008 Dale Rahn <drahn@openbsd.org>
@@ -499,7 +499,7 @@ openpic_intr_disestablish(void *lcp, void *arg)
ppc_intr_enable(s);
evcount_detach(&ih->ih_count);
- free((void *)ih, M_DEVBUF, 0);
+ free(ih, M_DEVBUF, sizeof *ih);
if (TAILQ_EMPTY(&iq->iq_list))
iq->iq_ist = IST_NONE;