Skip to content

Commit b6233d0

Browse files
committed
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: Masahiro Yamada <[email protected]>
1 parent 887df76 commit b6233d0

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

scripts/kallsyms.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ static bool is_ignored_symbol(const char *name, char type)
155155
return false;
156156
}
157157

158-
static int check_symbol_range(const char *sym, unsigned long long addr,
159-
struct addr_range *ranges, int entries)
158+
static void check_symbol_range(const char *sym, unsigned long long addr,
159+
struct addr_range *ranges, int entries)
160160
{
161161
size_t i;
162162
struct addr_range *ar;
@@ -166,14 +166,12 @@ static int check_symbol_range(const char *sym, unsigned long long addr,
166166

167167
if (strcmp(sym, ar->start_sym) == 0) {
168168
ar->start = addr;
169-
return 0;
169+
return;
170170
} else if (strcmp(sym, ar->end_sym) == 0) {
171171
ar->end = addr;
172-
return 0;
172+
return;
173173
}
174174
}
175-
176-
return 1;
177175
}
178176

179177
static int read_symbol(FILE *in, struct sym_entry *s)
@@ -200,9 +198,8 @@ static int read_symbol(FILE *in, struct sym_entry *s)
200198
/* Ignore most absolute/undefined (?) symbols. */
201199
if (strcmp(sym, "_text") == 0)
202200
_text = s->addr;
203-
else if (check_symbol_range(sym, s->addr, text_ranges,
204-
ARRAY_SIZE(text_ranges)) == 0)
205-
/* nothing to do */;
201+
202+
check_symbol_range(sym, s->addr, text_ranges, ARRAY_SIZE(text_ranges));
206203

207204
/* include the type field in the symbol name, so that it gets
208205
* compressed together */

0 commit comments

Comments
 (0)