Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4249022pxb; Tue, 25 Jan 2022 06:40:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJyUmX4eJFnLpff6RYWti2l04W892wOavGQ7of0xXXu6ENaRjPD+jw3YW7gYjt8iylwQy0sg X-Received: by 2002:a05:6402:5174:: with SMTP id d20mr20947254ede.21.1643121601308; Tue, 25 Jan 2022 06:40:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643121601; cv=none; d=google.com; s=arc-20160816; b=B8D49O1oGqpw6W225G1Vej3tp6Q2hTyZvWdzX9IGEGJTNyZ3Gcfpd8nluHzFI/qvqB XNtrL3VPUM9z+eRRmuMUsO4t2sU0Ll1mXZ/OC5a8zYPkptDq05qA5lfgA6qGC5NlC20M HDqT8/t4tavyAjP+JWvDZ1QellnvMbgZecPqw1KPfa2KTvCvYT2gOwKaWl5Eb/26ng43 2n6oid+Ld0f8XmJPgmY8QldFRZtnthICTPJELjn//PsZiEuXsbpNWhTYSopRrf4NKMtp L9xpio3rWBg65j6C3M61W4oY4JxsBaDOMB02J4BNyzZNZ2txuFju4JpPi3JGB5UW4tCY YX4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=j/rRmDiMdmGlDszyCo/+/fHqa/st5+5A7HjoH3NKV08=; b=ipGobQiSK4XLBShLdnK0tgY+431lnjg+PzwhS1uCmn85mFwTDvOp5t8uEOaiXuY7oN 7uUhCrojL1NRZxMM7WcBlcHvsHGtfh+nmKJxWaAU+OECRwEVMtzhmaJgc+GwnT2zhjL9 HApD1dMrzO1yOfy+67zBydWfjjNEW5Bha0noX54FPyWK628exmswalP1SJKQbF47gA+Z EbOQ6eZ2MH9XYLefkCH+2d58LGEDm50odIN5f25V/acdoYy7/vQL461oRrgy2yM+oqiz 0+PZ7SBHGnAKd4OqzoB/YE2YEA4cgCSfnIln1ngyDDQUuzrZUa9Ha6mkKIaOCU3Na/BO 0Wpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cYnSfuu7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n24si1637635edd.357.2022.01.25.06.39.35; Tue, 25 Jan 2022 06:40:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cYnSfuu7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239467AbiAYKEX (ORCPT + 99 others); Tue, 25 Jan 2022 05:04:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238491AbiAYJ7d (ORCPT ); Tue, 25 Jan 2022 04:59:33 -0500 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B69EC06175B; Tue, 25 Jan 2022 01:59:32 -0800 (PST) Received: by mail-pl1-x643.google.com with SMTP id j16so8192691plx.4; Tue, 25 Jan 2022 01:59:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=j/rRmDiMdmGlDszyCo/+/fHqa/st5+5A7HjoH3NKV08=; b=cYnSfuu7cXdFeqfoM+hegTyG4JSAyN1qSNbeBX1V1k3y0Jlvzele4X5rrqc9MTA70F DzRy3+qKF2rm3varwe20/g098zxwHdokrfUwZEX4Wxogx8HSQ4T7sRoJWww7gUgESoOQ h3G2sIxGvdfDG5pJChVK8Imr40QYdabRIDM+8C8aldKJP7YyycSxpVny2yrr5bsB0mUy 8M3P4MZOAJSiyn46N6gOGXSIHQYSWSAEvduVq3dYxskroY7W7zaqiKsMRGUr/A5komaF qGqADiMqXzL1IgljGbkw5dTH0oSZomXCmAXqtEA4ybI+rASYG3iW76UceqT8kMCWmTyM 4TSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=j/rRmDiMdmGlDszyCo/+/fHqa/st5+5A7HjoH3NKV08=; b=sAr1hl1fkusq4RnkvB1m6yt/tg7M1OWu1JoFx6nUoMATRPH4sYFBY2HEZrFdtukdQB 25GIpJROHgb6dFNwl8tNyMp6bL64QmOBkLi7tYpR0Q6PS7A3NDPvSfYgHOa4ZhvHaNd4 sARXegfG2FEc0x4gvWYY9BEkeHli/u8mYLaAQlQMhjxKJOEVqcQsT20ih7/HNH8Kp/L7 6XSr77cM9qjHnANVEW1ZyhzlBJMJ/oYjewssThatKvjaBxwxGgISWJZz13xW9WOgCKxa S+CPib/GR5fGpcTF8uOIdOg4/cTQhzFIT9+hkQaRQknK76QXm3i8J5czXIdvCT2gSFh4 5M1Q== X-Gm-Message-State: AOAM53255f5/VaJgIiFq5ArNl6rmfLBFBz/6kakMVo57EXRA+2Xyf5WD ++AtOE4QqzaRvyVpJPQigGI= X-Received: by 2002:a17:902:dac6:b0:14b:51c2:5d6d with SMTP id q6-20020a170902dac600b0014b51c25d6dmr8068078plx.3.1643104772108; Tue, 25 Jan 2022 01:59:32 -0800 (PST) Received: from CLOUDLIANG-MB0.tencent.com ([103.7.29.32]) by smtp.gmail.com with ESMTPSA id mq3sm201606pjb.4.2022.01.25.01.59.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jan 2022 01:59:31 -0800 (PST) From: Jinrong Liang X-Google-Original-From: Jinrong Liang To: Paolo Bonzini Cc: Xianting Tian , Jim Mattson , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/19] KVM: x86/svm: Remove unused "vcpu" of svm_check_exit_valid() Date: Tue, 25 Jan 2022 17:58:56 +0800 Message-Id: <20220125095909.38122-7-cloudliang@tencent.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) In-Reply-To: <20220125095909.38122-1-cloudliang@tencent.com> References: <20220125095909.38122-1-cloudliang@tencent.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jinrong Liang The "struct kvm_vcpu *vcpu" parameter of svm_check_exit_valid() is not used, so remove it. No functional change intended. Signed-off-by: Jinrong Liang --- arch/x86/kvm/svm/svm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index 6d31d357a83b..bc733dbadbdd 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -3120,7 +3120,7 @@ static void dump_vmcb(struct kvm_vcpu *vcpu) "excp_to:", save->last_excp_to); } -static bool svm_check_exit_valid(struct kvm_vcpu *vcpu, u64 exit_code) +static bool svm_check_exit_valid(u64 exit_code) { return (exit_code < ARRAY_SIZE(svm_exit_handlers) && svm_exit_handlers[exit_code]); @@ -3140,7 +3140,7 @@ static int svm_handle_invalid_exit(struct kvm_vcpu *vcpu, u64 exit_code) int svm_invoke_exit_handler(struct kvm_vcpu *vcpu, u64 exit_code) { - if (!svm_check_exit_valid(vcpu, exit_code)) + if (!svm_check_exit_valid(exit_code)) return svm_handle_invalid_exit(vcpu, exit_code); #ifdef CONFIG_RETPOLINE -- 2.33.1