]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
xen/arm: vtimer: Change the return value to void for virt_timer_[save|restore]
authorBaodong Chen <chenbaodong@mxnavi.com>
Mon, 10 Jun 2019 05:07:54 +0000 (13:07 +0800)
committerJulien Grall <julien.grall@arm.com>
Tue, 11 Jun 2019 13:17:46 +0000 (14:17 +0100)
virt_timer_{save, return} always return 0 and none of the caller
actually check it. So change the return type to void.

Signed-off-by: Baodong Chen <chenbaodong@mxnavi.com>
[julien: Rework the commit message]
Acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/vtimer.c
xen/include/asm-arm/vtimer.h

index c99dd237d1cc6eb7ad9eb8dc5a3ce538294942da..e6aebdac9ee6ae330ae2cee029c8c10d53875bee 100644 (file)
@@ -136,7 +136,7 @@ void vcpu_timer_destroy(struct vcpu *v)
     kill_timer(&v->arch.phys_timer.timer);
 }
 
-int virt_timer_save(struct vcpu *v)
+void virt_timer_save(struct vcpu *v)
 {
     ASSERT(!is_idle_vcpu(v));
 
@@ -149,10 +149,9 @@ int virt_timer_save(struct vcpu *v)
         set_timer(&v->arch.virt_timer.timer, ticks_to_ns(v->arch.virt_timer.cval +
                   v->domain->arch.virt_timer_base.offset - boot_count));
     }
-    return 0;
 }
 
-int virt_timer_restore(struct vcpu *v)
+void virt_timer_restore(struct vcpu *v)
 {
     ASSERT(!is_idle_vcpu(v));
 
@@ -163,7 +162,6 @@ int virt_timer_restore(struct vcpu *v)
     WRITE_SYSREG64(v->domain->arch.virt_timer_base.offset, CNTVOFF_EL2);
     WRITE_SYSREG64(v->arch.virt_timer.cval, CNTV_CVAL_EL0);
     WRITE_SYSREG32(v->arch.virt_timer.ctl, CNTV_CTL_EL0);
-    return 0;
 }
 
 static bool vtimer_cntp_ctl(struct cpu_user_regs *regs, uint32_t *r, bool read)
index 91d88b377fec510faa4faf344dc172a08c0f0b99..9d4fb4c6e8d8223373e5ad60fed6b5476723b672 100644 (file)
@@ -24,8 +24,8 @@ extern int domain_vtimer_init(struct domain *d,
                               struct xen_arch_domainconfig *config);
 extern int vcpu_vtimer_init(struct vcpu *v);
 extern bool vtimer_emulate(struct cpu_user_regs *regs, union hsr hsr);
-extern int virt_timer_save(struct vcpu *v);
-extern int virt_timer_restore(struct vcpu *v);
+extern void virt_timer_save(struct vcpu *v);
+extern void virt_timer_restore(struct vcpu *v);
 extern void vcpu_timer_destroy(struct vcpu *v);
 void vtimer_update_irqs(struct vcpu *v);