diff options
author | alfred <alfred@FreeBSD.org> | 2003-01-21 08:56:16 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2003-01-21 08:56:16 +0000 |
commit | bf8e8a6e8f0bd9165109f0a258730dd242299815 (patch) | |
tree | f16a2fb9fa7a7fbc4c19e981d278d5f6eb53234d /sys/pci | |
parent | 2180deee00350fff613a1d1d1328eddc4c0ba9c8 (diff) | |
download | FreeBSD-src-bf8e8a6e8f0bd9165109f0a258730dd242299815.zip FreeBSD-src-bf8e8a6e8f0bd9165109f0a258730dd242299815.tar.gz |
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/agp.c | 2 | ||||
-rw-r--r-- | sys/pci/agp_i810.c | 2 | ||||
-rw-r--r-- | sys/pci/if_dc.c | 8 | ||||
-rw-r--r-- | sys/pci/if_de.c | 16 | ||||
-rw-r--r-- | sys/pci/if_mn.c | 18 | ||||
-rw-r--r-- | sys/pci/if_pcn.c | 4 | ||||
-rw-r--r-- | sys/pci/if_rl.c | 4 | ||||
-rw-r--r-- | sys/pci/if_sf.c | 8 | ||||
-rw-r--r-- | sys/pci/if_sis.c | 2 | ||||
-rw-r--r-- | sys/pci/if_sk.c | 2 | ||||
-rw-r--r-- | sys/pci/if_ste.c | 8 | ||||
-rw-r--r-- | sys/pci/if_ti.c | 16 | ||||
-rw-r--r-- | sys/pci/if_tl.c | 8 | ||||
-rw-r--r-- | sys/pci/if_vr.c | 8 | ||||
-rw-r--r-- | sys/pci/if_wb.c | 6 | ||||
-rw-r--r-- | sys/pci/if_xl.c | 10 | ||||
-rw-r--r-- | sys/pci/ncr.c | 4 | ||||
-rw-r--r-- | sys/pci/simos.c | 2 | ||||
-rw-r--r-- | sys/pci/xrpu.c | 2 |
19 files changed, 65 insertions, 65 deletions
diff --git a/sys/pci/agp.c b/sys/pci/agp.c index 2281334..ddd29b9 100644 --- a/sys/pci/agp.c +++ b/sys/pci/agp.c @@ -351,7 +351,7 @@ agp_generic_alloc_memory(device_t dev, int type, vm_size_t size) return 0; } - mem = malloc(sizeof *mem, M_AGP, M_WAITOK); + mem = malloc(sizeof *mem, M_AGP, 0); mem->am_id = sc->as_nextid++; mem->am_size = size; mem->am_type = 0; diff --git a/sys/pci/agp_i810.c b/sys/pci/agp_i810.c index dba76a9..d7c42f4 100644 --- a/sys/pci/agp_i810.c +++ b/sys/pci/agp_i810.c @@ -500,7 +500,7 @@ agp_i810_alloc_memory(device_t dev, int type, vm_size_t size) return 0; } - mem = malloc(sizeof *mem, M_AGP, M_WAITOK); + mem = malloc(sizeof *mem, M_AGP, 0); mem->am_id = sc->agp.as_nextid++; mem->am_size = size; mem->am_type = type; diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c index a9e599e..2aa4e33 100644 --- a/sys/pci/if_dc.c +++ b/sys/pci/if_dc.c @@ -2423,11 +2423,11 @@ dc_newbuf(sc, i, m) c = &sc->dc_ldata->dc_rx_list[i]; if (m == NULL) { - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) return(ENOBUFS); - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); return(ENOBUFS); @@ -3186,11 +3186,11 @@ dc_coal(sc, m_head) struct mbuf *m_new, *m; m = *m_head; - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) return(ENOBUFS); if (m->m_pkthdr.len > MHLEN) { - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); return(ENOBUFS); diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c index d186586..9e1e319 100644 --- a/sys/pci/if_de.c +++ b/sys/pci/if_de.c @@ -195,7 +195,7 @@ tulip_txprobe( * either is connected so the transmit is the only way * to verify the connectivity. */ - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) return 0; /* @@ -3545,12 +3545,12 @@ tulip_rx_intr( */ if (accept || ms == NULL) { struct mbuf *m0; - MGETHDR(m0, M_DONTWAIT, MT_DATA); + MGETHDR(m0, M_NOWAIT, MT_DATA); if (m0 != NULL) { #if defined(TULIP_COPY_RXDATA) if (!accept || total_len >= (MHLEN - 2)) { #endif - MCLGET(m0, M_DONTWAIT); + MCLGET(m0, M_NOWAIT); if ((m0->m_flags & M_EXT) == 0) { m_freem(m0); m0 = NULL; @@ -4061,10 +4061,10 @@ tulip_mbuf_compress( { struct mbuf *m0; #if MCLBYTES >= ETHERMTU + 18 && !defined(BIG_PACKET) - MGETHDR(m0, M_DONTWAIT, MT_DATA); + MGETHDR(m0, M_NOWAIT, MT_DATA); if (m0 != NULL) { if (m->m_pkthdr.len > MHLEN) { - MCLGET(m0, M_DONTWAIT); + MCLGET(m0, M_NOWAIT); if ((m0->m_flags & M_EXT) == 0) { m_freem(m); m_freem(m0); @@ -4081,9 +4081,9 @@ tulip_mbuf_compress( while (len > 0) { if (mlen == MHLEN) { - MGETHDR(*mp, M_DONTWAIT, MT_DATA); + MGETHDR(*mp, M_NOWAIT, MT_DATA); } else { - MGET(*mp, M_DONTWAIT, MT_DATA); + MGET(*mp, M_NOWAIT, MT_DATA); } if (*mp == NULL) { m_freem(m0); @@ -4091,7 +4091,7 @@ tulip_mbuf_compress( break; } if (len > MLEN) { - MCLGET(*mp, M_DONTWAIT); + MCLGET(*mp, M_NOWAIT); if (((*mp)->m_flags & M_EXT) == 0) { m_freem(m0); m0 = NULL; diff --git a/sys/pci/if_mn.c b/sys/pci/if_mn.c index b809d6b..7ed07d1 100644 --- a/sys/pci/if_mn.c +++ b/sys/pci/if_mn.c @@ -695,7 +695,7 @@ ngmn_connect(hook_p hook) /* Setup a transmit chain with one descriptor */ /* XXX: we actually send a 1 byte packet */ dp = mn_alloc_desc(); - MGETHDR(m, M_TRYWAIT, MT_DATA); + MGETHDR(m, 0, MT_DATA); if (m == NULL) return ENOBUFS; m->m_pkthdr.len = 0; @@ -712,12 +712,12 @@ ngmn_connect(hook_p hook) dp = mn_alloc_desc(); m = NULL; - MGETHDR(m, M_TRYWAIT, MT_DATA); + MGETHDR(m, 0, MT_DATA); if (m == NULL) { mn_free_desc(dp); return (ENOBUFS); } - MCLGET(m, M_TRYWAIT); + MCLGET(m, 0); if ((m->m_flags & M_EXT) == 0) { mn_free_desc(dp); m_freem(m); @@ -735,13 +735,13 @@ ngmn_connect(hook_p hook) dp2 = dp; dp = mn_alloc_desc(); m = NULL; - MGETHDR(m, M_TRYWAIT, MT_DATA); + MGETHDR(m, 0, MT_DATA); if (m == NULL) { mn_free_desc(dp); m_freem(m); return (ENOBUFS); } - MCLGET(m, M_TRYWAIT); + MCLGET(m, 0); if ((m->m_flags & M_EXT) == 0) { mn_free_desc(dp); m_freem(m); @@ -839,7 +839,7 @@ mn_create_channel(struct mn_softc *sc, int chan) struct schan *sch; sch = sc->ch[chan] = (struct schan *)malloc(sizeof *sc->ch[chan], - M_MN, M_WAITOK | M_ZERO); + M_MN, M_ZERO); sch->sc = sc; sch->state = DOWN; sch->chan = chan; @@ -1183,12 +1183,12 @@ mn_rx_intr(struct mn_softc *sc, u_int32_t vector) /* Replenish desc + mbuf supplies */ if (!m) { - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) { mn_free_desc(dp); return; /* ENOBUFS */ } - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if((m->m_flags & M_EXT) == 0) { mn_free_desc(dp); m_freem(m); @@ -1340,7 +1340,7 @@ mn_attach (device_t self) once++; } - sc = (struct mn_softc *)malloc(sizeof *sc, M_MN, M_WAITOK | M_ZERO); + sc = (struct mn_softc *)malloc(sizeof *sc, M_MN, M_ZERO); device_set_softc(self, sc); sc->dev = self; diff --git a/sys/pci/if_pcn.c b/sys/pci/if_pcn.c index 14abc27..009fe46 100644 --- a/sys/pci/if_pcn.c +++ b/sys/pci/if_pcn.c @@ -776,11 +776,11 @@ pcn_newbuf(sc, idx, m) c = &sc->pcn_ldata->pcn_rx_list[idx]; if (m == NULL) { - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) return(ENOBUFS); - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); return(ENOBUFS); diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c index e05cbcd..e1713bb 100644 --- a/sys/pci/if_rl.c +++ b/sys/pci/if_rl.c @@ -1500,11 +1500,11 @@ rl_encap(sc, m_head) * per packet. We have to copy pretty much all the time. */ - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) return(1); if (m_head->m_pkthdr.len > MHLEN) { - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); return(1); diff --git a/sys/pci/if_sf.c b/sys/pci/if_sf.c index a148ba5..7b63a01 100644 --- a/sys/pci/if_sf.c +++ b/sys/pci/if_sf.c @@ -924,11 +924,11 @@ sf_newbuf(sc, c, m) struct mbuf *m_new = NULL; if (m == NULL) { - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) return(ENOBUFS); - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); return(ENOBUFS); @@ -1304,14 +1304,14 @@ sf_encap(sc, c, m_head) if (m != NULL) { struct mbuf *m_new = NULL; - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) { printf("sf%d: no memory for tx list\n", sc->sf_unit); return(1); } if (m_head->m_pkthdr.len > MHLEN) { - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); printf("sf%d: no memory for tx list\n", diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c index 0f8e392..4f4cce0 100644 --- a/sys/pci/if_sis.c +++ b/sys/pci/if_sis.c @@ -1481,7 +1481,7 @@ sis_newbuf(sc, c, m) return(EINVAL); if (m == NULL) { - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return(ENOBUFS); } else diff --git a/sys/pci/if_sk.c b/sys/pci/if_sk.c index e58d1c4..3aa40e7 100644 --- a/sys/pci/if_sk.c +++ b/sys/pci/if_sk.c @@ -688,7 +688,7 @@ sk_newbuf(sc_if, c, m) if (m == NULL) { caddr_t *buf = NULL; - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) return(ENOBUFS); diff --git a/sys/pci/if_ste.c b/sys/pci/if_ste.c index 370b0f5..4e5e9b7 100644 --- a/sys/pci/if_ste.c +++ b/sys/pci/if_ste.c @@ -1142,10 +1142,10 @@ ste_newbuf(sc, c, m) struct mbuf *m_new = NULL; if (m == NULL) { - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) return(ENOBUFS); - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); return(ENOBUFS); @@ -1519,13 +1519,13 @@ encap_retry: * mbuf chain first. Bail out if we can't get the * new buffers. Code borrowed from if_fxp.c */ - MGETHDR(mn, M_DONTWAIT, MT_DATA); + MGETHDR(mn, M_NOWAIT, MT_DATA); if (mn == NULL) { m_freem(m_head); return ENOMEM; } if (m_head->m_pkthdr.len > MHLEN) { - MCLGET(mn, M_DONTWAIT); + MCLGET(mn, M_NOWAIT); if ((mn->m_flags & M_EXT) == 0) { m_freem(mn); m_freem(m_head); diff --git a/sys/pci/if_ti.c b/sys/pci/if_ti.c index a384322..894ac43 100644 --- a/sys/pci/if_ti.c +++ b/sys/pci/if_ti.c @@ -1130,11 +1130,11 @@ ti_newbuf_std(sc, i, m) struct ti_rx_desc *r; if (m == NULL) { - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) return(ENOBUFS); - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); return(ENOBUFS); @@ -1174,7 +1174,7 @@ ti_newbuf_mini(sc, i, m) struct ti_rx_desc *r; if (m == NULL) { - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) { return(ENOBUFS); } @@ -1218,7 +1218,7 @@ ti_newbuf_jumbo(sc, i, m) caddr_t *buf = NULL; /* Allocate the mbuf. */ - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) { return(ENOBUFS); } @@ -1300,19 +1300,19 @@ ti_newbuf_jumbo(sc, idx, m_old) } } else { /* Allocate the mbufs. */ - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) { printf("ti%d: mbuf allocation failed " "-- packet dropped!\n", sc->ti_unit); goto nobufs; } - MGET(m[NPAYLOAD], M_DONTWAIT, MT_DATA); + MGET(m[NPAYLOAD], M_NOWAIT, MT_DATA); if (m[NPAYLOAD] == NULL) { printf("ti%d: cluster mbuf allocation failed " "-- packet dropped!\n", sc->ti_unit); goto nobufs; } - MCLGET(m[NPAYLOAD], M_DONTWAIT); + MCLGET(m[NPAYLOAD], M_NOWAIT); if ((m[NPAYLOAD]->m_flags & M_EXT) == 0) { printf("ti%d: mbuf allocation failed " "-- packet dropped!\n", sc->ti_unit); @@ -1321,7 +1321,7 @@ ti_newbuf_jumbo(sc, idx, m_old) m[NPAYLOAD]->m_len = MCLBYTES; for (i = 0; i < NPAYLOAD; i++){ - MGET(m[i], M_DONTWAIT, MT_DATA); + MGET(m[i], M_NOWAIT, MT_DATA); if (m[i] == NULL) { printf("ti%d: mbuf allocation failed " "-- packet dropped!\n", sc->ti_unit); diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c index 0fc990a..682bbef 100644 --- a/sys/pci/if_tl.c +++ b/sys/pci/if_tl.c @@ -1459,11 +1459,11 @@ tl_newbuf(sc, c) { struct mbuf *m_new = NULL; - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) return(ENOBUFS); - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); return(ENOBUFS); @@ -1909,13 +1909,13 @@ tl_encap(sc, c, m_head) if (m != NULL) { struct mbuf *m_new = NULL; - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) { if_printf(ifp, "no memory for tx list\n"); return(1); } if (m_head->m_pkthdr.len > MHLEN) { - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); if_printf(ifp, "no memory for tx list\n"); diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c index 407abf1..01b1992 100644 --- a/sys/pci/if_vr.c +++ b/sys/pci/if_vr.c @@ -948,11 +948,11 @@ vr_newbuf(sc, c, m) struct mbuf *m_new = NULL; if (m == NULL) { - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) return(ENOBUFS); - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); return(ENOBUFS); @@ -1292,13 +1292,13 @@ vr_encap(sc, c, m_head) if (m != NULL) { struct mbuf *m_new = NULL; - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) { printf("vr%d: no memory for tx list\n", sc->vr_unit); return(1); } if (m_head->m_pkthdr.len > MHLEN) { - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); printf("vr%d: no memory for tx list\n", diff --git a/sys/pci/if_wb.c b/sys/pci/if_wb.c index 30618af..0ceaecb 100644 --- a/sys/pci/if_wb.c +++ b/sys/pci/if_wb.c @@ -1112,7 +1112,7 @@ wb_newbuf(sc, c, m) struct mbuf *m_new = NULL; if (m == NULL) { - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) return(ENOBUFS); m_new->m_data = c->wb_buf; @@ -1467,11 +1467,11 @@ wb_encap(sc, c, m_head) if (m != NULL) { struct mbuf *m_new = NULL; - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) return(1); if (m_head->m_pkthdr.len > MHLEN) { - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); return(1); diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c index 85011d2..203f9ba 100644 --- a/sys/pci/if_xl.c +++ b/sys/pci/if_xl.c @@ -931,7 +931,7 @@ xl_testpacket(sc) ifp = &sc->arpcom.ac_if; - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) return; @@ -1931,11 +1931,11 @@ xl_newbuf(sc, c) int error; u_int32_t baddr; - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) return(ENOBUFS); - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); return(ENOBUFS); @@ -2432,14 +2432,14 @@ xl_encap(sc, c, m_head) if (error) { struct mbuf *m_new = NULL; - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) { m_freem(m_head); printf("xl%d: no memory for tx list\n", sc->xl_unit); return(1); } if (m_head->m_pkthdr.len > MHLEN) { - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); m_freem(m_head); diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c index bd7b5c3..e91a392 100644 --- a/sys/pci/ncr.c +++ b/sys/pci/ncr.c @@ -3602,7 +3602,7 @@ ncr_attach (device_t dev) 0, 0xffffffff, PAGE_SIZE); } else { np->script = (struct script *) - malloc (sizeof (struct script), M_DEVBUF, M_WAITOK); + malloc (sizeof (struct script), M_DEVBUF, 0); } /* XXX JGibbs - Use contigmalloc */ @@ -3613,7 +3613,7 @@ ncr_attach (device_t dev) } else { np->scripth = (struct scripth *) - malloc (sizeof (struct scripth), M_DEVBUF, M_WAITOK); + malloc (sizeof (struct scripth), M_DEVBUF, 0); } #ifdef SCSI_NCR_PCI_CONFIG_FIXUP diff --git a/sys/pci/simos.c b/sys/pci/simos.c index 040e042..6b865dd 100644 --- a/sys/pci/simos.c +++ b/sys/pci/simos.c @@ -111,7 +111,7 @@ simos_attach(pcici_t config_id, int unit) struct simos_softc* sc; struct cam_devq *devq; - sc = malloc(sizeof(struct simos_softc), M_DEVBUF, M_WAITOK | M_ZERO); + sc = malloc(sizeof(struct simos_softc), M_DEVBUF, M_ZERO); simosp[unit] = sc; sc->sc_unit = unit; diff --git a/sys/pci/xrpu.c b/sys/pci/xrpu.c index dc21896..7afa22c 100644 --- a/sys/pci/xrpu.c +++ b/sys/pci/xrpu.c @@ -164,7 +164,7 @@ xrpu_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *tdr) /* Name SHALL be zero terminated */ xt->xt_name[sizeof xt->xt_name - 1] = '\0'; i = strlen(xt->xt_name); - sc->tc.tc_name = (char *)malloc(i + 1, M_XRPU, M_WAITOK); + sc->tc.tc_name = (char *)malloc(i + 1, M_XRPU, 0); strcpy(sc->tc.tc_name, xt->xt_name); sc->tc.tc_frequency = xt->xt_frequency; sc->tc.tc_get_timecount = xrpu_get_timecount; |