diff mbox series

[2/7] modpost: add const qualifier to syminfo table

Message ID 20231101150404.754108-3-masahiroy@kernel.org (mailing list archive)
State New, archived
Headers show
Series modpost: fix modpost errors for m68k-uclinux-gcc | expand

Commit Message

Masahiro Yamada Nov. 1, 2023, 3:03 p.m. UTC
symsearch_find_nearest() does not modify the table.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 scripts/mod/symsearch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/scripts/mod/symsearch.c b/scripts/mod/symsearch.c
index aa4ed51f9960..00f0f9c354db 100644
--- a/scripts/mod/symsearch.c
+++ b/scripts/mod/symsearch.c
@@ -156,7 +156,7 @@  Elf_Sym *symsearch_find_nearest(struct elf_info *elf, Elf_Addr addr,
 {
 	unsigned int hi = elf->symsearch->table_size;
 	unsigned int lo = 0;
-	struct syminfo *table = elf->symsearch->table;
+	const struct syminfo *table = elf->symsearch->table;
 	struct syminfo target;
 
 	target.addr = addr;