From: mateusznosek0@gmail.com
To: linux-kernel@vger.kernel.org
Cc: Mateusz Nosek <mateusznosek0@gmail.com>,
x86@kernel.org, hpa@zytor.com, bp@alien8.de, mingo@redhat.com,
tglx@linutronix.de
Subject: [PATCH] arch/x86/kernel/tsc_sync.c: Clean up code by removing unused assignment
Date: Sat, 18 Jan 2020 18:11:43 +0100 [thread overview]
Message-ID: <20200118171143.25178-1-mateusznosek0@gmail.com> (raw)
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
next reply other threads:[~2020-01-18 17:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-18 17:11 mateusznosek0 [this message]
2020-01-22 13:02 ` [tip: x86/cleanups] x86/tsc: Remove redundant assignment tip-bot2 for Mateusz Nosek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200118171143.25178-1-mateusznosek0@gmail.com \
--to=mateusznosek0@gmail.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®