Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4246575pxb; Tue, 25 Jan 2022 06:36:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7NhYsZlq7irYysxaB9N1QZ7jX1IWf/d+9hL7edO2naw00ELZqmhJ0kQb1TiXFg6wAEW8n X-Received: by 2002:a17:906:7948:: with SMTP id l8mr15968262ejo.290.1643121411927; Tue, 25 Jan 2022 06:36:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643121411; cv=none; d=google.com; s=arc-20160816; b=e/+Uw446swPjUkUVT3VZ2LhN3CZW3cNrnjP/d+HqZ6QlfvRAHleTntYFknu43xhqem OKjo/2H6qhqq/Db4mCDE2HBSiFixxt6k8sRTpJ8LefTSVwo0rvw8mMNsuFFMJj+tc8zJ 0WiQhfUZIJzvZZ681674UJc6XoUN5IDEDodSNcd8cFojA+gXOBt99s9LHd8UuhqO98p6 +E0IiZBplrYhv13+pngpVSID0FZfoUbtJMyLZSIIH9TYhEFgR7Uobfhg9Am/zkWWw1rH QHFAq+SxYulC7SgGJzkiaLrbS45caI04jrk80z1wcPbuWLnqU+TWZA+2u8FbY3UkarZN NDlw== 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=zKa7O9jly0TmC+XlGqqr6BfbIZ5VWJb9uLLAbrIft7I=; b=wO6/sjDUDmjERsqwM34rB6zApetMFg8tvxx/LV0b/7iBd+wqAqPoFs8pTg8lYePsMU NEi+Xmvc3NZRHx16iprBhBIMUcA0jUe/kU4trLbO+q87Hv7VtkgTBD8IencCIZpSCaOg 2p9RW1T9GfWH/ozSeIiYn2dtjjQ8zWVVS1ninMlps/mY2E1GRYd3jxJFozJAQHYrCEGe HI+t4N2eD4bwhjjEXX/BcbRDJ6FdBzs4SumHEewf21qHKEuh69+4xfyw2UjgKjuiUe06 hJlp2qggxax5O68EpNpChpP1LUyL2t/7qtnlPSi5rTjRyWsHKuGFA0VRzXlsGvJ/6pbA pdKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=N0bWDnPV; 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 dt8si2952474ejc.121.2022.01.25.06.36.26; Tue, 25 Jan 2022 06:36:51 -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=N0bWDnPV; 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 S239090AbiAYKDe (ORCPT + 99 others); Tue, 25 Jan 2022 05:03:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238413AbiAYJ72 (ORCPT ); Tue, 25 Jan 2022 04:59:28 -0500 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C105BC06173D; Tue, 25 Jan 2022 01:59:27 -0800 (PST) Received: by mail-pg1-x541.google.com with SMTP id 133so17875929pgb.0; Tue, 25 Jan 2022 01:59:27 -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=zKa7O9jly0TmC+XlGqqr6BfbIZ5VWJb9uLLAbrIft7I=; b=N0bWDnPVNDhPyw9vRxjj9dkZtaXUb2VFb7HUs8semTHvhI/1Hd7Hpg9GNm+ML1uuwr /FzSQSLrx8UnlpyDh9fGJnm+T/jKcqPZ1TlPV6NPXlcNlOE9Ifq8SpaPajGGZJ0vK3Lg 2EkE3at11G5IuzfQxA+PrPspn/zspzLS4od1dsKl9icgvhPUbxk9E5LitonWzPMO6r6w zbDEaKJx0+g7AyHm0WEN20Na4//L6325eQK50QbABBAgupk9CPC8MQpbiKtlUp7BtSSy PgQmaJzaTlnDbd9LZGUBwuoKMUpZi13MmsbwOnn5HMipT9iwSh+kmYUFd8QRB9QINgB+ E5iA== 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=zKa7O9jly0TmC+XlGqqr6BfbIZ5VWJb9uLLAbrIft7I=; b=HIlUmhcsfVrpAusqrGzqDwFLYBjg7xOG/fovGz4Nj5as6/8ik04NE09gDzAs7As5ry r6Y2WGK1MJHmQ2DQJzmnx5jPh3NylQhaxJbPSZ1a7RlkGDIuv7xA4vXodaGLSnzpf9NU RWGaVsR/Dz+B5Mc7HP3YHl/Ld/XxJZ68Cdx8MuGQkIEDOGS6PE/UuOcesMDe+yE4Mqbq jl4jLA2YTnFhs9a20Nz3P0eszbW/m/UU7Mh12Xiv9ECm6ycoB76mxPBBUgOdzwaQP1FN Tw7C1PhHuYgf4MOsI7S2+SFahiunuIVkJzX/eMafDDdmCiGnqCWJbA1n5QR4JbhpU+Qa m+mw== X-Gm-Message-State: AOAM532a62sHQ6MJo0iiteiIDwgtmkw4FOs+G3BoPn1cxS4lg9t7leFV jEXNc9KhbE/81cEhU/0hlAk= X-Received: by 2002:a63:f452:: with SMTP id p18mr14741473pgk.545.1643104767312; Tue, 25 Jan 2022 01:59:27 -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.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jan 2022 01:59:27 -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 04/19] KVM: x86/tdp_mmu: Remove unused "kvm" of kvm_tdp_mmu_get_root() Date: Tue, 25 Jan 2022 17:58:54 +0800 Message-Id: <20220125095909.38122-5-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 *kvm" parameter of kvm_tdp_mmu_get_root() is not used, so remove it. No functional change intended. Signed-off-by: Jinrong Liang --- arch/x86/kvm/mmu/tdp_mmu.c | 4 ++-- arch/x86/kvm/mmu/tdp_mmu.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c index bc9e3553fba2..d0c85d114574 100644 --- a/arch/x86/kvm/mmu/tdp_mmu.c +++ b/arch/x86/kvm/mmu/tdp_mmu.c @@ -121,7 +121,7 @@ static struct kvm_mmu_page *tdp_mmu_next_root(struct kvm *kvm, next_root = list_first_or_null_rcu(&kvm->arch.tdp_mmu_roots, typeof(*next_root), link); - while (next_root && !kvm_tdp_mmu_get_root(kvm, next_root)) + while (next_root && !kvm_tdp_mmu_get_root(next_root)) next_root = list_next_or_null_rcu(&kvm->arch.tdp_mmu_roots, &next_root->link, typeof(*next_root), link); @@ -203,7 +203,7 @@ hpa_t kvm_tdp_mmu_get_vcpu_root_hpa(struct kvm_vcpu *vcpu) /* Check for an existing root before allocating a new one. */ for_each_tdp_mmu_root(kvm, root, kvm_mmu_role_as_id(role)) { if (root->role.word == role.word && - kvm_tdp_mmu_get_root(kvm, root)) + kvm_tdp_mmu_get_root(root)) goto out; } diff --git a/arch/x86/kvm/mmu/tdp_mmu.h b/arch/x86/kvm/mmu/tdp_mmu.h index 3899004a5d91..599714de67c3 100644 --- a/arch/x86/kvm/mmu/tdp_mmu.h +++ b/arch/x86/kvm/mmu/tdp_mmu.h @@ -7,8 +7,7 @@ hpa_t kvm_tdp_mmu_get_vcpu_root_hpa(struct kvm_vcpu *vcpu); -__must_check static inline bool kvm_tdp_mmu_get_root(struct kvm *kvm, - struct kvm_mmu_page *root) +__must_check static inline bool kvm_tdp_mmu_get_root(struct kvm_mmu_page *root) { if (root->role.invalid) return false; -- 2.33.1