From 10ca085b0950db32eee9649067e4c6f7f40a700a Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 31 Aug 2014 17:26:36 -0600 Subject: [PATCH] Rename kmalloc to kmm_malloc for consistency --- arch/arm/src/common/up_createstack.c | 2 +- arch/arm/src/dm320/dm320_framebuffer.c | 10 +++++----- arch/arm/src/dm320/dm320_usbdev.c | 4 ++-- arch/arm/src/lpc17xx/lpc17_usbdev.c | 4 ++-- arch/arm/src/lpc17xx/lpc17_usbhost.c | 4 ++-- arch/arm/src/lpc214x/lpc214x_usbdev.c | 4 ++-- arch/arm/src/lpc31xx/lpc31_ehci.c | 4 ++-- arch/arm/src/lpc31xx/lpc31_usbdev.c | 4 ++-- arch/arm/src/lpc43xx/lpc43_spifi.c | 2 +- arch/arm/src/lpc43xx/lpc43_usb0dev.c | 4 ++-- arch/arm/src/sam34/sam_udp.c | 2 +- arch/arm/src/sama5/Kconfig | 2 +- arch/arm/src/sama5/sam_ehci.c | 4 ++-- arch/arm/src/sama5/sam_ohci.c | 2 +- arch/arm/src/sama5/sam_udphs.c | 2 +- arch/arm/src/stm32/stm32_i2c.c | 2 +- arch/arm/src/stm32/stm32_i2c_alt.c | 2 +- arch/arm/src/stm32/stm32_otgfsdev.c | 4 ++-- arch/arm/src/stm32/stm32_otgfshost.c | 8 ++++---- arch/arm/src/stm32/stm32_usbdev.c | 2 +- arch/arm/src/stm32/stm32f30xxx_i2c.c | 2 +- arch/avr/src/at90usb/at90usb_usbdev.c | 4 ++-- arch/avr/src/avr32/up_createstack.c | 2 +- arch/hc/src/common/up_createstack.c | 2 +- arch/mips/src/common/up_createstack.c | 2 +- arch/mips/src/pic32mx/pic32mx-usbdev.c | 2 +- arch/rgmp/src/bridge.c | 2 +- arch/rgmp/src/nuttx.c | 2 +- arch/rgmp/src/rgmp.c | 4 ++-- arch/sh/src/common/up_createstack.c | 2 +- arch/x86/src/i486/up_createstack.c | 2 +- arch/z80/src/common/up_createstack.c | 2 +- arch/z80/src/ez80/ez80_i2c.c | 2 +- arch/z80/src/z8/z8_i2c.c | 2 +- 34 files changed, 52 insertions(+), 52 deletions(-) diff --git a/arch/arm/src/common/up_createstack.c b/arch/arm/src/common/up_createstack.c index a346127534..2748f52b94 100644 --- a/arch/arm/src/common/up_createstack.c +++ b/arch/arm/src/common/up_createstack.c @@ -165,7 +165,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) #if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK) tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size); #else - tcb->stack_alloc_ptr = (uint32_t *)kmalloc(stack_size); + tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size); #endif } else diff --git a/arch/arm/src/dm320/dm320_framebuffer.c b/arch/arm/src/dm320/dm320_framebuffer.c index 5f85979697..3fb6a6271e 100644 --- a/arch/arm/src/dm320/dm320_framebuffer.c +++ b/arch/arm/src/dm320/dm320_framebuffer.c @@ -675,10 +675,10 @@ static int dm320_allocvideomemory(void) { #ifndef CONFIG_DM320_VID0_DISABLE #ifndef CONFIG_DM320_DISABLE_PINGPONG - g_vid0base = (FAR void *)kmalloc(2 * DM320_VID0_FBLEN); + g_vid0base = (FAR void *)kmm_malloc(2 * DM320_VID0_FBLEN); g_vid0ppbase = (FAR char*)g_vid0base + DM320_VID0_FBLEN; #else - g_vid0base = (FAR void *)kmalloc(DM320_VID0_FBLEN); + g_vid0base = (FAR void *)kmm_malloc(DM320_VID0_FBLEN); #endif if (!g_vid0base) { @@ -687,7 +687,7 @@ static int dm320_allocvideomemory(void) #endif #ifndef CONFIG_DM320_VID1_DISABLE - g_vid1base = (FAR void *)kmalloc(DM320_VID1_FBLEN); + g_vid1base = (FAR void *)kmm_malloc(DM320_VID1_FBLEN); if (!g_vid1base) { goto errout; @@ -695,7 +695,7 @@ static int dm320_allocvideomemory(void) #endif #ifndef CONFIG_DM320_OSD0_DISABLE - g_osd0base = (FAR void *)kmalloc(DM320_OSD0_FBLEN); + g_osd0base = (FAR void *)kmm_malloc(DM320_OSD0_FBLEN); if (!g_osd0base) { goto errout; @@ -703,7 +703,7 @@ static int dm320_allocvideomemory(void) #endif #ifndef CONFIG_DM320_OSD1_DISABLE - g_osd1base = (FAR void *)kmalloc(DM320_OSD1_FBLEN); + g_osd1base = (FAR void *)kmm_malloc(DM320_OSD1_FBLEN); if (!g_osd1base) { goto errout; diff --git a/arch/arm/src/dm320/dm320_usbdev.c b/arch/arm/src/dm320/dm320_usbdev.c index b04b732e07..0749a13926 100644 --- a/arch/arm/src/dm320/dm320_usbdev.c +++ b/arch/arm/src/dm320/dm320_usbdev.c @@ -1937,7 +1937,7 @@ static FAR struct usbdev_req_s *dm320_epallocreq(FAR struct usbdev_ep_s *ep) #endif usbtrace(TRACE_EPALLOCREQ, ((FAR struct dm320_ep_s *)ep)->epphy); - privreq = (FAR struct dm320_req_s *)kmalloc(sizeof(struct dm320_req_s)); + privreq = (FAR struct dm320_req_s *)kmm_malloc(sizeof(struct dm320_req_s)); if (!privreq) { usbtrace(TRACE_DEVERROR(DM320_TRACEERR_ALLOCFAIL), 0); @@ -1988,7 +1988,7 @@ static void *dm320_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) #ifdef CONFIG_USBDEV_DMAMEMORY return usbdev_dma_alloc(bytes); #else - return kmalloc(bytes); + return kmm_malloc(bytes); #endif } #endif diff --git a/arch/arm/src/lpc17xx/lpc17_usbdev.c b/arch/arm/src/lpc17xx/lpc17_usbdev.c index 218b580218..2e527f670b 100644 --- a/arch/arm/src/lpc17xx/lpc17_usbdev.c +++ b/arch/arm/src/lpc17xx/lpc17_usbdev.c @@ -2659,7 +2659,7 @@ static FAR struct usbdev_req_s *lpc17_epallocreq(FAR struct usbdev_ep_s *ep) #endif usbtrace(TRACE_EPALLOCREQ, ((FAR struct lpc17_ep_s *)ep)->epphy); - privreq = (FAR struct lpc17_req_s *)kmalloc(sizeof(struct lpc17_req_s)); + privreq = (FAR struct lpc17_req_s *)kmm_malloc(sizeof(struct lpc17_req_s)); if (!privreq) { usbtrace(TRACE_DEVERROR(LPC17_TRACEERR_ALLOCFAIL), 0); @@ -2729,7 +2729,7 @@ static FAR void *lpc17_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbytes #else usbtrace(TRACE_EPALLOCBUFFER, privep->epphy); - return kmalloc(bytes); + return kmm_malloc(bytes); #endif } diff --git a/arch/arm/src/lpc17xx/lpc17_usbhost.c b/arch/arm/src/lpc17xx/lpc17_usbhost.c index 56ca38b6c5..230821af88 100644 --- a/arch/arm/src/lpc17xx/lpc17_usbhost.c +++ b/arch/arm/src/lpc17xx/lpc17_usbhost.c @@ -1949,7 +1949,7 @@ static int lpc17_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) * Some hardware supports special memory in which request and descriptor data can * be accessed more efficiently. This method provides a mechanism to allocate * the request/descriptor memory. If the underlying hardware does not support - * such "special" memory, this functions may simply map to kmalloc. + * such "special" memory, this functions may simply map to kmm_malloc. * * This interface was optimized under a particular assumption. It was assumed * that the driver maintains a pool of small, pre-allocated buffers for descriptor @@ -2039,7 +2039,7 @@ static int lpc17_free(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) * Some hardware supports special memory in which larger IO buffers can * be accessed more efficiently. This method provides a mechanism to allocate * the request/descriptor memory. If the underlying hardware does not support - * such "special" memory, this functions may simply map to kmalloc. + * such "special" memory, this functions may simply map to kmm_malloc. * * This interface differs from DRVR_ALLOC in that the buffers are variable-sized. * diff --git a/arch/arm/src/lpc214x/lpc214x_usbdev.c b/arch/arm/src/lpc214x/lpc214x_usbdev.c index c01813e1a1..f2d1658d8f 100644 --- a/arch/arm/src/lpc214x/lpc214x_usbdev.c +++ b/arch/arm/src/lpc214x/lpc214x_usbdev.c @@ -2623,7 +2623,7 @@ static FAR struct usbdev_req_s *lpc214x_epallocreq(FAR struct usbdev_ep_s *ep) #endif usbtrace(TRACE_EPALLOCREQ, ((FAR struct lpc214x_ep_s *)ep)->epphy); - privreq = (FAR struct lpc214x_req_s *)kmalloc(sizeof(struct lpc214x_req_s)); + privreq = (FAR struct lpc214x_req_s *)kmm_malloc(sizeof(struct lpc214x_req_s)); if (!privreq) { usbtrace(TRACE_DEVERROR(LPC214X_TRACEERR_ALLOCFAIL), 0); @@ -2693,7 +2693,7 @@ static FAR void *lpc214x_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbyt #else usbtrace(TRACE_EPALLOCBUFFER, privep->epphy); - return kmalloc(bytes); + return kmm_malloc(bytes); #endif } diff --git a/arch/arm/src/lpc31xx/lpc31_ehci.c b/arch/arm/src/lpc31xx/lpc31_ehci.c index e460241e52..54e4f0e6a6 100755 --- a/arch/arm/src/lpc31xx/lpc31_ehci.c +++ b/arch/arm/src/lpc31xx/lpc31_ehci.c @@ -3690,7 +3690,7 @@ static int lpc31_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) * Some hardware supports special memory in which request and descriptor data * can be accessed more efficiently. This method provides a mechanism to * allocate the request/descriptor memory. If the underlying hardware does - * not support such "special" memory, this functions may simply map to kmalloc. + * not support such "special" memory, this functions may simply map to kmm_malloc. * * This interface was optimized under a particular assumption. It was * assumed that the driver maintains a pool of small, pre-allocated buffers @@ -3723,7 +3723,7 @@ static int lpc31_alloc(FAR struct usbhost_driver_s *drvr, /* There is no special requirements for transfer/descriptor buffers. */ - *buffer = (FAR uint8_t *)kmalloc(CONFIG_LPC31_EHCI_BUFSIZE); + *buffer = (FAR uint8_t *)kmm_malloc(CONFIG_LPC31_EHCI_BUFSIZE); if (*buffer) { *maxlen = CONFIG_LPC31_EHCI_BUFSIZE; diff --git a/arch/arm/src/lpc31xx/lpc31_usbdev.c b/arch/arm/src/lpc31xx/lpc31_usbdev.c index 748430dbe5..0cffe9252e 100644 --- a/arch/arm/src/lpc31xx/lpc31_usbdev.c +++ b/arch/arm/src/lpc31xx/lpc31_usbdev.c @@ -1950,7 +1950,7 @@ static FAR struct usbdev_req_s *lpc31_epallocreq(FAR struct usbdev_ep_s *ep) #endif usbtrace(TRACE_EPALLOCREQ, ((FAR struct lpc31_ep_s *)ep)->epphy); - privreq = (FAR struct lpc31_req_s *)kmalloc(sizeof(struct lpc31_req_s)); + privreq = (FAR struct lpc31_req_s *)kmm_malloc(sizeof(struct lpc31_req_s)); if (!privreq) { usbtrace(TRACE_DEVERROR(LPC31_TRACEERR_ALLOCFAIL), 0); @@ -2001,7 +2001,7 @@ static void *lpc31_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) #ifdef CONFIG_USBDEV_DMAMEMORY return usbdev_dma_alloc(bytes); #else - return kmalloc(bytes); + return kmm_malloc(bytes); #endif } #endif diff --git a/arch/arm/src/lpc43xx/lpc43_spifi.c b/arch/arm/src/lpc43xx/lpc43_spifi.c index fcaae5ea87..a529bc6731 100644 --- a/arch/arm/src/lpc43xx/lpc43_spifi.c +++ b/arch/arm/src/lpc43xx/lpc43_spifi.c @@ -1193,7 +1193,7 @@ FAR struct mtd_dev_s *lpc43_spifi_initialize(void) /* Allocate a buffer for the erase block cache */ - priv->cache = (FAR uint8_t *)kmalloc(SPIFI_BLKSIZE); + priv->cache = (FAR uint8_t *)kmm_malloc(SPIFI_BLKSIZE); if (!priv->cache) { /* Allocation failed! Discard all of that work we just did and return NULL */ diff --git a/arch/arm/src/lpc43xx/lpc43_usb0dev.c b/arch/arm/src/lpc43xx/lpc43_usb0dev.c index eeba3b443a..c77c01465a 100644 --- a/arch/arm/src/lpc43xx/lpc43_usb0dev.c +++ b/arch/arm/src/lpc43xx/lpc43_usb0dev.c @@ -1950,7 +1950,7 @@ static FAR struct usbdev_req_s *lpc43_epallocreq(FAR struct usbdev_ep_s *ep) #endif usbtrace(TRACE_EPALLOCREQ, ((FAR struct lpc43_ep_s *)ep)->epphy); - privreq = (FAR struct lpc43_req_s *)kmalloc(sizeof(struct lpc43_req_s)); + privreq = (FAR struct lpc43_req_s *)kmm_malloc(sizeof(struct lpc43_req_s)); if (!privreq) { usbtrace(TRACE_DEVERROR(LPC43_TRACEERR_ALLOCFAIL), 0); @@ -2001,7 +2001,7 @@ static void *lpc43_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) #ifdef CONFIG_USBDEV_DMAMEMORY return usbdev_dma_alloc(bytes); #else - return kmalloc(bytes); + return kmm_malloc(bytes); #endif } #endif diff --git a/arch/arm/src/sam34/sam_udp.c b/arch/arm/src/sam34/sam_udp.c index a1cc83bdd1..5d4cfad7e7 100644 --- a/arch/arm/src/sam34/sam_udp.c +++ b/arch/arm/src/sam34/sam_udp.c @@ -2987,7 +2987,7 @@ static struct usbdev_req_s *sam_ep_allocreq(struct usbdev_ep_s *ep) #endif usbtrace(TRACE_EPALLOCREQ, USB_EPNO(ep->eplog)); - privreq = (struct sam_req_s *)kmalloc(sizeof(struct sam_req_s)); + privreq = (struct sam_req_s *)kmm_malloc(sizeof(struct sam_req_s)); if (!privreq) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_ALLOCFAIL), 0); diff --git a/arch/arm/src/sama5/Kconfig b/arch/arm/src/sama5/Kconfig index f3baca2f04..b169179d7d 100644 --- a/arch/arm/src/sama5/Kconfig +++ b/arch/arm/src/sama5/Kconfig @@ -2598,7 +2598,7 @@ config SAMA5_UDPHS_PREALLOCATE ---help--- If this option is selected then DMA transfer descriptors will be pre-allocated in .bss. Otherwise, the descriptors will be allocated - at start-up time with kmalloc(). This might be important if a larger + at start-up time with kmm_malloc(). This might be important if a larger memory pool is available after startup. config SAMA5_UDPHS_REGDEBUG diff --git a/arch/arm/src/sama5/sam_ehci.c b/arch/arm/src/sama5/sam_ehci.c index f0706a8c90..e0c17f2ff0 100755 --- a/arch/arm/src/sama5/sam_ehci.c +++ b/arch/arm/src/sama5/sam_ehci.c @@ -3530,7 +3530,7 @@ static int sam_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) * Some hardware supports special memory in which request and descriptor data * can be accessed more efficiently. This method provides a mechanism to * allocate the request/descriptor memory. If the underlying hardware does - * not support such "special" memory, this functions may simply map to kmalloc. + * not support such "special" memory, this functions may simply map to kmm_malloc. * * This interface was optimized under a particular assumption. It was * assumed that the driver maintains a pool of small, pre-allocated buffers @@ -3563,7 +3563,7 @@ static int sam_alloc(FAR struct usbhost_driver_s *drvr, /* There is no special requirements for transfer/descriptor buffers. */ - *buffer = (FAR uint8_t *)kmalloc(CONFIG_SAMA5_EHCI_BUFSIZE); + *buffer = (FAR uint8_t *)kmm_malloc(CONFIG_SAMA5_EHCI_BUFSIZE); if (*buffer) { *maxlen = CONFIG_SAMA5_EHCI_BUFSIZE; diff --git a/arch/arm/src/sama5/sam_ohci.c b/arch/arm/src/sama5/sam_ohci.c index 16c1c264d7..dd8229edac 100644 --- a/arch/arm/src/sama5/sam_ohci.c +++ b/arch/arm/src/sama5/sam_ohci.c @@ -2589,7 +2589,7 @@ static int sam_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) * Some hardware supports special memory in which request and descriptor data can * be accessed more efficiently. This method provides a mechanism to allocate * the request/descriptor memory. If the underlying hardware does not support - * such "special" memory, this functions may simply map to kmalloc. + * such "special" memory, this functions may simply map to kmm_malloc. * * This interface was optimized under a particular assumption. It was assumed * that the driver maintains a pool of small, pre-allocated buffers for descriptor diff --git a/arch/arm/src/sama5/sam_udphs.c b/arch/arm/src/sama5/sam_udphs.c index 5d2f1b24ac..feee254c3c 100644 --- a/arch/arm/src/sama5/sam_udphs.c +++ b/arch/arm/src/sama5/sam_udphs.c @@ -3476,7 +3476,7 @@ static struct usbdev_req_s *sam_ep_allocreq(struct usbdev_ep_s *ep) #endif usbtrace(TRACE_EPALLOCREQ, USB_EPNO(ep->eplog)); - privreq = (struct sam_req_s *)kmalloc(sizeof(struct sam_req_s)); + privreq = (struct sam_req_s *)kmm_malloc(sizeof(struct sam_req_s)); if (!privreq) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_ALLOCFAIL), 0); diff --git a/arch/arm/src/stm32/stm32_i2c.c b/arch/arm/src/stm32/stm32_i2c.c index b08dafd7ae..f10460b35f 100644 --- a/arch/arm/src/stm32/stm32_i2c.c +++ b/arch/arm/src/stm32/stm32_i2c.c @@ -1922,7 +1922,7 @@ FAR struct i2c_dev_s *up_i2cinitialize(int port) /* Allocate instance */ - if (!(inst = kmalloc(sizeof(struct stm32_i2c_inst_s)))) + if (!(inst = kmm_malloc(sizeof(struct stm32_i2c_inst_s)))) { return NULL; } diff --git a/arch/arm/src/stm32/stm32_i2c_alt.c b/arch/arm/src/stm32/stm32_i2c_alt.c index 809d6d34ab..63c329691f 100755 --- a/arch/arm/src/stm32/stm32_i2c_alt.c +++ b/arch/arm/src/stm32/stm32_i2c_alt.c @@ -2450,7 +2450,7 @@ FAR struct i2c_dev_s *up_i2cinitialize(int port) /* Allocate instance */ - if (!(inst = kmalloc(sizeof(struct stm32_i2c_inst_s)))) + if (!(inst = kmm_malloc(sizeof(struct stm32_i2c_inst_s)))) { return NULL; } diff --git a/arch/arm/src/stm32/stm32_otgfsdev.c b/arch/arm/src/stm32/stm32_otgfsdev.c index b5fe45e227..3acd5ced4a 100644 --- a/arch/arm/src/stm32/stm32_otgfsdev.c +++ b/arch/arm/src/stm32/stm32_otgfsdev.c @@ -4237,7 +4237,7 @@ static FAR struct usbdev_req_s *stm32_ep_allocreq(FAR struct usbdev_ep_s *ep) usbtrace(TRACE_EPALLOCREQ, ((FAR struct stm32_ep_s *)ep)->epphy); - privreq = (FAR struct stm32_req_s *)kmalloc(sizeof(struct stm32_req_s)); + privreq = (FAR struct stm32_req_s *)kmm_malloc(sizeof(struct stm32_req_s)); if (!privreq) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_ALLOCFAIL), 0); @@ -4288,7 +4288,7 @@ static void *stm32_ep_allocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) #ifdef CONFIG_USBDEV_DMAMEMORY return usbdev_dma_alloc(bytes); #else - return kmalloc(bytes); + return kmm_malloc(bytes); #endif } #endif diff --git a/arch/arm/src/stm32/stm32_otgfshost.c b/arch/arm/src/stm32/stm32_otgfshost.c index a605647807..86934beabf 100644 --- a/arch/arm/src/stm32/stm32_otgfshost.c +++ b/arch/arm/src/stm32/stm32_otgfshost.c @@ -3480,7 +3480,7 @@ static int stm32_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) * Some hardware supports special memory in which request and descriptor data can * be accessed more efficiently. This method provides a mechanism to allocate * the request/descriptor memory. If the underlying hardware does not support - * such "special" memory, this functions may simply map to kmalloc. + * such "special" memory, this functions may simply map to kmm_malloc. * * This interface was optimized under a particular assumption. It was assumed * that the driver maintains a pool of small, pre-allocated buffers for descriptor @@ -3514,7 +3514,7 @@ static int stm32_alloc(FAR struct usbhost_driver_s *drvr, /* There is no special memory requirement for the STM32. */ - alloc = (FAR uint8_t *)kmalloc(CONFIG_STM32_OTGFS_DESCSIZE); + alloc = (FAR uint8_t *)kmm_malloc(CONFIG_STM32_OTGFS_DESCSIZE); if (!alloc) { return -ENOMEM; @@ -3566,7 +3566,7 @@ static int stm32_free(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) * Some hardware supports special memory in which larger IO buffers can * be accessed more efficiently. This method provides a mechanism to allocate * the request/descriptor memory. If the underlying hardware does not support - * such "special" memory, this functions may simply map to kmalloc. + * such "special" memory, this functions may simply map to kmm_malloc. * * This interface differs from DRVR_ALLOC in that the buffers are variable-sized. * @@ -3595,7 +3595,7 @@ static int stm32_ioalloc(FAR struct usbhost_driver_s *drvr, /* There is no special memory requirement */ - alloc = (FAR uint8_t *)kmalloc(buflen); + alloc = (FAR uint8_t *)kmm_malloc(buflen); if (!alloc) { return -ENOMEM; diff --git a/arch/arm/src/stm32/stm32_usbdev.c b/arch/arm/src/stm32/stm32_usbdev.c index fbc83c5b99..8651c69f5d 100644 --- a/arch/arm/src/stm32/stm32_usbdev.c +++ b/arch/arm/src/stm32/stm32_usbdev.c @@ -2977,7 +2977,7 @@ static struct usbdev_req_s *stm32_epallocreq(struct usbdev_ep_s *ep) #endif usbtrace(TRACE_EPALLOCREQ, USB_EPNO(ep->eplog)); - privreq = (struct stm32_req_s *)kmalloc(sizeof(struct stm32_req_s)); + privreq = (struct stm32_req_s *)kmm_malloc(sizeof(struct stm32_req_s)); if (!privreq) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_ALLOCFAIL), 0); diff --git a/arch/arm/src/stm32/stm32f30xxx_i2c.c b/arch/arm/src/stm32/stm32f30xxx_i2c.c index 1a1f5b41bd..f816bad306 100644 --- a/arch/arm/src/stm32/stm32f30xxx_i2c.c +++ b/arch/arm/src/stm32/stm32f30xxx_i2c.c @@ -2013,7 +2013,7 @@ FAR struct i2c_dev_s *up_i2cinitialize(int port) /* Allocate instance */ - if (!(inst = kmalloc( sizeof(struct stm32_i2c_inst_s)))) + if (!(inst = kmm_malloc( sizeof(struct stm32_i2c_inst_s)))) { return NULL; } diff --git a/arch/avr/src/at90usb/at90usb_usbdev.c b/arch/avr/src/at90usb/at90usb_usbdev.c index 7e9e375551..29cb0f9808 100644 --- a/arch/avr/src/at90usb/at90usb_usbdev.c +++ b/arch/avr/src/at90usb/at90usb_usbdev.c @@ -2287,7 +2287,7 @@ static FAR struct usbdev_req_s *avr_epallocreq(FAR struct usbdev_ep_s *ep) #endif usbtrace(TRACE_EPALLOCREQ, ((FAR struct avr_ep_s *)ep)->ep.eplog); - privreq = (FAR struct avr_req_s *)kmalloc(sizeof(struct avr_req_s)); + privreq = (FAR struct avr_req_s *)kmm_malloc(sizeof(struct avr_req_s)); if (!privreq) { usbtrace(TRACE_DEVERROR(AVR_TRACEERR_ALLOCFAIL), 0); @@ -2339,7 +2339,7 @@ static void *avr_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) #ifdef CONFIG_USBDEV_DMAMEMORY return usbdev_dma_alloc(bytes); #else - return kmalloc(bytes); + return kmm_malloc(bytes); #endif } #endif diff --git a/arch/avr/src/avr32/up_createstack.c b/arch/avr/src/avr32/up_createstack.c index 10895e98f9..a8e2bfeb79 100644 --- a/arch/avr/src/avr32/up_createstack.c +++ b/arch/avr/src/avr32/up_createstack.c @@ -132,7 +132,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) #if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK) tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size); #else - tcb->stack_alloc_ptr = (uint32_t *)kmalloc(stack_size); + tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size); #endif } else diff --git a/arch/hc/src/common/up_createstack.c b/arch/hc/src/common/up_createstack.c index 339ea3c77c..4646b8ad63 100644 --- a/arch/hc/src/common/up_createstack.c +++ b/arch/hc/src/common/up_createstack.c @@ -129,7 +129,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) #if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK) tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size); #else - tcb->stack_alloc_ptr = (uint32_t *)kmalloc(stack_size); + tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size); #endif } else diff --git a/arch/mips/src/common/up_createstack.c b/arch/mips/src/common/up_createstack.c index 940071d18a..676b1e6a4e 100644 --- a/arch/mips/src/common/up_createstack.c +++ b/arch/mips/src/common/up_createstack.c @@ -150,7 +150,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) #if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK) tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size); #else - tcb->stack_alloc_ptr = (uint32_t *)kmalloc(stack_size); + tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size); #endif } else diff --git a/arch/mips/src/pic32mx/pic32mx-usbdev.c b/arch/mips/src/pic32mx/pic32mx-usbdev.c index 7e90179010..f73a73a1ef 100644 --- a/arch/mips/src/pic32mx/pic32mx-usbdev.c +++ b/arch/mips/src/pic32mx/pic32mx-usbdev.c @@ -3324,7 +3324,7 @@ static struct usbdev_req_s *pic32mx_epallocreq(struct usbdev_ep_s *ep) #endif usbtrace(TRACE_EPALLOCREQ, USB_EPNO(ep->eplog)); - privreq = (struct pic32mx_req_s *)kmalloc(sizeof(struct pic32mx_req_s)); + privreq = (struct pic32mx_req_s *)kmm_malloc(sizeof(struct pic32mx_req_s)); if (!privreq) { usbtrace(TRACE_DEVERROR(PIC32MX_TRACEERR_ALLOCFAIL), 0); diff --git a/arch/rgmp/src/bridge.c b/arch/rgmp/src/bridge.c index 86992f1435..5762e0feab 100644 --- a/arch/rgmp/src/bridge.c +++ b/arch/rgmp/src/bridge.c @@ -102,7 +102,7 @@ int rtos_bridge_init(struct rgmp_bridge *b) struct bridge *bridge; char path[30] = {'/', 'd', 'e', 'v', '/'}; - if ((bridge = kmalloc(sizeof(*bridge))) == NULL) + if ((bridge = kmm_malloc(sizeof(*bridge))) == NULL) goto err0; bridge->b = b; diff --git a/arch/rgmp/src/nuttx.c b/arch/rgmp/src/nuttx.c index 234bb6dade..3f9323bb7f 100644 --- a/arch/rgmp/src/nuttx.c +++ b/arch/rgmp/src/nuttx.c @@ -130,7 +130,7 @@ int up_create_stack(struct tcb_s *tcb, size_t stack_size, uint8_t ttype) /* Use the kernel allocator if this is a kernel thread */ if (ttype == TCB_FLAG_TTYPE_KERNEL) { - stack_alloc_ptr = (uint32_t *)kmalloc(stack_size); + stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size); } else #endif { diff --git a/arch/rgmp/src/rgmp.c b/arch/rgmp/src/rgmp.c index abe6c48ae2..32289f55d3 100644 --- a/arch/rgmp/src/rgmp.c +++ b/arch/rgmp/src/rgmp.c @@ -80,7 +80,7 @@ void rtos_free_page(void *page) void *rtos_kmalloc(int size) { - return kmalloc(size); + return kmm_malloc(size); } void rtos_kfree(void *addr) @@ -130,7 +130,7 @@ void rtos_timer_isr(void *data) */ int rtos_sem_init(struct semaphore *sem, int val) { - if ((sem->sem = kmalloc(sizeof(sem_t))) == NULL) + if ((sem->sem = kmm_malloc(sizeof(sem_t))) == NULL) return -1; return sem_init(sem->sem, 0, val); } diff --git a/arch/sh/src/common/up_createstack.c b/arch/sh/src/common/up_createstack.c index 04a0a44ec4..a56824627c 100644 --- a/arch/sh/src/common/up_createstack.c +++ b/arch/sh/src/common/up_createstack.c @@ -129,7 +129,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) #if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK) tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size); #else - tcb->stack_alloc_ptr = (uint32_t *)kmalloc(stack_size); + tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size); #endif } else diff --git a/arch/x86/src/i486/up_createstack.c b/arch/x86/src/i486/up_createstack.c index 4c915e6182..0e70c905fb 100644 --- a/arch/x86/src/i486/up_createstack.c +++ b/arch/x86/src/i486/up_createstack.c @@ -131,7 +131,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) #if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK) tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size); #else - tcb->stack_alloc_ptr = (uint32_t *)kmalloc(stack_size); + tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size); #endif } else diff --git a/arch/z80/src/common/up_createstack.c b/arch/z80/src/common/up_createstack.c index 05d42b3259..8c43a50491 100644 --- a/arch/z80/src/common/up_createstack.c +++ b/arch/z80/src/common/up_createstack.c @@ -129,7 +129,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) #if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK) tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size); #else - tcb->stack_alloc_ptr = (uint32_t *)kmalloc(stack_size); + tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size); #endif } else diff --git a/arch/z80/src/ez80/ez80_i2c.c b/arch/z80/src/ez80/ez80_i2c.c index 329892d166..9432c6e423 100644 --- a/arch/z80/src/ez80/ez80_i2c.c +++ b/arch/z80/src/ez80/ez80_i2c.c @@ -920,7 +920,7 @@ FAR struct i2c_dev_s *up_i2cinitialize(int port) /* Now, allocate an I2C instance for this caller */ - i2c = (FAR struct ez80_i2cdev_s *)kmalloc(sizeof(FAR struct ez80_i2cdev_s)); + i2c = (FAR struct ez80_i2cdev_s *)kmm_malloc(sizeof(FAR struct ez80_i2cdev_s)); if (i2c) { /* Initialize the allocated instance */ diff --git a/arch/z80/src/z8/z8_i2c.c b/arch/z80/src/z8/z8_i2c.c index 6239ad25b1..5e39122534 100644 --- a/arch/z80/src/z8/z8_i2c.c +++ b/arch/z80/src/z8/z8_i2c.c @@ -593,7 +593,7 @@ FAR struct i2c_dev_s *up_i2cinitialize(int port) /* Now, allocate an I2C instance for this caller */ - i2c = (FAR struct z8_i2cdev_s *)kmalloc(sizeof(FAR struct z8_i2cdev_s)); + i2c = (FAR struct z8_i2cdev_s *)kmm_malloc(sizeof(FAR struct z8_i2cdev_s)); if (i2c) { /* Initialize the allocated instance */