diff options
Diffstat (limited to 'arch/loongarch/kernel/module-sections.c')
| -rw-r--r-- | arch/loongarch/kernel/module-sections.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/loongarch/kernel/module-sections.c b/arch/loongarch/kernel/module-sections.c index 9fa1c9814fcc..0259d9c7ea30 100644 --- a/arch/loongarch/kernel/module-sections.c +++ b/arch/loongarch/kernel/module-sections.c @@ -62,16 +62,14 @@ Elf_Addr module_emit_plt_entry(struct module *mod, Elf_Shdr *sechdrs, Elf_Addr v return (Elf_Addr)&plt[nr]; } -#define cmp_3way(a, b) ((a) < (b) ? -1 : (a) > (b)) - static int compare_rela(const void *x, const void *y) { int ret; const Elf_Rela *rela_x = x, *rela_y = y; - ret = cmp_3way(rela_x->r_info, rela_y->r_info); + ret = cmp_int(rela_x->r_info, rela_y->r_info); if (ret == 0) - ret = cmp_3way(rela_x->r_addend, rela_y->r_addend); + ret = cmp_int(rela_x->r_addend, rela_y->r_addend); return ret; } |
