Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp2030389rdb; Thu, 17 Aug 2023 08:48:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFY1BqLX5LOTwe5KhERcjVLAPJemAtsG6ikOYXAf7ejr7kShKKg5QOm6lBJNZsjFsw6xLII X-Received: by 2002:a05:6a00:2e1b:b0:671:4b06:4ea7 with SMTP id fc27-20020a056a002e1b00b006714b064ea7mr6123206pfb.15.1692287312238; Thu, 17 Aug 2023 08:48:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692287312; cv=none; d=google.com; s=arc-20160816; b=diEoM1MbLjny3wA3bZysHF2qSvmlm32szSnVHHIjsbYNIv46HZLNa9mS7zboQ3rLBu 4xkvzqTAQ0m/mLzdu58AUDGrqU8jP9GxX0Rsf3y5P5LrK6zO29w1o4L454U99Rrjm21g ItJxKMHEiyd85HnCL/QRvMR0JNZxBHMFgTLS7tq8kiol6fKOeiT+/jLEDLNr7cTSWRYR 70pMgZiDMCSkCPywqN03nKFud+KXbF9G458+D4OWQeocvz4cPJew+QW+fALjLY/CrOI0 YMZkjpH3oasaMmyPxERz7hF6hQqiEVXXBITny8gJ/pSzXjyed9GeYBYhiCUTZZwWKtnc xHNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=3bDjTNZPUN+4l5z/qJXnfYAdx4uhmRGhuU+VqhAUc+E=; fh=IoUF6y7XmMu+X/UOYo8X+vkNPh5kwjE5ke/ivkao5Gk=; b=yxDztyLUx1JUAGD0Nyk4J/uOPgmaWhZOMd7sOxWbvZQ5S2wvHsQiyMfHlz/1pq8ip3 X8STNxDGwRR6agnzMdTXco+JzA8hfZtJCI15W5eT5ElBG9N8/O0WoLvWNqtI/8tBu8Vs s7lozZOU+S/iDIUfte8S6O6wDXN2pjYadXEqScM/GsswvB9q7EwMXXzRv7jx4wS6S2yo Ak3/aDRwDD8BtUaP8KzUujWem7mNfYA5Ev1NKMkgy+5IYgpk+UsAguu4tkmBgIh2tQD+ FcsUs3qEt4teFMivQLG0ndvl2vtC54AGW3RkJp611d9TBZHlfnyny1t6zudOctI21YVw vhqA== 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 ca20-20020a056a02069400b005655bf61e32si13370627pgb.23.2023.08.17.08.48.18; Thu, 17 Aug 2023 08:48: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 S235481AbjHOH4L (ORCPT + 99 others); Tue, 15 Aug 2023 03:56:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235485AbjHOH4B (ORCPT ); Tue, 15 Aug 2023 03:56:01 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 237EADD; Tue, 15 Aug 2023 00:55:58 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 8116460280B60; Tue, 15 Aug 2023 15:55:16 +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] x86: kvm: x86: Remove unnecessary initial values of variables Date: Thu, 17 Aug 2023 08:26:31 +0800 Message-Id: <20230817002631.2885-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 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 bitmap and khz is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming --- arch/x86/kvm/x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 278dbd37dab2..62715bb4754d 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -6529,7 +6529,7 @@ static void kvm_free_msr_filter(struct kvm_x86_msr_filter *msr_filter) static int kvm_add_msr_filter(struct kvm_x86_msr_filter *msr_filter, struct kvm_msr_filter_range *user_range) { - unsigned long *bitmap = NULL; + unsigned long *bitmap; size_t bitmap_size; if (!user_range->nmsrs) @@ -9169,7 +9169,7 @@ static int kvmclock_cpu_down_prep(unsigned int cpu) static void tsc_khz_changed(void *data) { struct cpufreq_freqs *freq = data; - unsigned long khz = 0; + unsigned long khz; WARN_ON_ONCE(boot_cpu_has(X86_FEATURE_CONSTANT_TSC)); -- 2.18.2