scripts/sortextable: Refactor the do_func() function
Refine the loop, naming and code structure, make the code more readable
and extendable. No functional changes intended.
Signed-off-by: Shile Zhang <shile.zhang@linux.alibaba.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: linux-kbuild@vger.kernel.org
Link: https://lkml.kernel.org/r/20191204004633.88660-5-shile.zhang@linux.alibaba.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
diff --git a/scripts/sortextable.c b/scripts/sortextable.c
index e5384e8..efa2839 100644
--- a/scripts/sortextable.c
+++ b/scripts/sortextable.c
@@ -320,7 +320,7 @@ static int do_file(char const *const fname, void *addr)
"unrecognized ET_EXEC/ET_DYN file: %s\n", fname);
break;
}
- rc = do32(ehdr, fname, custom_sort);
+ rc = do_sort_32(ehdr, fname, custom_sort);
break;
case ELFCLASS64:
{
@@ -332,7 +332,7 @@ static int do_file(char const *const fname, void *addr)
fname);
break;
}
- rc = do64(ghdr, fname, custom_sort);
+ rc = do_sort_64(ghdr, fname, custom_sort);
}
break;
default: