Skip to content

Commit

Permalink
module: remove unneeded casts in cmp_name()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
masahir0y authored and Jessica Yu committed Sep 11, 2019
1 parent efd9763 commit b605be6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b605be6

Please sign in to comment.