mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00
kallsyms: Change func signature for cleanup_symbol_name()
All users of cleanup_symbol_name() do not use the return value. So let us change the return value of cleanup_symbol_name() to 'void' to reflect its usage pattern. Suggested-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Yonghong Song <yonghong.song@linux.dev> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Song Liu <song@kernel.org> Link: https://lore.kernel.org/r/20230825202036.441212-1-yonghong.song@linux.dev Signed-off-by: Kees Cook <keescook@chromium.org>
This commit is contained in:
parent
33f0467fe0
commit
76903a9648
|
@ -163,12 +163,12 @@ unsigned long kallsyms_sym_address(int idx)
|
||||||
return kallsyms_relative_base - 1 - kallsyms_offsets[idx];
|
return kallsyms_relative_base - 1 - kallsyms_offsets[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool cleanup_symbol_name(char *s)
|
static void cleanup_symbol_name(char *s)
|
||||||
{
|
{
|
||||||
char *res;
|
char *res;
|
||||||
|
|
||||||
if (!IS_ENABLED(CONFIG_LTO_CLANG))
|
if (!IS_ENABLED(CONFIG_LTO_CLANG))
|
||||||
return false;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* LLVM appends various suffixes for local functions and variables that
|
* LLVM appends various suffixes for local functions and variables that
|
||||||
|
@ -178,12 +178,10 @@ static bool cleanup_symbol_name(char *s)
|
||||||
* - foo.llvm.[0-9a-f]+
|
* - foo.llvm.[0-9a-f]+
|
||||||
*/
|
*/
|
||||||
res = strstr(s, ".llvm.");
|
res = strstr(s, ".llvm.");
|
||||||
if (res) {
|
if (res)
|
||||||
*res = '\0';
|
*res = '\0';
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int compare_symbol_name(const char *name, char *namebuf)
|
static int compare_symbol_name(const char *name, char *namebuf)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user