Skip to content

Commit d9f44d6

Browse files
author
Jyri Sarha
committed
module: Make mod_balloc() and mod_alloc() inline functions
Make mod_balloc() and mod_alloc() inline functions. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent 90f18b6 commit d9f44d6

File tree

2 files changed

+10
-31
lines changed

2 files changed

+10
-31
lines changed

src/audio/module_adapter/module/generic.c

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -211,21 +211,6 @@ void *mod_balloc_align(struct processing_module *mod, size_t size, size_t alignm
211211
}
212212
EXPORT_SYMBOL(mod_balloc_align);
213213

214-
/**
215-
* Allocates buffer memory block for module.
216-
* @param mod Pointer to module this memory block is allocated for.
217-
* @param bytes Size in bytes.
218-
* @return Pointer to the allocated memory or NULL if failed.
219-
*
220-
* Like mod_balloc_align() but the alignment can not be specified. However,
221-
* rballoc() always aligns the memory to PLATFORM_DCACHE_ALIGN.
222-
*/
223-
void *mod_balloc(struct processing_module *mod, size_t size)
224-
{
225-
return mod_balloc_align(mod, size, 0);
226-
}
227-
EXPORT_SYMBOL(mod_balloc);
228-
229214
/**
230215
* Allocates aligned memory block for module.
231216
* @param mod Pointer to the module this memory block is allocatd for.
@@ -276,20 +261,6 @@ void *mod_alloc_align(struct processing_module *mod, size_t size, size_t alignme
276261
}
277262
EXPORT_SYMBOL(mod_alloc_align);
278263

279-
/**
280-
* Allocates memory block for module.
281-
* @param mod Pointer to module this memory block is allocated for.
282-
* @param bytes Size in bytes.
283-
* @return Pointer to the allocated memory or NULL if failed.
284-
*
285-
* Like mod_alloc_align() but the alignment can not be specified.
286-
*/
287-
void *mod_alloc(struct processing_module *mod, size_t size)
288-
{
289-
return mod_alloc_align(mod, size, 0);
290-
}
291-
EXPORT_SYMBOL(mod_alloc);
292-
293264
/**
294265
* Allocates memory block for module and initializes it to zero.
295266
* @param mod Pointer to module this memory block is allocated for.

src/include/sof/audio/module_adapter/module/generic.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,17 @@ struct module_processing_data {
189189
int module_load_config(struct comp_dev *dev, const void *cfg, size_t size);
190190
int module_init(struct processing_module *mod);
191191
void *mod_balloc_align(struct processing_module *mod, size_t size, size_t alignment);
192-
void *mod_balloc(struct processing_module *mod, size_t size);
192+
static inline void *mod_balloc(struct processing_module *mod, size_t size)
193+
{
194+
return mod_balloc_align(mod, size, 0);
195+
}
196+
193197
void *mod_alloc_align(struct processing_module *mod, size_t size, size_t alignment);
194-
void *mod_alloc(struct processing_module *mod, size_t size);
198+
static inline void *mod_alloc(struct processing_module *mod, size_t size)
199+
{
200+
return mod_alloc_align(mod, size, 0);
201+
}
202+
195203
void *mod_zalloc(struct processing_module *mod, size_t size);
196204
int mod_free(struct processing_module *mod, const void *ptr);
197205
#if CONFIG_COMP_BLOB

0 commit comments

Comments
 (0)