summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-11-24 01:04:42 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-11-25 21:06:37 +0900
commitb6233d0ded3391a33bb0047edafe15169131eadb (patch)
tree1acca2fb8df39a7b8aa1c68dc63bc556b913278c /scripts
parent887df76de67f5a6dd423e5763c22ff07f0e50048 (diff)
downloadlinux-stable-b6233d0ded3391a33bb0047edafe15169131eadb.tar.gz
linux-stable-b6233d0ded3391a33bb0047edafe15169131eadb.tar.bz2
linux-stable-b6233d0ded3391a33bb0047edafe15169131eadb.zip
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 <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kallsyms.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index d90a6133d7b8..f4d5f131556d 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -155,8 +155,8 @@ static bool is_ignored_symbol(const char *name, char type)
return false;
}
-static int check_symbol_range(const char *sym, unsigned long long addr,
- struct addr_range *ranges, int entries)
+static void check_symbol_range(const char *sym, unsigned long long addr,
+ struct addr_range *ranges, int entries)
{
size_t i;
struct addr_range *ar;
@@ -166,14 +166,12 @@ static int check_symbol_range(const char *sym, unsigned long long addr,
if (strcmp(sym, ar->start_sym) == 0) {
ar->start = addr;
- return 0;
+ return;
} else if (strcmp(sym, ar->end_sym) == 0) {
ar->end = addr;
- return 0;
+ return;
}
}
-
- return 1;
}
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. */
if (strcmp(sym, "_text") == 0)
_text = s->addr;
- else if (check_symbol_range(sym, s->addr, text_ranges,
- ARRAY_SIZE(text_ranges)) == 0)
- /* nothing to do */;
+
+ check_symbol_range(sym, s->addr, text_ranges, ARRAY_SIZE(text_ranges));
/* include the type field in the symbol name, so that it gets
* compressed together */