diff options
author | Colin Ian King <colin.i.king@gmail.com> | 2023-09-20 12:41:41 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2023-09-21 08:41:23 +0200 |
commit | fef44ebaf61b57a71ab818058926a3f9a0ac81e6 (patch) | |
tree | cbd6cb2ae829bfc9fdc2760c089ef750344d9ed1 /arch/x86/kernel/unwind_orc.c | |
parent | ce9ecca0238b140b88f43859b211c9fdfd8e5b70 (diff) |
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
Diffstat (limited to 'arch/x86/kernel/unwind_orc.c')
-rw-r--r-- | arch/x86/kernel/unwind_orc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/unwind_orc.c b/arch/x86/kernel/unwind_orc.c index 7e574cf3bf8a..d00c28aaa5be 100644 --- a/arch/x86/kernel/unwind_orc.c +++ b/arch/x86/kernel/unwind_orc.c @@ -85,7 +85,7 @@ static struct orc_entry *__orc_find(int *ip_table, struct orc_entry *u_table, { int *first = ip_table; int *last = ip_table + num_entries - 1; - int *mid = first, *found = first; + int *mid, *found = first; if (!num_entries) return NULL; |