Skip to content

Commit 5332393

Browse files
lyakhnashif
authored andcommitted
llext: make loader parameters "const"
LLEXT loader parameters are input-only, make them "const." Signed-off-by: Guennadi Liakhovetski <[email protected]>
1 parent 1a16ace commit 5332393

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

include/zephyr/llext/llext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ int llext_iterate(int (*fn)(struct llext *ext, void *arg), void *arg);
177177
* @retval -ENOTSUP Unsupported ELF features
178178
*/
179179
int llext_load(struct llext_loader *loader, const char *name, struct llext **ext,
180-
struct llext_load_param *ldr_parm);
180+
const struct llext_load_param *ldr_parm);
181181

182182
/**
183183
* @brief Unload an extension

subsys/llext/llext.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ const void *llext_find_sym(const struct llext_symtable *sym_table, const char *s
139139
}
140140

141141
int llext_load(struct llext_loader *ldr, const char *name, struct llext **ext,
142-
struct llext_load_param *ldr_parm)
142+
const struct llext_load_param *ldr_parm)
143143
{
144144
int ret;
145145

subsys/llext/llext_load.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ static int llext_copy_symbols(struct llext_loader *ldr, struct llext *ext,
585585
* Load a valid ELF as an extension
586586
*/
587587
int do_llext_load(struct llext_loader *ldr, struct llext *ext,
588-
struct llext_load_param *ldr_parm)
588+
const struct llext_load_param *ldr_parm)
589589
{
590590
int ret;
591591

subsys/llext/llext_priv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static inline void llext_free(void *ptr)
5050
*/
5151

5252
int do_llext_load(struct llext_loader *ldr, struct llext *ext,
53-
struct llext_load_param *ldr_parm);
53+
const struct llext_load_param *ldr_parm);
5454

5555
static inline const char *llext_string(struct llext_loader *ldr, struct llext *ext,
5656
enum llext_mem mem_idx, unsigned int idx)

0 commit comments

Comments
 (0)