Commit 1448d4a9 authored by Thorsten Blum's avatar Thorsten Blum Committed by Sean Christopherson
Browse files

KVM: x86: Optimize local variable in start_sw_tscdeadline()



Change the data type of the local variable this_tsc_khz to u32 because
virtual_tsc_khz is also declared as u32.

Since do_div() casts the divisor to u32 anyway, changing the data type
of this_tsc_khz to u32 also removes the following Coccinelle/coccicheck
warning reported by do_div.cocci:

  WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead

Signed-off-by: default avatarThorsten Blum <thorsten.blum@toblux.com>
Link: https://lore.kernel.org/r/20240814203345.2234-2-thorsten.blum@toblux.com


Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 47ac09b9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment