llext: fix llext_find_sym() not to return a "const" value

Returned values are copies, so trying to "const" return values cannot
have any effect.

Fixes the following compiler warning:
```
llext.h:165: warning: type qualifiers ignored on function return type
```

Fixes commit 41e0a4a371 ("llext: Linkable loadable extensions")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2024-04-11 21:38:13 +00:00 committed by Alberto Escolar
parent 36f1092ed7
commit 01a8202135
2 changed files with 2 additions and 2 deletions

View File

@ -164,7 +164,7 @@ int llext_unload(struct llext **ext);
* @retval NULL if no symbol found
* @retval addr Address of symbol in memory if found
*/
const void * const llext_find_sym(const struct llext_symtable *sym_table, const char *sym_name);
const void *llext_find_sym(const struct llext_symtable *sym_table, const char *sym_name);
/**
* @brief Call a function by name

View File

@ -114,7 +114,7 @@ int llext_iterate(int (*fn)(struct llext *ext, void *arg), void *arg)
return ret;
}
const void * const llext_find_sym(const struct llext_symtable *sym_table, const char *sym_name)
const void *llext_find_sym(const struct llext_symtable *sym_table, const char *sym_name)
{
if (sym_table == NULL) {
/* Built-in symbol table */