public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/kvm/mmu: Remove unnecessary ‘NULL’ values from sptep
@ 2023-09-02 17:54 Li zeming
  2023-09-01 16:48 ` Sean Christopherson
  0 siblings, 1 reply; 5+ messages in thread
From: Li zeming @ 2023-09-02 17:54 UTC (permalink / raw)
  To: seanjc, pbonzini, tglx, mingo, bp, dave.hansen
  Cc: x86, kvm, linux-kernel, Li zeming

sptep is assigned first, so it does not need to initialize the assignment.

Signed-off-by: Li zeming <zeming@nfschina.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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-09-05 23:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-02 17:54 [PATCH] x86/kvm/mmu: Remove unnecessary ‘NULL’ values from sptep Li zeming
2023-09-01 16:48 ` Sean Christopherson
2023-09-04 10:39   ` Huang, Kai
2023-09-05 21:09     ` Sean Christopherson
2023-09-05 23:31       ` Huang, Kai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox