Skip to content

Commit fef44eb

Browse files
ColinIanKingIngo Molnar
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 <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Josh Poimboeuf <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent ce9ecca commit fef44eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)