diff options
author | arr <arr@FreeBSD.org> | 2002-04-19 17:43:11 +0000 |
---|---|---|
committer | arr <arr@FreeBSD.org> | 2002-04-19 17:43:11 +0000 |
commit | 1482903ceafd6c259928760686a1a308932b4d7c (patch) | |
tree | fa3c5e71044a167ec12068a413ebbdf7f295cbf8 /sys/dev/hea/eni_buffer.c | |
parent | f8344a0fde63f55dca7542891be03ed0181062f7 (diff) | |
download | FreeBSD-src-1482903ceafd6c259928760686a1a308932b4d7c.zip FreeBSD-src-1482903ceafd6c259928760686a1a308932b4d7c.tar.gz |
- Remove KM_ macro calls and replace with the real function we're calling.
As a note, this driver needs the same updating as the hfa driver was
just given; removing these macros since I will be nuking them from
netatm.
Diffstat (limited to 'sys/dev/hea/eni_buffer.c')
-rw-r--r-- | sys/dev/hea/eni_buffer.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/sys/dev/hea/eni_buffer.c b/sys/dev/hea/eni_buffer.c index 89aa901..d1946f0 100644 --- a/sys/dev/hea/eni_buffer.c +++ b/sys/dev/hea/eni_buffer.c @@ -121,7 +121,7 @@ eni_test_memory ( eup ) * This makes sure we don't leave anything funny in the * queues. */ - KM_ZERO ( (uintptr_t)eup->eu_ram, ram_size ); + bzero ( (uintptr_t)eup->eu_ram, ram_size ); /* * If we'd like to claim to have less memory, here's where @@ -162,12 +162,9 @@ eni_init_memory ( eup ) /* * Allocate initial element which will hold all of memory */ - if ( ( eup->eu_memmap = (Mbd *)KM_ALLOC(sizeof(Mbd), M_DEVBUF, - M_NOWAIT ) ) == NULL ) - { - /* Memory allocation error */ - return -1; - } + eup->eu_memmap = malloc(sizeof(Mbd), M_DEVBUF, M_NOWAIT); + if (eup->eu_memmap == NULL) + return (-1); /* * Test and size memory @@ -272,9 +269,8 @@ eni_allocate_buffer ( eup, size ) Mbd *etmp; /* Yep - create a new segment */ - etmp = (Mbd *)KM_ALLOC(sizeof(Mbd), M_DEVBUF, - M_NOWAIT ); - if ( etmp == (Mbd *)NULL ) { + etmp = malloc(sizeof(Mbd), M_DEVBUF, M_NOWAIT); + if (etmp == NULL) { /* * Couldn't allocate a new descriptor. Indicate * failure and exit now or we'll start losing @@ -282,7 +278,7 @@ eni_allocate_buffer ( eup, size ) */ eup->eu_stats.eni_st_drv.drv_mm_nodesc++; *size = 0; - return ( (caddr_t)NULL ); + return (NULL); } /* Place it in the list */ etmp->next = eptr->next; @@ -437,7 +433,7 @@ eni_free_buffer ( eup, base ) /* Reset to where we want to be */ eptr = eptr->prev; /* and free this element */ - (void)KM_FREE(etmp, etmp->size, M_DEVBUF); + free(etmp, M_DEVBUF); } /* with next */ if ( eptr->next ) @@ -453,7 +449,7 @@ eni_free_buffer ( eup, base ) /* skip next block */ eptr->next = etmp->next; /* and free next element */ - (void)KM_FREE(etmp, etmp->size, M_DEVBUF); + free(etmp, M_DEVBUF); } /* * We've freed the buffer and done any compaction, |