Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4715526iob; Sun, 8 May 2022 23:02:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkF7X9lj+PKBtobgddd0hd3cDPclUCGfWW3iw+raVA6OHEMp/omf97HSu7B/M+Mur+gbCH X-Received: by 2002:a17:90b:694:b0:1d9:6a2e:bc9 with SMTP id m20-20020a17090b069400b001d96a2e0bc9mr24677334pjz.169.1652076160733; Sun, 08 May 2022 23:02:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652076160; cv=none; d=google.com; s=arc-20160816; b=zGqOiP2gYMnMG3qJBr4jBzMvxVpXmM8eV1TPutofFsZt8bUjI/XwIWmDarwsP4hiis UyQLgdHAwvsnUSxs8OgxU6+94f0FS/6fp9dPSNreUtzwnvJKmzHPywNkzRxF+uQcWCF9 DlrdJqyxpOr5kAX3z5q6jotst8SGe7ePWtVCbRgF/OczT8r8vMhIUnlJX8R95AQ9TogT N/Ivw42cXJbRk5n5HywTr2GAigkf+5WPM8b3Fxi0GyozyLMyoa409pRC1nKLFe4vOc4T AHGROnR160aGl+Qld2E7D8Lmih+q3E25Cec4j2duSSGy6mFB6NySmwpSo50E1ja7Z/d/ NjLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=8oIvrSXLxpHOBJ8OUR5k2JlXA0meLMtd3ASaGp9jlAQ=; b=hvu/ckwIIIzt4HwJN7nlwr0t+Lekt6cOCyJGEnezNMN+3U+5bCk2QbNABeguw+0vO0 y+kQGKmaZ7PaTp+Sm3RlN201RLslnFcD7Vx75mGHqofDy3lypYJwg9TFM7mTJ2lY6/wg 74mA62Ho5Sbm9yConZKqeReBDXq1q0t5fOsSeT1JrZSEYIbwkFaHIlaNH5Rs8rmqaP9E pIBMmsnK0qjx0szxGeKCPsszRFTlY+aHwbLKtjBCulXhDwqDJuTvQJQ9LecjCxtPkBpa KTuXbM/6v1NCtdxv7qLHh58qV22goaSxu14ck9V06ELvLbJv/WfoX3atN7yygQBJ+EqV wMzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c2-20020a056a00248200b00510625a3267si14923450pfv.118.2022.05.08.23.02.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 23:02:40 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 08C3E163F72; Sun, 8 May 2022 23:01:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388943AbiEFEZZ (ORCPT + 99 others); Fri, 6 May 2022 00:25:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388928AbiEFEZX (ORCPT ); Fri, 6 May 2022 00:25:23 -0400 Received: from mail.nfschina.com (unknown [IPv6:2400:dd01:100f:2:72e2:84ff:fe10:5f45]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8AA605E759; Thu, 5 May 2022 21:21:40 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id CDC6A1E80CF6; Fri, 6 May 2022 12:16:59 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JCRLcAwG6jDT; Fri, 6 May 2022 12:16:57 +0800 (CST) Received: from localhost.localdomain (unknown [111.193.128.65]) (Authenticated sender: kunyu@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id 11A4C1E80C9B; Fri, 6 May 2022 12:16:57 +0800 (CST) From: Li kunyu To: pbonzini@redhat.com, seanjc@google.com, vkuznets@redhat.com, wanpengli@tencent.com, jmattson@google.com, joro@8bytes.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Li kunyu Subject: [PATCH] x86: The return type of the function could be void Date: Fri, 6 May 2022 12:21:05 +0800 Message-Id: <20220506042105.6245-1-kunyu@nfschina.com> X-Mailer: git-send-email 2.18.2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Perhaps the return value of the function is not used. It may be possible to optimize the execution instructions. Signed-off-by: Li kunyu --- arch/x86/kvm/hyperv.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index 46f9dfb60469..64c0d1f54258 100644 --- a/arch/x86/kvm/hyperv.c +++ b/arch/x86/kvm/hyperv.c @@ -608,7 +608,7 @@ static enum hrtimer_restart stimer_timer_callback(struct hrtimer *timer) * a) stimer->count is not equal to 0 * b) stimer->config has HV_STIMER_ENABLE flag */ -static int stimer_start(struct kvm_vcpu_hv_stimer *stimer) +static void stimer_start(struct kvm_vcpu_hv_stimer *stimer) { u64 time_now; ktime_t ktime_now; @@ -638,7 +638,7 @@ static int stimer_start(struct kvm_vcpu_hv_stimer *stimer) ktime_add_ns(ktime_now, 100 * (stimer->exp_time - time_now)), HRTIMER_MODE_ABS); - return 0; + return; } stimer->exp_time = stimer->count; if (time_now >= stimer->count) { @@ -649,7 +649,7 @@ static int stimer_start(struct kvm_vcpu_hv_stimer *stimer) * the past, it will expire immediately." */ stimer_mark_pending(stimer, false); - return 0; + return; } trace_kvm_hv_stimer_start_one_shot(hv_stimer_to_vcpu(stimer)->vcpu_id, @@ -659,7 +659,6 @@ static int stimer_start(struct kvm_vcpu_hv_stimer *stimer) hrtimer_start(&stimer->timer, ktime_add_ns(ktime_now, 100 * (stimer->count - time_now)), HRTIMER_MODE_ABS); - return 0; } static int stimer_set_config(struct kvm_vcpu_hv_stimer *stimer, u64 config, -- 2.18.2