x86/time: Drop unused parameter from soft_rdtsc()
PATCH 1/1 x86/time: Drop unused parameter from soft_rdtsc()
Fixes a6ed4543222a ("x86/time: pv_soft_rdtsc() is PV-only")
Signed-off-by Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
--- xen/arch/x86/pv/emul-priv-op.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
xen/arch/x86/pv/emul-priv-op.c +2 -3
@@ -874,8 +874,7 @@ static uint64_t guest_efer(const struct domain *d)return val; } -static uint64_t soft_rdtsc ( -const struct vcpu *v,const struct cpu_user_regs *regs) +static uint64_t soft_rdtsc (const struct vcpu *v) {s_time_t old, new, now =get_s_time ();struct domain *d = v->domain;
@@ -934,7 +933,7 @@ static int cf_check read_msr(return X86EMUL_OKAY ;case MSR_IA32_TSC : - *val = currd->arch.vtsc ?soft_rdtsc (curr, ctxt->regs) :rdtsc (); + *val = currd->arch.vtsc ?soft_rdtsc (curr) :rdtsc ();return X86EMUL_OKAY ;case MSR_EFER :
Signature · 1 line
2.39.5
Quoted 2 lines · Andrew Cooper
Fixes a6ed4543222a ("x86/time: pv_soft_rdtsc() is PV-only")Signed-off-by Andrew Cooper <[email protected]>
Why Fixes: without you calling out what bug it is that is being fixed (and that was introduced by said commit)? That's really where I think Amends: is to be used, but yes, I know you dislike that new tag.
The Misra rule 2.2 (dead code) violation was pre-existing to the named commit. Plus that rule isn't among the accepted ones, i.e. while we should strive to not have violations, having ones isn't quite a "bug" (yet).
But yes - I probably could / should have noticed this and done the change right while moving the function.
Without the tag, or with it changed to Amends:
Acked-by Jan Beulich <[email protected]>
Jan