aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ar/if_ar.c4
-rw-r--r--sys/dev/ce/if_ce.c5
-rw-r--r--sys/dev/hwpmc/hwpmc_amd.c6
-rw-r--r--sys/dev/hwpmc/hwpmc_logging.c4
-rw-r--r--sys/dev/hwpmc/hwpmc_mod.c78
-rw-r--r--sys/dev/hwpmc/hwpmc_piv.c9
-rw-r--r--sys/dev/hwpmc/hwpmc_ppro.c4
-rw-r--r--sys/dev/hwpmc/hwpmc_x86.c4
-rw-r--r--sys/dev/lmc/if_lmc.c4
-rw-r--r--sys/dev/ray/if_ray.c3
-rw-r--r--sys/dev/ray/if_rayvar.h2
-rw-r--r--sys/dev/sr/if_sr.c5
-rw-r--r--sys/dev/usb/udbp.c4
13 files changed, 62 insertions, 70 deletions
diff --git a/sys/dev/ar/if_ar.c b/sys/dev/ar/if_ar.c
index 35756e4f6395..55411d813c0e 100644
--- a/sys/dev/ar/if_ar.c
+++ b/sys/dev/ar/if_ar.c
@@ -365,7 +365,7 @@ ar_detach(device_t device)
* deallocate any system resources we may have
* allocated on behalf of this driver.
*/
- FREE(hc->sc, M_DEVBUF);
+ free(hc->sc, M_DEVBUF);
hc->sc = NULL;
hc->mem_start = NULL;
return (ar_deallocate_resources(device));
@@ -1071,7 +1071,7 @@ arc_init(struct ar_hardc *hc)
u_char isr, mar;
u_long memst;
- MALLOC(sc, struct ar_softc *, hc->numports * sizeof(struct ar_softc),
+ sc = malloc(hc->numports * sizeof(struct ar_softc),
M_DEVBUF, M_WAITOK | M_ZERO);
if (sc == NULL)
return;
diff --git a/sys/dev/ce/if_ce.c b/sys/dev/ce/if_ce.c
index 9b0d69cbecd4..7b3ff872d681 100644
--- a/sys/dev/ce/if_ce.c
+++ b/sys/dev/ce/if_ce.c
@@ -2366,8 +2366,7 @@ static int ng_ce_rcvmsg (node_p node, struct ng_mesg *msg,
break;
}
#else
- MALLOC (resp, struct ng_mesg *, dl,
- M_NETGRAPH, M_NOWAIT);
+ resp = malloc (M_NETGRAPH, M_NOWAIT);
if (! resp) {
error = ENOMEM;
break;
@@ -2400,7 +2399,7 @@ static int ng_ce_rcvmsg (node_p node, struct ng_mesg *msg,
NG_FREE_MSG (msg);
#else
*rptr = resp;
- FREE (msg, M_NETGRAPH);
+ free (msg, M_NETGRAPH);
#endif
return error;
}
diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c
index 4477173e73c5..fd4c5bc007d2 100644
--- a/sys/dev/hwpmc/hwpmc_amd.c
+++ b/sys/dev/hwpmc/hwpmc_amd.c
@@ -838,7 +838,7 @@ amd_init(int cpu)
PMCDBG(MDP,INI,1,"amd-init cpu=%d", cpu);
- MALLOC(pcs, struct amd_cpu *, sizeof(struct amd_cpu), M_PMC,
+ pcs = malloc(sizeof(struct amd_cpu), M_PMC,
M_WAITOK|M_ZERO);
phw = &pcs->pc_amdpmcs[0];
@@ -911,7 +911,7 @@ amd_cleanup(int cpu)
#endif
pmc_pcpu[cpu] = NULL;
- FREE(pcs, M_PMC);
+ free(pcs, M_PMC);
return 0;
}
@@ -960,7 +960,7 @@ pmc_amd_initialize(void)
amd_pmc_class = class;
#endif
- MALLOC(pmc_mdep, struct pmc_mdep *, sizeof(struct pmc_mdep),
+ pmc_mdep = malloc(sizeof(struct pmc_mdep),
M_PMC, M_WAITOK|M_ZERO);
pmc_mdep->pmd_cputype = cputype;
diff --git a/sys/dev/hwpmc/hwpmc_logging.c b/sys/dev/hwpmc/hwpmc_logging.c
index 77417aff8177..8f1ca01cec28 100644
--- a/sys/dev/hwpmc/hwpmc_logging.c
+++ b/sys/dev/hwpmc/hwpmc_logging.c
@@ -973,7 +973,7 @@ pmclog_initialize()
/* create global pool of log buffers */
for (n = 0; n < pmc_nlogbuffers; n++) {
- MALLOC(plb, struct pmclog_buffer *, 1024 * pmclog_buffer_size,
+ plb = malloc(1024 * pmclog_buffer_size,
M_PMC, M_ZERO|M_WAITOK);
PMCLOG_INIT_BUFFER_DESCRIPTOR(plb);
TAILQ_INSERT_HEAD(&pmc_bufferlist, plb, plb_next);
@@ -999,6 +999,6 @@ pmclog_shutdown()
while ((plb = TAILQ_FIRST(&pmc_bufferlist)) != NULL) {
TAILQ_REMOVE(&pmc_bufferlist, plb, plb_next);
- FREE(plb, M_PMC);
+ free(plb, M_PMC);
}
}
diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c
index dbf732ba8fa6..3bda5ba2845a 100644
--- a/sys/dev/hwpmc/hwpmc_mod.c
+++ b/sys/dev/hwpmc/hwpmc_mod.c
@@ -331,7 +331,7 @@ pmc_debugflags_parse(char *newstr, char *fence)
int error, found, *newbits, tmp;
size_t kwlen;
- MALLOC(tmpflags, struct pmc_debugflags *, sizeof(*tmpflags),
+ tmpflags = malloc(sizeof(*tmpflags),
M_PMC, M_WAITOK|M_ZERO);
p = newstr;
@@ -450,7 +450,7 @@ pmc_debugflags_parse(char *newstr, char *fence)
bcopy(tmpflags, &pmc_debugflags, sizeof(pmc_debugflags));
done:
- FREE(tmpflags, M_PMC);
+ free(tmpflags, M_PMC);
return error;
}
@@ -464,7 +464,7 @@ pmc_debugflags_sysctl_handler(SYSCTL_HANDLER_ARGS)
(void) arg1; (void) arg2; /* unused parameters */
n = sizeof(pmc_debugstr);
- MALLOC(newstr, char *, n, M_PMC, M_ZERO|M_WAITOK);
+ newstr = malloc(n, M_PMC, M_ZERO|M_WAITOK);
(void) strlcpy(newstr, pmc_debugstr, n);
error = sysctl_handle_string(oidp, newstr, n, req);
@@ -477,7 +477,7 @@ pmc_debugflags_sysctl_handler(SYSCTL_HANDLER_ARGS)
sizeof(pmc_debugstr));
}
- FREE(newstr, M_PMC);
+ free(newstr, M_PMC);
return error;
}
@@ -777,7 +777,7 @@ pmc_link_target_process(struct pmc *pm, struct pmc_process *pp)
__LINE__, pp, pm));
#endif
- MALLOC(pt, struct pmc_target *, sizeof(struct pmc_target),
+ pt = malloc(sizeof(struct pmc_target),
M_PMC, M_ZERO|M_WAITOK);
pt->pt_process = pp;
@@ -849,7 +849,7 @@ pmc_unlink_target_process(struct pmc *pm, struct pmc_process *pp)
"in pmc %p", __LINE__, pp->pp_proc, pp, pm));
LIST_REMOVE(ptgt, pt_next);
- FREE(ptgt, M_PMC);
+ free(ptgt, M_PMC);
/* if the PMC now lacks targets, send the owner a SIGIO */
if (LIST_EMPTY(&pm->pm_targets)) {
@@ -972,7 +972,7 @@ pmc_attach_one_process(struct proc *p, struct pmc *pm)
} else
pmclog_process_pmcattach(pm, p->p_pid, fullpath);
if (freepath)
- FREE(freepath, M_TEMP);
+ free(freepath, M_TEMP);
if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm)))
pmc_log_process_mappings(pm->pm_owner, p);
}
@@ -1093,7 +1093,7 @@ pmc_detach_one_process(struct proc *p, struct pmc *pm, int flags)
pmc_remove_process_descriptor(pp);
if (flags & PMC_FLAG_REMOVE)
- FREE(pp, M_PMC);
+ free(pp, M_PMC);
PROC_LOCK(p);
p->p_flag &= ~P_HWPMC;
@@ -1511,7 +1511,7 @@ pmc_process_mmap(struct thread *td, struct pmckern_map_in *pkm)
done:
if (freepath)
- FREE(freepath, M_TEMP);
+ free(freepath, M_TEMP);
}
@@ -1575,7 +1575,7 @@ pmc_log_kernel_mappings(struct pmc *pm)
pmclog_process_map_in(po, (pid_t) -1, km->pm_address,
km->pm_file);
}
- FREE(kmbase, M_LINKER);
+ free(kmbase, M_LINKER);
po->po_flags |= PMC_PO_INITIAL_MAPPINGS_DONE;
}
@@ -1692,7 +1692,7 @@ pmc_hook_handler(struct thread *td, int function, void *arg)
if (!is_using_hwpmcs) {
if (freepath)
- FREE(freepath, M_TEMP);
+ free(freepath, M_TEMP);
break;
}
@@ -1712,7 +1712,7 @@ pmc_hook_handler(struct thread *td, int function, void *arg)
*/
if ((pp = pmc_find_process_descriptor(p, 0)) == NULL) {
if (freepath)
- FREE(freepath, M_TEMP);
+ free(freepath, M_TEMP);
break;
}
@@ -1732,7 +1732,7 @@ pmc_hook_handler(struct thread *td, int function, void *arg)
}
if (freepath)
- FREE(freepath, M_TEMP);
+ free(freepath, M_TEMP);
PMCDBG(PRC,EXC,1, "exec proc=%p (%d, %s) cred-changed=%d",
@@ -1765,7 +1765,7 @@ pmc_hook_handler(struct thread *td, int function, void *arg)
if (pp->pp_refcnt == 0) {
pmc_remove_process_descriptor(pp);
- FREE(pp, M_PMC);
+ free(pp, M_PMC);
break;
}
@@ -1861,7 +1861,7 @@ pmc_allocate_owner_descriptor(struct proc *p)
poh = &pmc_ownerhash[hindex];
/* allocate space for N pointers and one descriptor struct */
- MALLOC(po, struct pmc_owner *, sizeof(struct pmc_owner),
+ po = malloc(sizeof(struct pmc_owner),
M_PMC, M_ZERO|M_WAITOK);
po->po_sscount = po->po_error = po->po_flags = 0;
@@ -1888,7 +1888,7 @@ pmc_destroy_owner_descriptor(struct pmc_owner *po)
po, po->po_owner, po->po_owner->p_pid, po->po_owner->p_comm);
mtx_destroy(&po->po_mtx);
- FREE(po, M_PMC);
+ free(po, M_PMC);
}
/*
@@ -1915,8 +1915,7 @@ pmc_find_process_descriptor(struct proc *p, uint32_t mode)
if (mode & PMC_FLAG_ALLOCATE) {
/* allocate additional space for 'n' pmc pointers */
- MALLOC(ppnew, struct pmc_process *,
- sizeof(struct pmc_process) + md->pmd_npmc *
+ ppnew = malloc( sizeof(struct pmc_process) + md->pmd_npmc *
sizeof(struct pmc_targetstate), M_PMC, M_ZERO|M_WAITOK);
}
@@ -1938,7 +1937,7 @@ pmc_find_process_descriptor(struct proc *p, uint32_t mode)
mtx_unlock_spin(&pmc_processhash_mtx);
if (pp != NULL && ppnew != NULL)
- FREE(ppnew, M_PMC);
+ free(ppnew, M_PMC);
return pp;
}
@@ -1997,7 +1996,7 @@ pmc_allocate_pmc_descriptor(void)
{
struct pmc *pmc;
- MALLOC(pmc, struct pmc *, sizeof(struct pmc), M_PMC, M_ZERO|M_WAITOK);
+ pmc = malloc(sizeof(struct pmc), M_PMC, M_ZERO|M_WAITOK);
if (pmc != NULL) {
pmc->pm_owner = NULL;
@@ -2187,7 +2186,7 @@ pmc_release_pmc_descriptor(struct pmc *pm)
if (pp->pp_refcnt == 0) {
pmc_remove_process_descriptor(pp);
- FREE(pp, M_PMC);
+ free(pp, M_PMC);
}
}
@@ -2819,7 +2818,7 @@ pmc_syscall_handler(struct thread *td, void *syscall_args)
npmc = md->pmd_npmc;
pmcinfo_size = npmc * sizeof(struct pmc_info);
- MALLOC(pmcinfo, struct pmc_info *, pmcinfo_size, M_PMC,
+ pmcinfo = malloc(pmcinfo_size, M_PMC,
M_WAITOK);
p = pmcinfo;
@@ -2863,7 +2862,7 @@ pmc_syscall_handler(struct thread *td, void *syscall_args)
if (error == 0)
error = copyout(pmcinfo, &gpi->pm_pmcs, pmcinfo_size);
- FREE(pmcinfo, M_PMC);
+ free(pmcinfo, M_PMC);
}
break;
@@ -3127,7 +3126,7 @@ pmc_syscall_handler(struct thread *td, void *syscall_args)
if (n == (int) md->pmd_npmc) {
pmc_destroy_pmc_descriptor(pmc);
- FREE(pmc, M_PMC);
+ free(pmc, M_PMC);
pmc = NULL;
error = EINVAL;
break;
@@ -3162,7 +3161,7 @@ pmc_syscall_handler(struct thread *td, void *syscall_args)
(error = md->pmd_config_pmc(cpu, n, pmc)) != 0) {
(void) md->pmd_release_pmc(cpu, n, pmc);
pmc_destroy_pmc_descriptor(pmc);
- FREE(pmc, M_PMC);
+ free(pmc, M_PMC);
pmc = NULL;
pmc_restore_cpu_binding(&pb);
error = EPERM;
@@ -3190,7 +3189,7 @@ pmc_syscall_handler(struct thread *td, void *syscall_args)
if ((error =
pmc_register_owner(curthread->td_proc, pmc)) != 0) {
pmc_release_pmc_descriptor(pmc);
- FREE(pmc, M_PMC);
+ free(pmc, M_PMC);
pmc = NULL;
break;
}
@@ -3432,7 +3431,7 @@ pmc_syscall_handler(struct thread *td, void *syscall_args)
pmc_release_pmc_descriptor(pm);
pmc_maybe_remove_owner(po);
- FREE(pm, M_PMC);
+ free(pm, M_PMC);
}
break;
@@ -4167,7 +4166,7 @@ pmc_process_exit(void *arg __unused, struct proc *p)
pmclog_process_procexit(pm, pp);
pmc_unlink_target_process(pm, pp);
}
- FREE(pp, M_PMC);
+ free(pp, M_PMC);
} else
critical_exit(); /* pp == NULL */
@@ -4353,12 +4352,11 @@ pmc_initialize(void)
maxcpu = pmc_cpu_max();
/* allocate space for the per-cpu array */
- MALLOC(pmc_pcpu, struct pmc_cpu **, maxcpu * sizeof(struct pmc_cpu *),
+ pmc_pcpu = malloc(maxcpu * sizeof(struct pmc_cpu *),
M_PMC, M_WAITOK|M_ZERO);
/* per-cpu 'saved values' for managing process-mode PMCs */
- MALLOC(pmc_pcpu_saved, pmc_value_t *,
- sizeof(pmc_value_t) * maxcpu * md->pmd_npmc, M_PMC, M_WAITOK);
+ pmc_pcpu_saved = malloc( sizeof(pmc_value_t) * maxcpu * md->pmd_npmc, M_PMC, M_WAITOK);
/* Perform CPU-dependent initialization. */
pmc_save_cpu_binding(&pb);
@@ -4378,8 +4376,7 @@ pmc_initialize(void)
for (cpu = 0; cpu < maxcpu; cpu++) {
if (!pmc_cpu_is_active(cpu))
continue;
- MALLOC(sb, struct pmc_samplebuffer *,
- sizeof(struct pmc_samplebuffer) +
+ sb = malloc( sizeof(struct pmc_samplebuffer) +
pmc_nsamples * sizeof(struct pmc_sample), M_PMC,
M_WAITOK|M_ZERO);
@@ -4388,8 +4385,7 @@ pmc_initialize(void)
KASSERT(pmc_pcpu[cpu] != NULL,
("[pmc,%d] cpu=%d Null per-cpu data", __LINE__, cpu));
- MALLOC(sb->ps_callchains, uintptr_t *,
- pmc_callchaindepth * pmc_nsamples * sizeof(uintptr_t),
+ sb->ps_callchains = malloc( pmc_callchaindepth * pmc_nsamples * sizeof(uintptr_t),
M_PMC, M_WAITOK|M_ZERO);
for (n = 0, ps = sb->ps_samples; n < pmc_nsamples; n++, ps++)
@@ -4554,8 +4550,8 @@ pmc_cleanup(void)
KASSERT(pmc_pcpu[cpu]->pc_sb != NULL,
("[pmc,%d] Null cpu sample buffer cpu=%d", __LINE__,
cpu));
- FREE(pmc_pcpu[cpu]->pc_sb->ps_callchains, M_PMC);
- FREE(pmc_pcpu[cpu]->pc_sb, M_PMC);
+ free(pmc_pcpu[cpu]->pc_sb->ps_callchains, M_PMC);
+ free(pmc_pcpu[cpu]->pc_sb, M_PMC);
pmc_pcpu[cpu]->pc_sb = NULL;
}
@@ -4572,20 +4568,20 @@ pmc_cleanup(void)
if (md->pmd_cleanup)
md->pmd_cleanup(cpu);
}
- FREE(md, M_PMC);
+ free(md, M_PMC);
md = NULL;
pmc_restore_cpu_binding(&pb);
}
/* deallocate per-cpu structures */
- FREE(pmc_pcpu, M_PMC);
+ free(pmc_pcpu, M_PMC);
pmc_pcpu = NULL;
- FREE(pmc_pcpu_saved, M_PMC);
+ free(pmc_pcpu_saved, M_PMC);
pmc_pcpu_saved = NULL;
if (pmc_pmcdisp) {
- FREE(pmc_pmcdisp, M_PMC);
+ free(pmc_pmcdisp, M_PMC);
pmc_pmcdisp = NULL;
}
diff --git a/sys/dev/hwpmc/hwpmc_piv.c b/sys/dev/hwpmc/hwpmc_piv.c
index 5a22cc9fe64b..01de68ce53bd 100644
--- a/sys/dev/hwpmc/hwpmc_piv.c
+++ b/sys/dev/hwpmc/hwpmc_piv.c
@@ -628,8 +628,7 @@ p4_init(int cpu)
if (pcs == NULL) /* decline to init */
return ENXIO;
- MALLOC(plcs, struct p4_logicalcpu *,
- sizeof(struct p4_logicalcpu), M_PMC, M_WAITOK|M_ZERO);
+ plcs = malloc( sizeof(struct p4_logicalcpu), M_PMC, M_WAITOK|M_ZERO);
/* The TSC is architectural state and is not shared */
plcs->pc_hwpmcs[0] = &plcs->pc_tsc;
@@ -645,7 +644,7 @@ p4_init(int cpu)
return 0;
}
- MALLOC(pcs, struct p4_cpu *, sizeof(struct p4_cpu), M_PMC,
+ pcs = malloc(sizeof(struct p4_cpu), M_PMC,
M_WAITOK|M_ZERO);
if (pcs == NULL)
@@ -699,7 +698,7 @@ p4_cleanup(int cpu)
if (!P4_CPU_IS_HTT_SECONDARY(cpu))
mtx_destroy(&pcs->pc_mtx);
- FREE(pcs, M_PMC);
+ free(pcs, M_PMC);
pmc_pcpu[cpu] = NULL;
@@ -1081,7 +1080,7 @@ p4_allocate_pmc(int cpu, int ri, struct pmc *pm,
/*
* If the system has HTT enabled, and the desired allocation
* mode is process-private, and the PMC row disposition is not
- * FREE (0), decline the allocation.
+ * free (0), decline the allocation.
*/
if (p4_system_has_htt &&
diff --git a/sys/dev/hwpmc/hwpmc_ppro.c b/sys/dev/hwpmc/hwpmc_ppro.c
index 9289e90f2297..fc40e19d92a9 100644
--- a/sys/dev/hwpmc/hwpmc_ppro.c
+++ b/sys/dev/hwpmc/hwpmc_ppro.c
@@ -349,7 +349,7 @@ p6_init(int cpu)
PMCDBG(MDP,INI,0,"p6-init cpu=%d", cpu);
- MALLOC(pcs, struct p6_cpu *, sizeof(struct p6_cpu), M_PMC,
+ pcs = malloc(sizeof(struct p6_cpu), M_PMC,
M_WAITOK|M_ZERO);
phw = pcs->pc_p6pmcs;
@@ -380,7 +380,7 @@ p6_cleanup(int cpu)
PMCDBG(MDP,INI,0,"p6-cleanup cpu=%d", cpu);
if ((pcs = pmc_pcpu[cpu]) != NULL)
- FREE(pcs, M_PMC);
+ free(pcs, M_PMC);
pmc_pcpu[cpu] = NULL;
return 0;
diff --git a/sys/dev/hwpmc/hwpmc_x86.c b/sys/dev/hwpmc/hwpmc_x86.c
index 8720c0e8864b..66bf8dd4cc65 100644
--- a/sys/dev/hwpmc/hwpmc_x86.c
+++ b/sys/dev/hwpmc/hwpmc_x86.c
@@ -293,7 +293,7 @@ pmc_intel_initialize(void)
return NULL;
}
- MALLOC(pmc_mdep, struct pmc_mdep *, sizeof(struct pmc_mdep),
+ pmc_mdep = malloc(sizeof(struct pmc_mdep),
M_PMC, M_WAITOK|M_ZERO);
pmc_mdep->pmd_cputype = cputype;
@@ -346,7 +346,7 @@ pmc_intel_initialize(void)
}
if (error) {
- FREE(pmc_mdep, M_PMC);
+ free(pmc_mdep, M_PMC);
pmc_mdep = NULL;
}
diff --git a/sys/dev/lmc/if_lmc.c b/sys/dev/lmc/if_lmc.c
index 8017e018032c..a5a722be7c79 100644
--- a/sys/dev/lmc/if_lmc.c
+++ b/sys/dev/lmc/if_lmc.c
@@ -5070,8 +5070,8 @@ ng_rcvmsg(node_p node, struct ng_mesg *msg,
if (rptr != NULL)
*rptr = resp;
else if (resp != NULL)
- FREE(resp, M_NETGRAPH);
- FREE(msg, M_NETGRAPH);
+ free(resp, M_NETGRAPH);
+ free(msg, M_NETGRAPH);
# endif
return error;
diff --git a/sys/dev/ray/if_ray.c b/sys/dev/ray/if_ray.c
index 0742c7c9e976..513312c82134 100644
--- a/sys/dev/ray/if_ray.c
+++ b/sys/dev/ray/if_ray.c
@@ -3177,8 +3177,7 @@ ray_com_malloc(ray_comqfn_t function, int flags, char *mesg)
{
struct ray_comq_entry *com;
- MALLOC(com, struct ray_comq_entry *,
- sizeof(struct ray_comq_entry), M_RAYCOM, M_WAITOK);
+ com = malloc( sizeof(struct ray_comq_entry), M_RAYCOM, M_WAITOK);
return (ray_com_init(com, function, flags, mesg));
}
diff --git a/sys/dev/ray/if_rayvar.h b/sys/dev/ray/if_rayvar.h
index 7376405bb19a..d3498a4dd11e 100644
--- a/sys/dev/ray/if_rayvar.h
+++ b/sys/dev/ray/if_rayvar.h
@@ -249,7 +249,7 @@ static int mib_info[RAY_MIB_MAX+1][3] = RAY_MIB_INFO;
#define RAY_COM_FREE(com, ncom) do { \
int i; \
for (i = 0; i < ncom; i++) \
- FREE(com[i], M_RAYCOM); \
+ free(com[i], M_RAYCOM); \
} while (0)
/*
diff --git a/sys/dev/sr/if_sr.c b/sys/dev/sr/if_sr.c
index 2711dfeaaa35..550771527acc 100644
--- a/sys/dev/sr/if_sr.c
+++ b/sys/dev/sr/if_sr.c
@@ -305,8 +305,7 @@ sr_attach(device_t device)
int unit; /* index: channel w/in card */
hc = (struct sr_hardc *)device_get_softc(device);
- MALLOC(sc, struct sr_softc *,
- hc->numports * sizeof(struct sr_softc),
+ sc = malloc( hc->numports * sizeof(struct sr_softc),
M_DEVBUF, M_WAITOK | M_ZERO);
if (sc == NULL)
goto errexit;
@@ -478,7 +477,7 @@ sr_detach(device_t device)
* deallocate any system resources we may have
* allocated on behalf of this driver.
*/
- FREE(hc->sc, M_DEVBUF);
+ free(hc->sc, M_DEVBUF);
hc->sc = NULL;
hc->mem_start = NULL;
return (sr_deallocate_resources(device));
diff --git a/sys/dev/usb/udbp.c b/sys/dev/usb/udbp.c
index 2ca437541aec..523184fd6964 100644
--- a/sys/dev/usb/udbp.c
+++ b/sys/dev/usb/udbp.c
@@ -411,10 +411,10 @@ udbp_attach(device_t self)
bad:
#if 0 /* probably done in udbp_detach() */
if (sc->sc_bulkout_buffer) {
- FREE(sc->sc_bulkout_buffer, M_USBDEV);
+ free(sc->sc_bulkout_buffer, M_USBDEV);
}
if (sc->sc_bulkin_buffer) {
- FREE(sc->sc_bulkin_buffer, M_USBDEV);
+ free(sc->sc_bulkin_buffer, M_USBDEV);
}
if (sc->sc_bulkout_xfer) {
usbd_free_xfer(sc->sc_bulkout_xfer);