mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] arch/x86/kernel/tsc_sync.c: Clean up code by removing unused assignment
@ 2020-01-18 17:11 mateusznosek0
  2020-01-22 13:02 ` [tip: x86/cleanups] x86/tsc: Remove redundant assignment tip-bot2 for Mateusz Nosek
  0 siblings, 1 reply; 2+ messages in thread
From: mateusznosek0 @ 2020-01-18 17:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mateusz Nosek, x86, hpa, bp, mingo, tglx

From: Mateusz Nosek <mateusznosek0@gmail.com>

Previously the assignment to local variable 'now' took place before the for
loop. The loop is unconditional so it will be entered at least once. The
variable 'now' is reassigned in the loop and is not used before reassigning.
Therefore the assignment before the loop is unnecessary and can be removed.

Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com>
---
 arch/x86/kernel/tsc_sync.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/kernel/tsc_sync.c b/arch/x86/kernel/tsc_sync.c
index b8acf639abd1..32a818764e03 100644
--- a/arch/x86/kernel/tsc_sync.c
+++ b/arch/x86/kernel/tsc_sync.c
@@ -233,7 +233,6 @@ static cycles_t check_tsc_warp(unsigned int timeout)
 	 * The measurement runs for 'timeout' msecs:
 	 */
 	end = start + (cycles_t) tsc_khz * timeout;
-	now = start;
 
 	for (i = 0; ; i++) {
 		/*
-- 
2.17.1


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

end of thread, other threads:[~2020-01-22 13:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-18 17:11 [PATCH] arch/x86/kernel/tsc_sync.c: Clean up code by removing unused assignment mateusznosek0
2020-01-22 13:02 ` [tip: x86/cleanups] x86/tsc: Remove redundant assignment tip-bot2 for Mateusz Nosek

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®