summaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-09-09 13:39:02 +0200
committerJessica Yu <jeyu@kernel.org>2019-09-11 21:41:56 +0200
commitb605be658188005efd2d447e0989fd1f4aab8862 (patch)
tree09ecae527c0e54719fffbc4b5a31b57ce1ad31b8 /kernel/module.c
parentmodule: move CONFIG_UNUSED_SYMBOLS to the sub-menu of MODULES (diff)
downloadlinux-b605be658188005efd2d447e0989fd1f4aab8862.tar.xz
linux-b605be658188005efd2d447e0989fd1f4aab8862.zip
module: remove unneeded casts in cmp_name()
You can pass opaque pointers directly. I also renamed 'va' and 'vb' into more meaningful arguments. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Jessica Yu <jeyu@kernel.org>
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 7ab244c4e1ba..32873bcce738 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -555,12 +555,9 @@ static const char *kernel_symbol_namespace(const struct kernel_symbol *sym)
#endif
}
-static int cmp_name(const void *va, const void *vb)
+static int cmp_name(const void *name, const void *sym)
{
- const char *a;
- const struct kernel_symbol *b;
- a = va; b = vb;
- return strcmp(a, kernel_symbol_name(b));
+ return strcmp(name, kernel_symbol_name(sym));
}
static bool find_exported_symbol_in_section(const struct symsearch *syms,