Skip to content

Commit fef44eb

Browse files
ColinIanKingingomolnar
authored andcommitted
x86/unwind/orc: Remove redundant initialization of 'mid' pointer in __orc_find()
The 'mid' pointer is being initialized with a value that is never read, it is being re-assigned and used inside a for-loop. Remove the redundant initialization. Cleans up clang scan build warning: arch/x86/kernel/unwind_orc.c:88:7: warning: Value stored to 'mid' during its initialization is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/r/20230920114141.118919-1-colin.i.king@gmail.com
1 parent ce9ecca commit fef44eb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/x86/kernel/unwind_orc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static struct orc_entry *__orc_find(int *ip_table, struct orc_entry *u_table,
8585
{
8686
int *first = ip_table;
8787
int *last = ip_table + num_entries - 1;
88-
int *mid = first, *found = first;
88+
int *mid, *found = first;
8989

9090
if (!num_entries)
9191
return NULL;

0 commit comments

Comments
 (0)