lkml.org 
[lkml]   [2023]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/7] modpost: add const qualifier to syminfo table
Date
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 --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;
--
2.40.1
\
 
 \ /
  Last update: 2023-11-01 16:08    [W:0.061 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site