Skip to content

Commit

Permalink
Rename kmalloc to kmm_malloc for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
gregory-nutt committed Aug 31, 2014
1 parent 9023221 commit 1780810
Show file tree
Hide file tree
Showing 111 changed files with 197 additions and 187 deletions.
2 changes: 1 addition & 1 deletion arch/arm/src/common/up_createstack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions arch/arm/src/dm320/dm320_framebuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -687,23 +687,23 @@ 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;
}
#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;
}
#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;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/dm320/dm320_usbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/lpc17xx/lpc17_usbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/lpc17xx/lpc17_usbhost.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
*
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/lpc214x/lpc214x_usbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/lpc31xx/lpc31_ehci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/lpc31xx/lpc31_usbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/src/lpc43xx/lpc43_spifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/lpc43xx/lpc43_usb0dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/src/sam34/sam_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/src/sama5/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/sama5/sam_ehci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/src/sama5/sam_ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/src/sama5/sam_udphs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/src/stm32/stm32_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/src/stm32/stm32_i2c_alt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/stm32/stm32_otgfsdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions arch/arm/src/stm32/stm32_otgfshost.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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.
*
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/src/stm32/stm32_usbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/src/stm32/stm32f30xxx_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions arch/avr/src/at90usb/at90usb_usbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/avr/src/avr32/up_createstack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/hc/src/common/up_createstack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/src/common/up_createstack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/src/pic32mx/pic32mx-usbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/rgmp/src/bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion arch/rgmp/src/nuttx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Loading

0 comments on commit 1780810

Please sign in to comment.