]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
objtool/klp: Remove redundant strcmp() in correlate_symbols()
authorSong Liu <song@kernel.org>
Thu, 5 Mar 2026 23:15:25 +0000 (15:15 -0800)
committerJosh Poimboeuf <jpoimboe@kernel.org>
Fri, 6 Mar 2026 16:08:23 +0000 (08:08 -0800)
find_global_symbol_by_name() already compares names of the two symbols,
so there is no need to compare them again.

Signed-off-by: Song Liu <song@kernel.org>
Link: https://patch.msgid.link/20260305231531.3847295-2-song@kernel.org
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
tools/objtool/klp-diff.c

index 885775f6072e51b73326c0d0b2b09949c8b4f877..639bdd3ad5eb942ca58871b1aedd9476f3288d58 100644 (file)
@@ -454,7 +454,7 @@ static int correlate_symbols(struct elfs *e)
 
                sym2 = find_global_symbol_by_name(e->patched, sym1->name);
 
-               if (sym2 && !sym2->twin && !strcmp(sym1->name, sym2->name)) {
+               if (sym2 && !sym2->twin) {
                        sym1->twin = sym2;
                        sym2->twin = sym1;
                }