Skip to content

Commit 4144fdd

Browse files
Mateusz Noseksuryasaimadhu
authored andcommitted
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 <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 1429b56 commit 4144fdd

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

arch/x86/kernel/tsc_sync.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ static cycles_t check_tsc_warp(unsigned int timeout)
233233
* The measurement runs for 'timeout' msecs:
234234
*/
235235
end = start + (cycles_t) tsc_khz * timeout;
236-
now = start;
237236

238237
for (i = 0; ; i++) {
239238
/*

0 commit comments

Comments
 (0)