[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230902175431.2925-1-zeming@nfschina.com>
Date: Sun, 3 Sep 2023 01:54:31 +0800
From: Li zeming <zeming@...china.com>
To: seanjc@...gle.com, pbonzini@...hat.com, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com
Cc: x86@...nel.org, kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
Li zeming <zeming@...china.com>
Subject: [PATCH] x86/kvm/mmu: Remove unnecessary ‘NULL’ values from sptep
sptep is assigned first, so it does not need to initialize the assignment.
Signed-off-by: Li zeming <zeming@...china.com>
---
arch/x86/kvm/mmu/mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index ec169f5c7dce..95f745aec4aa 100644
--- a/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -3457,7 +3457,7 @@ static int fast_page_fault(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault)
struct kvm_mmu_page *sp;
int ret = RET_PF_INVALID;
u64 spte = 0ull;
- u64 *sptep = NULL;
+ u64 *sptep;
uint retry_count = 0;
if (!page_fault_can_be_fast(fault))
--
2.18.2
Powered by blists - more mailing lists