Skip to content

Commit b605be6

Browse files
masahir0yJessica Yu
authored andcommitted
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>
1 parent efd9763 commit b605be6

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎kernel/module.c‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -555,12 +555,9 @@ static const char *kernel_symbol_namespace(const struct kernel_symbol *sym)
555555
#endif
556556
}
557557

558-
static int cmp_name(const void *va, const void *vb)
558+
static int cmp_name(const void *name, const void *sym)
559559
{
560-
const char *a;
561-
const struct kernel_symbol *b;
562-
a = va; b = vb;
563-
return strcmp(a, kernel_symbol_name(b));
560+
return strcmp(name, kernel_symbol_name(sym));
564561
}
565562

566563
static bool find_exported_symbol_in_section(const struct symsearch *syms,

0 commit comments

Comments
 (0)