diff options
author | Mateusz Nosek <mateusznosek0@gmail.com> | 2020-01-18 18:11:43 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2020-01-22 13:52:42 +0100 |
commit | 4144fddbd3932b59370e6e279002991c3e2b2fc6 (patch) | |
tree | a9fede04073bd0c738a867e0ac9801b5fe32f429 /arch/x86/kernel | |
parent | 1429b568ad71943a374aa4a8d3772d5a8816ddba (diff) | |
download | linux-4144fddbd3932b59370e6e279002991c3e2b2fc6.tar.bz2 |
x86/tsc: Remove redundant assignment
Previously, the assignment to the 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.
No code changed:
# arch/x86/kernel/tsc_sync.o:
text data bss dec hex filename
3569 198 44 3811 ee3 tsc_sync.o.before
3569 198 44 3811 ee3 tsc_sync.o.after
md5:
36216de29b208edbcd34fed9fe7f7b69 tsc_sync.o.before.asm
36216de29b208edbcd34fed9fe7f7b69 tsc_sync.o.after.asm
[ bp: Massage commit message. ]
Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200118171143.25178-1-mateusznosek0@gmail.com
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/tsc_sync.c | 1 |
1 files changed, 0 insertions, 1 deletions
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++) { /* |