mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Reanem kzalloc to kmm_zalloc for consistency
This commit is contained in:
@@ -163,7 +163,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
if (ttype == TCB_FLAG_TTYPE_KERNEL)
|
||||
{
|
||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_zalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||
#endif
|
||||
|
||||
@@ -3617,7 +3617,7 @@ static int lpc31_epalloc(FAR struct usbhost_driver_s *drvr,
|
||||
|
||||
/* Allocate a endpoint information structure */
|
||||
|
||||
epinfo = (struct lpc31_epinfo_s *)kzalloc(sizeof(struct lpc31_epinfo_s));
|
||||
epinfo = (struct lpc31_epinfo_s *)kmm_zalloc(sizeof(struct lpc31_epinfo_s));
|
||||
if (!epinfo)
|
||||
{
|
||||
usbhost_trace1(EHCI_TRACE1_EPALLOC_FAILED, 0);
|
||||
|
||||
@@ -3457,7 +3457,7 @@ static int sam_epalloc(FAR struct usbhost_driver_s *drvr,
|
||||
|
||||
/* Allocate a endpoint information structure */
|
||||
|
||||
epinfo = (struct sam_epinfo_s *)kzalloc(sizeof(struct sam_epinfo_s));
|
||||
epinfo = (struct sam_epinfo_s *)kmm_zalloc(sizeof(struct sam_epinfo_s));
|
||||
if (!epinfo)
|
||||
{
|
||||
usbhost_trace1(EHCI_TRACE1_EPALLOC_FAILED, 0);
|
||||
|
||||
@@ -2359,7 +2359,7 @@ static int sam_epalloc(FAR struct usbhost_driver_s *drvr,
|
||||
|
||||
/* Allocate a container for the endpoint data */
|
||||
|
||||
eplist = (struct sam_eplist_s *)kzalloc(sizeof(struct sam_eplist_s));
|
||||
eplist = (struct sam_eplist_s *)kmm_zalloc(sizeof(struct sam_eplist_s));
|
||||
if (!eplist)
|
||||
{
|
||||
usbhost_trace1(OHCI_TRACE1_EPLISTALLOC_FAILED, 0);
|
||||
|
||||
@@ -165,7 +165,7 @@ static int ccm_open(FAR struct file *filep, FAR const char *relpath,
|
||||
|
||||
/* Allocate a container to hold the task and attribute selection */
|
||||
|
||||
priv = (FAR struct ccm_file_s *)kzalloc(sizeof(struct ccm_file_s));
|
||||
priv = (FAR struct ccm_file_s *)kmm_zalloc(sizeof(struct ccm_file_s));
|
||||
if (!priv)
|
||||
{
|
||||
fdbg("ERROR: Failed to allocate file attributes\n");
|
||||
@@ -282,7 +282,7 @@ static int ccm_dup(FAR const struct file *oldp, FAR struct file *newp)
|
||||
|
||||
/* Allocate a new container to hold the task and attribute selection */
|
||||
|
||||
newpriv = (FAR struct ccm_file_s *)kzalloc(sizeof(struct ccm_file_s));
|
||||
newpriv = (FAR struct ccm_file_s *)kmm_zalloc(sizeof(struct ccm_file_s));
|
||||
if (!newpriv)
|
||||
{
|
||||
fdbg("ERROR: Failed to allocate file attributes\n");
|
||||
|
||||
@@ -130,7 +130,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
if (ttype == TCB_FLAG_TTYPE_KERNEL)
|
||||
{
|
||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_zalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||
#endif
|
||||
|
||||
@@ -127,7 +127,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
if (ttype == TCB_FLAG_TTYPE_KERNEL)
|
||||
{
|
||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_zalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||
#endif
|
||||
|
||||
@@ -148,7 +148,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
if (ttype == TCB_FLAG_TTYPE_KERNEL)
|
||||
{
|
||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_zalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||
#endif
|
||||
|
||||
@@ -174,11 +174,11 @@ static uart_dev_t *up_alloc_com(unsigned int base, int irq)
|
||||
uart_dev_t *dev;
|
||||
struct up_dev_s *priv;
|
||||
|
||||
priv = kzalloc(sizeof(struct up_dev_s));
|
||||
priv = kmm_zalloc(sizeof(struct up_dev_s));
|
||||
if (priv == NULL)
|
||||
goto err0;
|
||||
|
||||
dev = kzalloc(sizeof(uart_dev_t));
|
||||
dev = kmm_zalloc(sizeof(uart_dev_t));
|
||||
if (dev == NULL)
|
||||
goto err1;
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
if (ttype == TCB_FLAG_TTYPE_KERNEL)
|
||||
{
|
||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_zalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||
#endif
|
||||
|
||||
@@ -129,7 +129,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
if (ttype == TCB_FLAG_TTYPE_KERNEL)
|
||||
{
|
||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_zalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||
#endif
|
||||
|
||||
@@ -127,7 +127,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
if (ttype == TCB_FLAG_TTYPE_KERNEL)
|
||||
{
|
||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size);
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_zalloc(stack_size);
|
||||
#else
|
||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user