mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][next] x86/unwind/orc: remove redundant initialization of pointer mid
@ 2023-09-20 11:41 Colin Ian King
  2023-09-21  6:49 ` [tip: objtool/core] x86/unwind/orc: Remove redundant initialization of 'mid' pointer in __orc_find() tip-bot2 for Colin Ian King
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2023-09-20 11:41 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H . Peter Anvin
  Cc: kernel-janitors, linux-kernel

The pointer mid 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>
---
 arch/x86/kernel/unwind_orc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.39.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-21 17:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-20 11:41 [PATCH][next] x86/unwind/orc: remove redundant initialization of pointer mid Colin Ian King
2023-09-21  6:49 ` [tip: objtool/core] x86/unwind/orc: Remove redundant initialization of 'mid' pointer in __orc_find() tip-bot2 for Colin Ian King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®