Commit b6233d0d authored by Masahiro Yamada's avatar Masahiro Yamada

scripts/kallsyms: make check_symbol_range() void function

There is no more reason to check the return value of
check_symbol_range().
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 887df76d
...@@ -155,8 +155,8 @@ static bool is_ignored_symbol(const char *name, char type) ...@@ -155,8 +155,8 @@ static bool is_ignored_symbol(const char *name, char type)
return false; return false;
} }
static int check_symbol_range(const char *sym, unsigned long long addr, static void check_symbol_range(const char *sym, unsigned long long addr,
struct addr_range *ranges, int entries) struct addr_range *ranges, int entries)
{ {
size_t i; size_t i;
struct addr_range *ar; struct addr_range *ar;
...@@ -166,14 +166,12 @@ static int check_symbol_range(const char *sym, unsigned long long addr, ...@@ -166,14 +166,12 @@ static int check_symbol_range(const char *sym, unsigned long long addr,
if (strcmp(sym, ar->start_sym) == 0) { if (strcmp(sym, ar->start_sym) == 0) {
ar->start = addr; ar->start = addr;
return 0; return;
} else if (strcmp(sym, ar->end_sym) == 0) { } else if (strcmp(sym, ar->end_sym) == 0) {
ar->end = addr; ar->end = addr;
return 0; return;
} }
} }
return 1;
} }
static int read_symbol(FILE *in, struct sym_entry *s) static int read_symbol(FILE *in, struct sym_entry *s)
...@@ -200,9 +198,8 @@ static int read_symbol(FILE *in, struct sym_entry *s) ...@@ -200,9 +198,8 @@ static int read_symbol(FILE *in, struct sym_entry *s)
/* Ignore most absolute/undefined (?) symbols. */ /* Ignore most absolute/undefined (?) symbols. */
if (strcmp(sym, "_text") == 0) if (strcmp(sym, "_text") == 0)
_text = s->addr; _text = s->addr;
else if (check_symbol_range(sym, s->addr, text_ranges,
ARRAY_SIZE(text_ranges)) == 0) check_symbol_range(sym, s->addr, text_ranges, ARRAY_SIZE(text_ranges));
/* nothing to do */;
/* include the type field in the symbol name, so that it gets /* include the type field in the symbol name, so that it gets
* compressed together */ * compressed together */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment