mirror of
https://github.com/apache/nuttx.git
synced 2026-05-24 16:11:56 +08:00
Rename kfree to kmm_free for consistency with other naming conventions
This commit is contained in:
@@ -410,7 +410,7 @@ FAR char *exepath_next(EXEPATH_HANDLE handle, FAR const char *relpath);
|
||||
</p>
|
||||
<p>
|
||||
NOTE: The string pointer return in the success case points to allocated memory.
|
||||
This memory must be freed by the called by calling <code>kfree()</code>.
|
||||
This memory must be freed by the called by calling <code>kmm_free()</code>.
|
||||
</p>
|
||||
<p>
|
||||
<code>NULL</code is returned if no path is found to any file with the provided <code>relpath</colde> from any absolute path in the <code>PATH</code> variable.
|
||||
|
||||
@@ -726,7 +726,7 @@ static void dm320_freevideomemory(void)
|
||||
#ifndef CONFIG_DM320_VID0_DISABLE
|
||||
if (g_vid0base)
|
||||
{
|
||||
kfree(g_vid0base);
|
||||
kmm_free(g_vid0base);
|
||||
g_vid0base = NULL;
|
||||
#ifndef CONFIG_DM320_DISABLE_PINGPONG
|
||||
g_vid0ppbase = NULL;
|
||||
@@ -737,7 +737,7 @@ static void dm320_freevideomemory(void)
|
||||
#ifndef CONFIG_DM320_VID1_DISABLE
|
||||
if (g_vid1base != 0)
|
||||
{
|
||||
kfree(g_vid1base);
|
||||
kmm_free(g_vid1base);
|
||||
g_vid1base = NULL;
|
||||
}
|
||||
#endif
|
||||
@@ -745,7 +745,7 @@ static void dm320_freevideomemory(void)
|
||||
#ifndef CONFIG_DM320_OSD0_DISABLE
|
||||
if (g_osd0base != 0)
|
||||
{
|
||||
kfree(g_osd0base);
|
||||
kmm_free(g_osd0base);
|
||||
g_osd0base = NULL;
|
||||
}
|
||||
#endif
|
||||
@@ -753,7 +753,7 @@ static void dm320_freevideomemory(void)
|
||||
#ifndef CONFIG_DM320_OSD1_DISABLE
|
||||
if (g_osd1base != 0)
|
||||
{
|
||||
kfree(g_osd1base);
|
||||
kmm_free(g_osd1base);
|
||||
g_osd1base = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1969,7 +1969,7 @@ static void dm320_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s
|
||||
#endif
|
||||
|
||||
usbtrace(TRACE_EPFREEREQ, ((FAR struct dm320_ep_s *)ep)->epphy);
|
||||
kfree(privreq);
|
||||
kmm_free(privreq);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -2009,7 +2009,7 @@ static void dm320_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
|
||||
#ifdef CONFIG_USBDEV_DMAMEMORY
|
||||
usbdev_dma_free(buf);
|
||||
#else
|
||||
kfree(buf);
|
||||
kmm_free(buf);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2691,7 +2691,7 @@ static void lpc17_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s
|
||||
#endif
|
||||
usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc17_ep_s *)ep)->epphy);
|
||||
|
||||
kfree(privreq);
|
||||
kmm_free(privreq);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -2768,7 +2768,7 @@ static void lpc17_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
|
||||
#else
|
||||
|
||||
usbtrace(TRACE_EPFREEBUFFER, privep->epphy);
|
||||
kfree(buf);
|
||||
kmm_free(buf);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -2003,7 +2003,7 @@ static int lpc17_alloc(FAR struct usbhost_driver_s *drvr,
|
||||
* Some hardware supports special memory in which request and descriptor data can
|
||||
* be accessed more efficiently. This method provides a mechanism to free that
|
||||
* request/descriptor memory. If the underlying hardware does not support
|
||||
* such "special" memory, this functions may simply map to kfree().
|
||||
* such "special" memory, this functions may simply map to kmm_free().
|
||||
*
|
||||
* Input Parameters:
|
||||
* drvr - The USB host driver instance obtained as a parameter from the call to
|
||||
@@ -2087,7 +2087,7 @@ static int lpc17_ioalloc(FAR struct usbhost_driver_s *drvr,
|
||||
* Some hardware supports special memory in which IO data can be accessed more
|
||||
* efficiently. This method provides a mechanism to free that IO buffer
|
||||
* memory. If the underlying hardware does not support such "special" memory,
|
||||
* this functions may simply map to kfree().
|
||||
* this functions may simply map to kmm_free().
|
||||
*
|
||||
* Input Parameters:
|
||||
* drvr - The USB host driver instance obtained as a parameter from the call to
|
||||
|
||||
@@ -2655,7 +2655,7 @@ static void lpc214x_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_
|
||||
#endif
|
||||
usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc214x_ep_s *)ep)->epphy);
|
||||
|
||||
kfree(privreq);
|
||||
kmm_free(privreq);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -2732,7 +2732,7 @@ static void lpc214x_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
|
||||
#else
|
||||
|
||||
usbtrace(TRACE_EPFREEBUFFER, privep->epphy);
|
||||
kfree(buf);
|
||||
kmm_free(buf);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -3679,7 +3679,7 @@ static int lpc31_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep)
|
||||
|
||||
/* Free the container */
|
||||
|
||||
kfree(epinfo);
|
||||
kmm_free(epinfo);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -3740,7 +3740,7 @@ static int lpc31_alloc(FAR struct usbhost_driver_s *drvr,
|
||||
* Some hardware supports special memory in which request and descriptor data
|
||||
* can be accessed more efficiently. This method provides a mechanism to
|
||||
* free that request/descriptor memory. If the underlying hardware does not
|
||||
* support such "special" memory, this functions may simply map to kfree().
|
||||
* support such "special" memory, this functions may simply map to kmm_free().
|
||||
*
|
||||
* Input Parameters:
|
||||
* drvr - The USB host driver instance obtained as a parameter from the call
|
||||
@@ -3762,7 +3762,7 @@ static int lpc31_free(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer)
|
||||
|
||||
/* No special action is require to free the transfer/descriptor buffer memory */
|
||||
|
||||
kfree(buffer);
|
||||
kmm_free(buffer);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -4279,7 +4279,7 @@ FAR struct usbhost_connection_s *lpc31_ehci_initialize(int controller)
|
||||
if (!g_qtdpool)
|
||||
{
|
||||
usbhost_trace1(EHCI_TRACE1_QTDPOOLALLOC_FAILED, 0);
|
||||
kfree(g_qhpool);
|
||||
kmm_free(g_qhpool);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
@@ -4292,8 +4292,8 @@ FAR struct usbhost_connection_s *lpc31_ehci_initialize(int controller)
|
||||
if (!g_framelist)
|
||||
{
|
||||
usbhost_trace1(EHCI_TRACE1_PERFLALLOC_FAILED, 0);
|
||||
kfree(g_qhpool);
|
||||
kfree(g_qtdpool);
|
||||
kmm_free(g_qhpool);
|
||||
kmm_free(g_qtdpool);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1982,7 +1982,7 @@ static void lpc31_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s
|
||||
#endif
|
||||
|
||||
usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc31_ep_s *)ep)->epphy);
|
||||
kfree(privreq);
|
||||
kmm_free(privreq);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -2022,7 +2022,7 @@ static void lpc31_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
|
||||
#ifdef CONFIG_USBDEV_DMAMEMORY
|
||||
usbdev_dma_free(buf);
|
||||
#else
|
||||
kfree(buf);
|
||||
kmm_free(buf);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1982,7 +1982,7 @@ static void lpc43_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s
|
||||
#endif
|
||||
|
||||
usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc43_ep_s *)ep)->epphy);
|
||||
kfree(privreq);
|
||||
kmm_free(privreq);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -2022,7 +2022,7 @@ static void lpc43_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
|
||||
#ifdef CONFIG_USBDEV_DMAMEMORY
|
||||
usbdev_dma_free(buf);
|
||||
#else
|
||||
kfree(buf);
|
||||
kmm_free(buf);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -657,25 +657,25 @@ static void sam_buffer_free(struct sam_emac_s *priv)
|
||||
|
||||
if (priv->txdesc)
|
||||
{
|
||||
kfree(priv->txdesc);
|
||||
kmm_free(priv->txdesc);
|
||||
priv->txdesc = NULL;
|
||||
}
|
||||
|
||||
if (priv->rxdesc)
|
||||
{
|
||||
kfree(priv->rxdesc);
|
||||
kmm_free(priv->rxdesc);
|
||||
priv->rxdesc = NULL;
|
||||
}
|
||||
|
||||
if (priv->txbuffer)
|
||||
{
|
||||
kfree(priv->txbuffer);
|
||||
kmm_free(priv->txbuffer);
|
||||
priv->txbuffer = NULL;
|
||||
}
|
||||
|
||||
if (priv->rxbuffer)
|
||||
{
|
||||
kfree(priv->rxbuffer);
|
||||
kmm_free(priv->rxbuffer);
|
||||
priv->rxbuffer = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3019,7 +3019,7 @@ static void sam_ep_freereq(struct usbdev_ep_s *ep, struct usbdev_req_s *req)
|
||||
#endif
|
||||
usbtrace(TRACE_EPFREEREQ, USB_EPNO(ep->eplog));
|
||||
|
||||
kfree(privreq);
|
||||
kmm_free(privreq);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -3519,7 +3519,7 @@ static int sam_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep)
|
||||
|
||||
/* Free the container */
|
||||
|
||||
kfree(epinfo);
|
||||
kmm_free(epinfo);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -3580,7 +3580,7 @@ static int sam_alloc(FAR struct usbhost_driver_s *drvr,
|
||||
* Some hardware supports special memory in which request and descriptor data
|
||||
* can be accessed more efficiently. This method provides a mechanism to
|
||||
* free that request/descriptor memory. If the underlying hardware does not
|
||||
* support such "special" memory, this functions may simply map to kfree().
|
||||
* support such "special" memory, this functions may simply map to kmm_free().
|
||||
*
|
||||
* Input Parameters:
|
||||
* drvr - The USB host driver instance obtained as a parameter from the call
|
||||
@@ -3602,7 +3602,7 @@ static int sam_free(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer)
|
||||
|
||||
/* No special action is require to free the transfer/descriptor buffer memory */
|
||||
|
||||
kfree(buffer);
|
||||
kmm_free(buffer);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -4177,7 +4177,7 @@ FAR struct usbhost_connection_s *sam_ehci_initialize(int controller)
|
||||
if (!g_qtdpool)
|
||||
{
|
||||
usbhost_trace1(EHCI_TRACE1_QTDPOOLALLOC_FAILED, 0);
|
||||
kfree(g_qhpool);
|
||||
kmm_free(g_qhpool);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
@@ -4190,8 +4190,8 @@ FAR struct usbhost_connection_s *sam_ehci_initialize(int controller)
|
||||
if (!g_framelist)
|
||||
{
|
||||
usbhost_trace1(EHCI_TRACE1_PERFLALLOC_FAILED, 0);
|
||||
kfree(g_qhpool);
|
||||
kfree(g_qtdpool);
|
||||
kmm_free(g_qhpool);
|
||||
kmm_free(g_qtdpool);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -662,25 +662,25 @@ static void sam_buffer_free(struct sam_emac_s *priv)
|
||||
|
||||
if (priv->txdesc)
|
||||
{
|
||||
kfree(priv->txdesc);
|
||||
kmm_free(priv->txdesc);
|
||||
priv->txdesc = NULL;
|
||||
}
|
||||
|
||||
if (priv->rxdesc)
|
||||
{
|
||||
kfree(priv->rxdesc);
|
||||
kmm_free(priv->rxdesc);
|
||||
priv->rxdesc = NULL;
|
||||
}
|
||||
|
||||
if (priv->txbuffer)
|
||||
{
|
||||
kfree(priv->txbuffer);
|
||||
kmm_free(priv->txbuffer);
|
||||
priv->txbuffer = NULL;
|
||||
}
|
||||
|
||||
if (priv->rxbuffer)
|
||||
{
|
||||
kfree(priv->rxbuffer);
|
||||
kmm_free(priv->rxbuffer);
|
||||
priv->rxbuffer = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -989,25 +989,25 @@ static void sam_buffer_free(struct sam_emac_s *priv)
|
||||
|
||||
if (priv->txdesc)
|
||||
{
|
||||
kfree(priv->txdesc);
|
||||
kmm_free(priv->txdesc);
|
||||
priv->txdesc = NULL;
|
||||
}
|
||||
|
||||
if (priv->rxdesc)
|
||||
{
|
||||
kfree(priv->rxdesc);
|
||||
kmm_free(priv->rxdesc);
|
||||
priv->rxdesc = NULL;
|
||||
}
|
||||
|
||||
if (priv->txbuffer)
|
||||
{
|
||||
kfree(priv->txbuffer);
|
||||
kmm_free(priv->txbuffer);
|
||||
priv->txbuffer = NULL;
|
||||
}
|
||||
|
||||
if (priv->rxbuffer)
|
||||
{
|
||||
kfree(priv->rxbuffer);
|
||||
kmm_free(priv->rxbuffer);
|
||||
priv->rxbuffer = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -593,25 +593,25 @@ static void sam_buffer_free(struct sam_gmac_s *priv)
|
||||
|
||||
if (priv->txdesc)
|
||||
{
|
||||
kfree(priv->txdesc);
|
||||
kmm_free(priv->txdesc);
|
||||
priv->txdesc = NULL;
|
||||
}
|
||||
|
||||
if (priv->rxdesc)
|
||||
{
|
||||
kfree(priv->rxdesc);
|
||||
kmm_free(priv->rxdesc);
|
||||
priv->rxdesc = NULL;
|
||||
}
|
||||
|
||||
if (priv->txbuffer)
|
||||
{
|
||||
kfree(priv->txbuffer);
|
||||
kmm_free(priv->txbuffer);
|
||||
priv->txbuffer = NULL;
|
||||
}
|
||||
|
||||
if (priv->rxbuffer)
|
||||
{
|
||||
kfree(priv->rxbuffer);
|
||||
kmm_free(priv->rxbuffer);
|
||||
priv->rxbuffer = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2500,7 +2500,7 @@ errout_with_ed:
|
||||
sam_edfree(ed);
|
||||
errout_with_semaphore:
|
||||
sam_givesem(&g_ohci.exclsem);
|
||||
kfree(eplist);
|
||||
kmm_free(eplist);
|
||||
errout:
|
||||
return ret;
|
||||
}
|
||||
@@ -2577,7 +2577,7 @@ static int sam_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep)
|
||||
/* And free the container */
|
||||
|
||||
sem_destroy(&eplist->wdhsem);
|
||||
kfree(eplist);
|
||||
kmm_free(eplist);
|
||||
sam_givesem(&g_ohci.exclsem);
|
||||
return ret;
|
||||
}
|
||||
@@ -2642,7 +2642,7 @@ static int sam_alloc(FAR struct usbhost_driver_s *drvr,
|
||||
* Some hardware supports special memory in which request and descriptor data
|
||||
* can be accessed more efficiently. This method provides a mechanism to
|
||||
* free that request/descriptor memory. If the underlying hardware does not
|
||||
* support such "special" memory, this functions may simply map to kfree().
|
||||
* support such "special" memory, this functions may simply map to kmm_free().
|
||||
*
|
||||
* Input Parameters:
|
||||
* drvr - The USB host driver instance obtained as a parameter from the call
|
||||
|
||||
@@ -3524,7 +3524,7 @@ errout_with_clocking:
|
||||
|
||||
errout_with_alloc:
|
||||
sem_destroy(&priv->exclsem);
|
||||
kfree(priv);
|
||||
kmm_free(priv);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -3508,7 +3508,7 @@ static void sam_ep_freereq(struct usbdev_ep_s *ep, struct usbdev_req_s *req)
|
||||
#endif
|
||||
usbtrace(TRACE_EPFREEREQ, USB_EPNO(ep->eplog));
|
||||
|
||||
kfree(privreq);
|
||||
kmm_free(privreq);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -1977,7 +1977,7 @@ int up_i2cuninitialize(FAR struct i2c_dev_s * dev)
|
||||
if (--((struct stm32_i2c_inst_s *)dev)->priv->refs)
|
||||
{
|
||||
irqrestore(irqs);
|
||||
kfree(dev);
|
||||
kmm_free(dev);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -1991,7 +1991,7 @@ int up_i2cuninitialize(FAR struct i2c_dev_s * dev)
|
||||
|
||||
stm32_i2c_sem_destroy((struct i2c_dev_s *)dev);
|
||||
|
||||
kfree(dev);
|
||||
kmm_free(dev);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -2505,7 +2505,7 @@ int up_i2cuninitialize(FAR struct i2c_dev_s * dev)
|
||||
if (--((struct stm32_i2c_inst_s *)dev)->priv->refs)
|
||||
{
|
||||
irqrestore(irqs);
|
||||
kfree(dev);
|
||||
kmm_free(dev);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -2519,7 +2519,7 @@ int up_i2cuninitialize(FAR struct i2c_dev_s * dev)
|
||||
|
||||
stm32_i2c_sem_destroy((struct i2c_dev_s *)dev);
|
||||
|
||||
kfree(dev);
|
||||
kmm_free(dev);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -4269,7 +4269,7 @@ static void stm32_ep_freereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s
|
||||
#endif
|
||||
|
||||
usbtrace(TRACE_EPFREEREQ, ((FAR struct stm32_ep_s *)ep)->epphy);
|
||||
kfree(privreq);
|
||||
kmm_free(privreq);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -4309,7 +4309,7 @@ static void stm32_ep_freebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
|
||||
#ifdef CONFIG_USBDEV_DMAMEMORY
|
||||
usbdev_dma_free(buf);
|
||||
#else
|
||||
kfree(buf);
|
||||
kmm_free(buf);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3534,7 +3534,7 @@ static int stm32_alloc(FAR struct usbhost_driver_s *drvr,
|
||||
* Some hardware supports special memory in which request and descriptor data can
|
||||
* be accessed more efficiently. This method provides a mechanism to free that
|
||||
* request/descriptor memory. If the underlying hardware does not support
|
||||
* such "special" memory, this functions may simply map to kfree().
|
||||
* such "special" memory, this functions may simply map to kmm_free().
|
||||
*
|
||||
* Input Parameters:
|
||||
* drvr - The USB host driver instance obtained as a parameter from the call to
|
||||
@@ -3555,7 +3555,7 @@ static int stm32_free(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer)
|
||||
/* There is no special memory requirement */
|
||||
|
||||
DEBUGASSERT(drvr && buffer);
|
||||
kfree(buffer);
|
||||
kmm_free(buffer);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -3614,7 +3614,7 @@ static int stm32_ioalloc(FAR struct usbhost_driver_s *drvr,
|
||||
* Some hardware supports special memory in which IO data can be accessed more
|
||||
* efficiently. This method provides a mechanism to free that IO buffer
|
||||
* memory. If the underlying hardware does not support such "special" memory,
|
||||
* this functions may simply map to kfree().
|
||||
* this functions may simply map to kmm_free().
|
||||
*
|
||||
* Input Parameters:
|
||||
* drvr - The USB host driver instance obtained as a parameter from the call to
|
||||
@@ -3635,7 +3635,7 @@ static int stm32_iofree(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer)
|
||||
/* There is no special memory requirement */
|
||||
|
||||
DEBUGASSERT(drvr && buffer);
|
||||
kfree(buffer);
|
||||
kmm_free(buffer);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ static int ccm_close(FAR struct file *filep)
|
||||
|
||||
/* Release the file attributes structure */
|
||||
|
||||
kfree(priv);
|
||||
kmm_free(priv);
|
||||
filep->f_priv = NULL;
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -3005,7 +3005,7 @@ static void stm32_epfreereq(struct usbdev_ep_s *ep, struct usbdev_req_s *req)
|
||||
#endif
|
||||
usbtrace(TRACE_EPFREEREQ, USB_EPNO(ep->eplog));
|
||||
|
||||
kfree(privreq);
|
||||
kmm_free(privreq);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -2068,7 +2068,7 @@ int up_i2cuninitialize(FAR struct i2c_dev_s * dev)
|
||||
if (--((struct stm32_i2c_inst_s *)dev)->priv->refs)
|
||||
{
|
||||
irqrestore(irqs);
|
||||
kfree(dev);
|
||||
kmm_free(dev);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -2082,7 +2082,7 @@ int up_i2cuninitialize(FAR struct i2c_dev_s * dev)
|
||||
|
||||
stm32_i2c_sem_destroy( (struct i2c_dev_s *)dev );
|
||||
|
||||
kfree(dev);
|
||||
kmm_free(dev);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -2320,7 +2320,7 @@ static void avr_epfreereq(FAR struct usbdev_ep_s *ep,
|
||||
#endif
|
||||
|
||||
usbtrace(TRACE_EPFREEREQ, ((FAR struct avr_ep_s *)ep)->ep.eplog);
|
||||
kfree(privreq);
|
||||
kmm_free(privreq);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -2360,7 +2360,7 @@ static void avr_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf)
|
||||
#ifdef CONFIG_USBDEV_DMAMEMORY
|
||||
usbdev_dma_free(buf);
|
||||
#else
|
||||
kfree(buf);
|
||||
kmm_free(buf);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3352,7 +3352,7 @@ static void pic32mx_epfreereq(struct usbdev_ep_s *ep, struct usbdev_req_s *req)
|
||||
#endif
|
||||
usbtrace(TRACE_EPFREEREQ, USB_EPNO(ep->eplog));
|
||||
|
||||
kfree(privreq);
|
||||
kmm_free(privreq);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -125,7 +125,7 @@ int rtos_bridge_init(struct rgmp_bridge *b)
|
||||
return 0;
|
||||
|
||||
err1:
|
||||
kfree(bridge);
|
||||
kmm_free(bridge);
|
||||
err0:
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ void up_release_stack(struct tcb_s *dtcb, uint8_t ttype)
|
||||
/* Use the kernel allocator if this is a kernel thread */
|
||||
|
||||
if (ttype == TCB_FLAG_TTYPE_KERNEL) {
|
||||
kfree(dtcb->stack_alloc_ptr);
|
||||
kmm_free(dtcb->stack_alloc_ptr);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
|
||||
@@ -85,7 +85,7 @@ void *rtos_kmalloc(int size)
|
||||
|
||||
void rtos_kfree(void *addr)
|
||||
{
|
||||
kfree(addr);
|
||||
kmm_free(addr);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -202,7 +202,7 @@ static uart_dev_t *up_alloc_com(unsigned int base, int irq)
|
||||
return dev;
|
||||
|
||||
err1:
|
||||
kfree(priv);
|
||||
kmm_free(priv);
|
||||
err0:
|
||||
return NULL;
|
||||
}
|
||||
@@ -213,8 +213,8 @@ static uart_dev_t *up_alloc_com(unsigned int base, int irq)
|
||||
|
||||
static inline void up_free_com(uart_dev_t *com)
|
||||
{
|
||||
kfree(com->priv);
|
||||
kfree(com);
|
||||
kmm_free(com->priv);
|
||||
kmm_free(com);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
|
||||
#ifdef VFAT_STANDALONE
|
||||
# define sdbg(format, ...) printf(format, ##__VA_ARGS__)
|
||||
# define kmalloc(size) malloc(size)
|
||||
# define kfree(mem) free(mem)
|
||||
# define kmm_malloc(size) malloc(size)
|
||||
# define kmm_free(mem) free(mem)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@@ -231,7 +231,7 @@ char *up_deviceimage(void)
|
||||
* to reallocate this a few times to get the size right.
|
||||
*/
|
||||
|
||||
pbuffer = (char*)kmalloc(bufsize);
|
||||
pbuffer = (char*)kmm_malloc(bufsize);
|
||||
|
||||
/* Set up the input buffer */
|
||||
|
||||
@@ -260,7 +260,7 @@ char *up_deviceimage(void)
|
||||
case Z_STREAM_ERROR:
|
||||
sdbg("inflate FAILED: ret=%d msg=\"%s\"\n", ret, strm.msg ? strm.msg : "No message" );
|
||||
(void)inflateEnd(&strm);
|
||||
kfree(pbuffer);
|
||||
kmm_free(pbuffer);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ char *up_deviceimage(void)
|
||||
char *newbuffer = kmm_realloc(pbuffer, newbufsize);
|
||||
if (!newbuffer)
|
||||
{
|
||||
kfree(pbuffer);
|
||||
kmm_free(pbuffer);
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
@@ -295,7 +295,7 @@ char *up_deviceimage(void)
|
||||
char *newbuffer = kmm_realloc(pbuffer, newbufsize);
|
||||
if (!newbuffer)
|
||||
{
|
||||
kfree(pbuffer);
|
||||
kmm_free(pbuffer);
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
@@ -351,7 +351,7 @@ int main(int argc, char **argv, char **envp)
|
||||
if (deviceimage)
|
||||
{
|
||||
printf("Inflate SUCCEEDED\n");
|
||||
kfree(deviceimage);
|
||||
kmm_free(deviceimage);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -124,7 +124,7 @@ int exec(FAR const char *filename, FAR char * const *argv,
|
||||
if (ret < 0)
|
||||
{
|
||||
bdbg("ERROR: Failed to load program '%s'\n", filename);
|
||||
kfree(bin);
|
||||
kmm_free(bin);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ int exec(FAR const char *filename, FAR char * const *argv,
|
||||
bdbg("ERROR: Failed to execute program '%s'\n", filename);
|
||||
sched_unlock();
|
||||
unload_module(bin);
|
||||
kfree(bin);
|
||||
kmm_free(bin);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@ errout_with_stack:
|
||||
goto errout;
|
||||
|
||||
errout_with_tcb:
|
||||
kfree(tcb);
|
||||
kmm_free(tcb);
|
||||
errout:
|
||||
set_errno(err);
|
||||
bdbg("returning errno: %d\n", err);
|
||||
|
||||
@@ -161,7 +161,7 @@ EXEPATH_HANDLE exepath_init(void)
|
||||
* is marked executable).
|
||||
*
|
||||
* NOTE: The string pointer return in the success case points to allocated
|
||||
* memory. This memory must be freed by the called by calling kfree().
|
||||
* memory. This memory must be freed by the called by calling kmm_free().
|
||||
*
|
||||
* NULL is returned if no path is found to any file with the provided
|
||||
* 'relpath' from any absolute path in the PATH variable. In this case,
|
||||
@@ -254,7 +254,7 @@ FAR char *exepath_next(EXEPATH_HANDLE handle, FAR const char *relpath)
|
||||
* continue to try the next path.
|
||||
*/
|
||||
|
||||
kfree(fullpath);
|
||||
kmm_free(fullpath);
|
||||
}
|
||||
|
||||
/* We will not get here */
|
||||
@@ -279,7 +279,7 @@ FAR char *exepath_next(EXEPATH_HANDLE handle, FAR const char *relpath)
|
||||
|
||||
void exepath_release(EXEPATH_HANDLE handle)
|
||||
{
|
||||
kfree(handle);
|
||||
kmm_free(handle);
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_BINFMT_DISABLE && CONFIG_BINFMT_EXEPATH */
|
||||
|
||||
@@ -226,7 +226,7 @@ int load_module(FAR struct binary_s *bin)
|
||||
|
||||
/* Free the allocated fullpath */
|
||||
|
||||
kfree(fullpath);
|
||||
kmm_free(fullpath);
|
||||
|
||||
/* Break out of the loop with ret == OK on success */
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ static FAR struct binary_s *unload_list_remove(pid_t pid)
|
||||
* If CONFIG_SCHED_HAVE_PARENT is defined, this function may be called to
|
||||
* automatically unload the module when task exits. It assumes that
|
||||
* bin was allocated with kmalloc() or friends and will also automatically
|
||||
* free the structure with kfree() when the task exists.
|
||||
* free the structure with kmm_free() when the task exists.
|
||||
*
|
||||
* Input Parameter:
|
||||
* pid - The ID of the task that just exited
|
||||
@@ -231,7 +231,7 @@ static void unload_callback(int signo, siginfo_t *info, void *ucontext)
|
||||
|
||||
/* Free the load structure */
|
||||
|
||||
kfree(bin);
|
||||
kmm_free(bin);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@@ -246,7 +246,7 @@ static void unload_callback(int signo, siginfo_t *info, void *ucontext)
|
||||
* the parent of the newly created task to automatically unload the
|
||||
* module when the task exits. This assumes that (1) the caller is the
|
||||
* parent of the created task, (2) that bin was allocated with kmalloc()
|
||||
* or friends. It will also automatically free the structure with kfree()
|
||||
* or friends. It will also automatically free the structure with kmm_free()
|
||||
* after unloading the module.
|
||||
*
|
||||
* Input Parameter:
|
||||
|
||||
@@ -111,13 +111,13 @@ int elf_freebuffers(struct elf_loadinfo_s *loadinfo)
|
||||
|
||||
if (loadinfo->shdr)
|
||||
{
|
||||
kfree((FAR void *)loadinfo->shdr);
|
||||
kmm_free((FAR void *)loadinfo->shdr);
|
||||
loadinfo->shdr = NULL;
|
||||
}
|
||||
|
||||
if (loadinfo->iobuffer)
|
||||
{
|
||||
kfree((FAR void *)loadinfo->iobuffer);
|
||||
kmm_free((FAR void *)loadinfo->iobuffer);
|
||||
loadinfo->iobuffer = NULL;
|
||||
loadinfo->buflen = 0;
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ errout_with_addrenv:
|
||||
loadinfo->addrenv = 0;
|
||||
|
||||
errout_with_dspace:
|
||||
kfree(dspace);
|
||||
kmm_free(dspace);
|
||||
return ret;
|
||||
#else
|
||||
/* Allocate (and zero) memory to hold the ELF image */
|
||||
@@ -165,7 +165,7 @@ errout_with_dspace:
|
||||
dspace->region = (FAR uint8_t *)kumm_zalloc(envsize);
|
||||
if (!dspace->region)
|
||||
{
|
||||
kfree(dspace);
|
||||
kmm_free(dspace);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ void nxflat_addrenv_free(FAR struct nxflat_loadinfo_s *loadinfo)
|
||||
/* Now destroy the D-Space container */
|
||||
|
||||
DEBUGASSERT(dspace->crefs == 1);
|
||||
kfree(dspace);
|
||||
kmm_free(dspace);
|
||||
loadinfo->dspace = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -267,7 +267,7 @@ static int pcode_proxy(int argc, char **argv)
|
||||
if (ret < 0)
|
||||
{
|
||||
bdbg("ERROR: on_exit failed: %d\n", get_errno());
|
||||
kfree(fullpath);
|
||||
kmm_free(fullpath);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ static int pcode_proxy(int argc, char **argv)
|
||||
|
||||
/* We no longer need the fullpath */
|
||||
|
||||
kfree(fullpath);
|
||||
kmm_free(fullpath);
|
||||
|
||||
/* Check the result of the interpretation */
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ int usbmsc_archinitialize(void)
|
||||
{
|
||||
printf("create_ramdisk: Failed to register ramdisk at %s: %d\n",
|
||||
g_source, -ret);
|
||||
kfree(pbuffer);
|
||||
kmm_free(pbuffer);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ int usbmsc_archinitialize(void)
|
||||
{
|
||||
printf("create_ramdisk: Failed to create FAT filesystem on ramdisk at %s\n",
|
||||
g_source);
|
||||
/* kfree(pbuffer); -- RAM disk is registered */
|
||||
/* kmm_free(pbuffer); -- RAM disk is registered */
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ int usbmsc_archinitialize(void)
|
||||
{
|
||||
printf("create_ramdisk: Failed to register ramdisk at %s: %d\n",
|
||||
g_source, -ret);
|
||||
kfree(pbuffer);
|
||||
kmm_free(pbuffer);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ int usbmsc_archinitialize(void)
|
||||
{
|
||||
printf("create_ramdisk: Failed to create FAT filesystem on ramdisk at %s\n",
|
||||
g_source);
|
||||
/* kfree(pbuffer); -- RAM disk is registered */
|
||||
/* kmm_free(pbuffer); -- RAM disk is registered */
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -1578,7 +1578,7 @@ int arch_tcinitialize(int minor)
|
||||
errout_with_priv:
|
||||
sem_destroy(&priv->devsem);
|
||||
#ifdef CONFIG_TOUCHSCREEN_MULTIPLE
|
||||
kfree(priv);
|
||||
kmm_free(priv);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1431,7 +1431,7 @@ int arch_tcinitialize(int minor)
|
||||
errout_with_priv:
|
||||
sem_destroy(&priv->devsem);
|
||||
#ifdef CONFIG_TOUCHSCREEN_MULTIPLE
|
||||
kfree(priv);
|
||||
kmm_free(priv);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ static int do_test_aes(FAR struct cipher_testvec* test, int mode, int encrypt)
|
||||
res = memcmp(out, test->result, test->rlen);
|
||||
}
|
||||
|
||||
kfree(out);
|
||||
kmm_free(out);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@@ -431,7 +431,7 @@ int i2schar_register(FAR struct i2s_dev_s *i2s, int minor)
|
||||
* device.
|
||||
*/
|
||||
|
||||
kfree(priv);
|
||||
kmm_free(priv);
|
||||
}
|
||||
|
||||
/* Return the result of the registration */
|
||||
|
||||
@@ -1890,7 +1890,7 @@ struct audio_lowerhalf_s *vs1053_initialize(FAR struct spi_dev_s *spi,
|
||||
if (id != VS1053_VER_VS1053)
|
||||
{
|
||||
auddbg("Unexpected VER bits: 0x%0X\n", id);
|
||||
kfree(dev);
|
||||
kmm_free(dev);
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -2518,6 +2518,6 @@ FAR struct audio_lowerhalf_s *
|
||||
|
||||
errout_with_dev:
|
||||
sem_destroy(&priv->pendsem);
|
||||
kfree(priv);
|
||||
kmm_free(priv);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -154,6 +154,6 @@ int bchlib_setup(const char *blkdev, bool readonly, FAR void **handle)
|
||||
return OK;
|
||||
|
||||
errout_with_bch:
|
||||
kfree(bch);
|
||||
kmm_free(bch);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -103,11 +103,11 @@ int bchlib_teardown(FAR void *handle)
|
||||
|
||||
if (bch->buffer)
|
||||
{
|
||||
kfree(bch->buffer);
|
||||
kmm_free(bch->buffer);
|
||||
}
|
||||
|
||||
sem_destroy(&bch->sem);
|
||||
kfree(bch);
|
||||
kmm_free(bch);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user