mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
Rename kmalloc to kmm_malloc for consistency
This commit is contained in:
@@ -968,9 +968,9 @@ static int cdcacm_bind(FAR struct usbdevclass_driver_s *driver,
|
||||
|
||||
/* Pre-allocate all endpoints... the endpoints will not be functional
|
||||
* until the SET CONFIGURATION request is processed in cdcacm_setconfig.
|
||||
* This is done here because there may be calls to kmalloc and the SET
|
||||
* This is done here because there may be calls to kmm_malloc and the SET
|
||||
* CONFIGURATION processing probably occurrs within interrupt handling
|
||||
* logic where kmalloc calls will fail.
|
||||
* logic where kmm_malloc calls will fail.
|
||||
*/
|
||||
|
||||
/* Pre-allocate the IN interrupt endpoint */
|
||||
@@ -2231,7 +2231,7 @@ int cdcacm_classobject(int minor, FAR struct usbdevclass_driver_s **classdev)
|
||||
|
||||
/* Allocate the structures needed */
|
||||
|
||||
alloc = (FAR struct cdcacm_alloc_s*)kmalloc(sizeof(struct cdcacm_alloc_s));
|
||||
alloc = (FAR struct cdcacm_alloc_s*)kmm_malloc(sizeof(struct cdcacm_alloc_s));
|
||||
if (!alloc)
|
||||
{
|
||||
usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_ALLOCDEVSTRUCT), 0);
|
||||
|
||||
@@ -797,7 +797,7 @@ FAR void *composite_initialize(void)
|
||||
|
||||
/* Allocate the structures needed */
|
||||
|
||||
alloc = (FAR struct composite_alloc_s*)kmalloc(sizeof(struct composite_alloc_s));
|
||||
alloc = (FAR struct composite_alloc_s*)kmm_malloc(sizeof(struct composite_alloc_s));
|
||||
if (!alloc)
|
||||
{
|
||||
usbtrace(TRACE_CLSERROR(USBCOMPOSITE_TRACEERR_ALLOCDEVSTRUCT), 0);
|
||||
|
||||
@@ -1348,9 +1348,9 @@ static int usbclass_bind(FAR struct usbdevclass_driver_s *driver,
|
||||
|
||||
/* Pre-allocate all endpoints... the endpoints will not be functional
|
||||
* until the SET CONFIGURATION request is processed in usbclass_setconfig.
|
||||
* This is done here because there may be calls to kmalloc and the SET
|
||||
* This is done here because there may be calls to kmm_malloc and the SET
|
||||
* CONFIGURATION processing probably occurrs within interrupt handling
|
||||
* logic where kmalloc calls will fail.
|
||||
* logic where kmm_malloc calls will fail.
|
||||
*/
|
||||
|
||||
/* Pre-allocate the IN interrupt endpoint */
|
||||
@@ -2284,7 +2284,7 @@ int usbdev_serialinitialize(int minor)
|
||||
|
||||
/* Allocate the structures needed */
|
||||
|
||||
alloc = (FAR struct pl2303_alloc_s*)kmalloc(sizeof(struct pl2303_alloc_s));
|
||||
alloc = (FAR struct pl2303_alloc_s*)kmm_malloc(sizeof(struct pl2303_alloc_s));
|
||||
if (!alloc)
|
||||
{
|
||||
usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_ALLOCDEVSTRUCT), 0);
|
||||
|
||||
@@ -298,9 +298,9 @@ static int usbmsc_bind(FAR struct usbdevclass_driver_s *driver,
|
||||
|
||||
/* Pre-allocate all endpoints... the endpoints will not be functional
|
||||
* until the SET CONFIGURATION request is processed in usbmsc_setconfig.
|
||||
* This is done here because there may be calls to kmalloc and the SET
|
||||
* This is done here because there may be calls to kmm_malloc and the SET
|
||||
* CONFIGURATION processing probably occurrs within interrupt handling
|
||||
* logic where kmalloc calls will fail.
|
||||
* logic where kmm_malloc calls will fail.
|
||||
*/
|
||||
|
||||
/* Pre-allocate the IN bulk endpoint */
|
||||
@@ -1326,7 +1326,7 @@ int usbmsc_configure(unsigned int nluns, void **handle)
|
||||
|
||||
/* Allocate the structures needed */
|
||||
|
||||
alloc = (FAR struct usbmsc_alloc_s*)kmalloc(sizeof(struct usbmsc_alloc_s));
|
||||
alloc = (FAR struct usbmsc_alloc_s*)kmm_malloc(sizeof(struct usbmsc_alloc_s));
|
||||
if (!alloc)
|
||||
{
|
||||
usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_ALLOCDEVSTRUCT), 0);
|
||||
@@ -1347,7 +1347,7 @@ int usbmsc_configure(unsigned int nluns, void **handle)
|
||||
|
||||
/* Allocate the LUN table */
|
||||
|
||||
priv->luntab = (struct usbmsc_lun_s*)kmalloc(priv->nluns*sizeof(struct usbmsc_lun_s));
|
||||
priv->luntab = (struct usbmsc_lun_s*)kmm_malloc(priv->nluns*sizeof(struct usbmsc_lun_s));
|
||||
if (!priv->luntab)
|
||||
{
|
||||
ret = -ENOMEM;
|
||||
@@ -1489,7 +1489,7 @@ int usbmsc_bindlun(FAR void *handle, FAR const char *drvrpath,
|
||||
|
||||
if (!priv->iobuffer)
|
||||
{
|
||||
priv->iobuffer = (uint8_t*)kmalloc(geo.geo_sectorsize);
|
||||
priv->iobuffer = (uint8_t*)kmm_malloc(geo.geo_sectorsize);
|
||||
if (!priv->iobuffer)
|
||||
{
|
||||
usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_ALLOCIOBUFFER), geo.geo_sectorsize);
|
||||
|
||||
Reference in New Issue
Block a user