Reanem kzalloc to kmm_zalloc for consistency

This commit is contained in:
Gregory Nutt
2014-08-31 17:34:44 -06:00
parent 10ca085b09
commit ec086adfae
12 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -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 (ttype == TCB_FLAG_TTYPE_KERNEL)
{ {
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK) #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 #else
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size); tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
#endif #endif
+1 -1
View File
@@ -3617,7 +3617,7 @@ static int lpc31_epalloc(FAR struct usbhost_driver_s *drvr,
/* Allocate a endpoint information structure */ /* 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) if (!epinfo)
{ {
usbhost_trace1(EHCI_TRACE1_EPALLOC_FAILED, 0); usbhost_trace1(EHCI_TRACE1_EPALLOC_FAILED, 0);
+1 -1
View File
@@ -3457,7 +3457,7 @@ static int sam_epalloc(FAR struct usbhost_driver_s *drvr,
/* Allocate a endpoint information structure */ /* 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) if (!epinfo)
{ {
usbhost_trace1(EHCI_TRACE1_EPALLOC_FAILED, 0); usbhost_trace1(EHCI_TRACE1_EPALLOC_FAILED, 0);
+1 -1
View File
@@ -2359,7 +2359,7 @@ static int sam_epalloc(FAR struct usbhost_driver_s *drvr,
/* Allocate a container for the endpoint data */ /* 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) if (!eplist)
{ {
usbhost_trace1(OHCI_TRACE1_EPLISTALLOC_FAILED, 0); usbhost_trace1(OHCI_TRACE1_EPLISTALLOC_FAILED, 0);
+2 -2
View File
@@ -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 */ /* 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) if (!priv)
{ {
fdbg("ERROR: Failed to allocate file attributes\n"); 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 */ /* 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) if (!newpriv)
{ {
fdbg("ERROR: Failed to allocate file attributes\n"); fdbg("ERROR: Failed to allocate file attributes\n");
+1 -1
View File
@@ -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 (ttype == TCB_FLAG_TTYPE_KERNEL)
{ {
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK) #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 #else
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size); tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
#endif #endif
+1 -1
View File
@@ -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 (ttype == TCB_FLAG_TTYPE_KERNEL)
{ {
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK) #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 #else
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size); tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
#endif #endif
+1 -1
View File
@@ -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 (ttype == TCB_FLAG_TTYPE_KERNEL)
{ {
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK) #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 #else
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size); tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
#endif #endif
+2 -2
View File
@@ -174,11 +174,11 @@ static uart_dev_t *up_alloc_com(unsigned int base, int irq)
uart_dev_t *dev; uart_dev_t *dev;
struct up_dev_s *priv; struct up_dev_s *priv;
priv = kzalloc(sizeof(struct up_dev_s)); priv = kmm_zalloc(sizeof(struct up_dev_s));
if (priv == NULL) if (priv == NULL)
goto err0; goto err0;
dev = kzalloc(sizeof(uart_dev_t)); dev = kmm_zalloc(sizeof(uart_dev_t));
if (dev == NULL) if (dev == NULL)
goto err1; goto err1;
+1 -1
View File
@@ -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 (ttype == TCB_FLAG_TTYPE_KERNEL)
{ {
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK) #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 #else
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size); tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
#endif #endif
+1 -1
View File
@@ -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 (ttype == TCB_FLAG_TTYPE_KERNEL)
{ {
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK) #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 #else
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size); tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
#endif #endif
+1 -1
View File
@@ -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 (ttype == TCB_FLAG_TTYPE_KERNEL)
{ {
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK) #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 #else
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size); tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
#endif #endif