Skip to content

Commit a4a264d

Browse files
lyakhlgirdwood
authored andcommitted
lib-manager: make a function static
Both lib_manager_module_create() and lib_manager_module_free() are defined and used in lib_manager.c exclusively, so both should be static functions. It is already the case for the former. Make lib_manager_module_free() static too. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent d8fb810 commit a4a264d

2 files changed

Lines changed: 10 additions & 11 deletions

File tree

src/include/sof/lib_manager.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,6 @@ void lib_manager_get_instance_bss_address(uint32_t instance_id,
198198
const struct sof_man_module *mod,
199199
void __sparse_cache **va_addr, size_t *size);
200200

201-
/*
202-
* \brief Free module
203-
*
204-
* param[in] component_id - component id coming from ipc config. This function reguires valid
205-
* lib_id and module_id fields of component id.
206-
*
207-
* Function is responsible to free module resources in HP memory.
208-
*/
209-
int lib_manager_free_module(const uint32_t component_id);
210201
/*
211202
* \brief Load library
212203
*

src/library_manager/lib_manager.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,15 @@ static uintptr_t lib_manager_allocate_module(const struct sof_man_module *mod,
376376
return 0;
377377
}
378378

379-
int lib_manager_free_module(const uint32_t component_id)
379+
/*
380+
* \brief Free module
381+
*
382+
* param[in] component_id - component id coming from ipc config. This function reguires valid
383+
* lib_id and module_id fields of component id.
384+
*
385+
* Function is responsible to free module resources in HP memory.
386+
*/
387+
static int lib_manager_free_module(const uint32_t component_id)
380388
{
381389
const struct sof_man_module *mod;
382390
const uint32_t module_id = IPC4_MOD_ID(component_id);
@@ -422,7 +430,7 @@ static uintptr_t lib_manager_allocate_module(const struct comp_ipc_config *ipc_c
422430
return 0;
423431
}
424432

425-
int lib_manager_free_module(const uint32_t component_id)
433+
static int lib_manager_free_module(const uint32_t component_id)
426434
{
427435
/* Since we cannot allocate the freeing is not considered to be an error */
428436
tr_warn(&lib_manager_tr, "Dynamic module freeing is not supported");

0 commit comments

Comments
 (0)