From patchwork Mon Jun 10 05:07:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenbaodong X-Patchwork-Id: 10984099 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 480C5924 for ; Mon, 10 Jun 2019 05:09:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35BFF20CCF for ; Mon, 10 Jun 2019 05:09:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 23C3B287AB; Mon, 10 Jun 2019 05:09:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 67E8F20CCF for ; Mon, 10 Jun 2019 05:09:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1haCXS-0005VG-Op; Mon, 10 Jun 2019 05:08:10 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1haCXS-0005VB-4P for xen-devel@lists.xenproject.org; Mon, 10 Jun 2019 05:08:10 +0000 X-Inumbo-ID: b962caf4-8b3d-11e9-8980-bc764e045a96 Received: from mxnavi-mail.mxnavi.com (unknown [116.90.87.199]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id b962caf4-8b3d-11e9-8980-bc764e045a96; Mon, 10 Jun 2019 05:08:07 +0000 (UTC) Received: from localhost.localdomain (61.161.186.150) by mxnavi-mail.mxnavi.com (116.90.87.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1591.10; Mon, 10 Jun 2019 13:04:53 +0800 From: Baodong Chen To: Date: Mon, 10 Jun 2019 13:07:54 +0800 Message-ID: <1560143274-10547-1-git-send-email-chenbaodong@mxnavi.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [61.161.186.150] X-ClientProxiedBy: mxnavi-mail.mxnavi.com (116.90.87.199) To mxnavi-mail.mxnavi.com (116.90.87.199) Subject: [Xen-devel] [PATCH] xen/arm: vtimer: fix return value to void for virt_timer_[save|restore] X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Baodong Chen , Julien Grall , Stefano Stabellini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP The original type is int and not used at all so fix to void. Signed-off-by: Baodong Chen --- xen/arch/arm/vtimer.c | 6 ++---- xen/include/asm-arm/vtimer.h | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/xen/arch/arm/vtimer.c b/xen/arch/arm/vtimer.c index c99dd23..e6aebda 100644 --- a/xen/arch/arm/vtimer.c +++ b/xen/arch/arm/vtimer.c @@ -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) diff --git a/xen/include/asm-arm/vtimer.h b/xen/include/asm-arm/vtimer.h index 91d88b3..9d4fb4c 100644 --- a/xen/include/asm-arm/vtimer.h +++ b/xen/include/asm-arm/vtimer.h @@ -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);