mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86: kvm: x86: Remove unnecessary initial values of variables
@ 2023-08-17  0:26 Li zeming
  2023-08-18  0:09 ` Sean Christopherson
  0 siblings, 1 reply; 2+ messages in thread
From: Li zeming @ 2023-08-17  0:26 UTC (permalink / raw)
  To: seanjc, pbonzini, tglx, mingo, bp, dave.hansen
  Cc: x86, kvm, linux-kernel, Li zeming

bitmap and khz is assigned first, so it does not need to initialize the
assignment.

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


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

* Re: [PATCH] x86: kvm: x86: Remove unnecessary initial values of variables
  2023-08-17  0:26 [PATCH] x86: kvm: x86: Remove unnecessary initial values of variables Li zeming
@ 2023-08-18  0:09 ` Sean Christopherson
  0 siblings, 0 replies; 2+ messages in thread
From: Sean Christopherson @ 2023-08-18  0:09 UTC (permalink / raw)
  To: Sean Christopherson, pbonzini, tglx, mingo, bp, dave.hansen, Li zeming
  Cc: x86, kvm, linux-kernel

On Thu, 17 Aug 2023 08:26:31 +0800, Li zeming wrote:
> bitmap and khz is assigned first, so it does not need to initialize the
> assignment.
> 
> 

Applied to kvm-x86 misc, thanks!

[1/1] x86: kvm: x86: Remove unnecessary initial values of variables
      https://github.com/kvm-x86/linux/commit/392a53246257

--
https://github.com/kvm-x86/linux/tree/next
https://github.com/kvm-x86/linux/tree/fixes

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

end of thread, other threads:[~2023-08-18  0:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-17  0:26 [PATCH] x86: kvm: x86: Remove unnecessary initial values of variables Li zeming
2023-08-18  0:09 ` Sean Christopherson

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

all inboxes | Powered by JetHome®