Received: by 2002:a05:7412:3210:b0:e2:908c:2ebd with SMTP id eu16csp938528rdb; Fri, 1 Sep 2023 08:13:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHvBrWjj3RbY59+HUT43nJCM+ZJyb1/Fch9/IviLthh944h3GNUCQBzg5R7kNIvK6KQ89rq X-Received: by 2002:a17:906:51d0:b0:993:fba5:cdf1 with SMTP id v16-20020a17090651d000b00993fba5cdf1mr2187145ejk.22.1693581212400; Fri, 01 Sep 2023 08:13:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693581212; cv=none; d=google.com; s=arc-20160816; b=0+z0G2TZaxnApUbfMUWZG+iP+QpyGiBZqRc4BM2Lu5/RWKrDmckLyoP8RT5kimkdgQ eJCVoSCltFj60RZQ/n06VgJnm92zj+oYQeXMOYVYLsZ2gKJPPpwRIc+5LFef1FiNk4Wf fUfLCs9o07OqGg+ohRW9L3nd8cyCabE6Vza0HaoZcc+omQdsPdj9qCYfwFNZMxzsq1uH acgvlrwZyXr3EV/CC/auC3DxDQPeBbNKgDAt2syXMwn/My2dafE+g3rXJP2SukRM29uv 9kmg37mNdcrICCa+vn6C1YbuIcg2iUomScGslmHAXqQYxCCyBkqXQ+1BJ/IT8U4dZxrT XWUQ== 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 :message-id:date:subject:cc:to:from; bh=uKAyfmccZhv6jJRWzl6jIFNFpBq/lhlQ/OAXgCVm+uc=; fh=ykGWL0O8n732j4v+7r3s3a+1NWcKFcz/Yg/StoP2ORA=; b=n1m86PctowBrZLJtT3xmoPWPdIcMpJCF+oBuhPvuGvupIGrrDbK5gvTBbA6fRZzh3i IhDS7LT+wlpOHYiYffekzAweVLSxc5CwFtl3GWZl7fZC+C1NyuEqzPudP4Z/XCznHonK uFLynO0lCv1A+VH5fkbMaY9fyvGyHS50ySQR9UjiyQkzLPiNgkQg4VGZQnEaoyA2Vups bTH6c8w7se4KD2LtebqqAgadxBU2vSYZO/qZeTXJpbpJdNvPLinPgoRLKY8yS22NV6KE +nNf29l5xNulE5s3WeQBC/xKVG1xBtK6e5Cvzv3FGu61YNCu97Rao1EiJcSek5JjyI6n suqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j26-20020a1709064b5a00b009886c3287e0si2771648ejv.536.2023.09.01.08.12.52; Fri, 01 Sep 2023 08:13:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347351AbjIABXq (ORCPT + 99 others); Thu, 31 Aug 2023 21:23:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230294AbjIABXp (ORCPT ); Thu, 31 Aug 2023 21:23:45 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 0FBD195; Thu, 31 Aug 2023 18:23:41 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 1F2E860338645; Fri, 1 Sep 2023 09:23:11 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: seanjc@google.com, pbonzini@redhat.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com Cc: x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?UTF-8?q?x86/kvm/mmu:=20Remove=20unnecessary=20=E2=80=98?= =?UTF-8?q?NULL=E2=80=99=20values=20from=20sptep?= Date: Sun, 3 Sep 2023 01:54:31 +0800 Message-Id: <20230902175431.2925-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_24_48, RDNS_NONE,SPF_HELO_NONE,SPF_PASS 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 sptep is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming --- 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