[tip:tmp.smp/hotplug 32/61] arch/x86/kvm/x86.c:5665:15: warning: unused variable 'cpu'
From: kbuild test robot
Date: Mon Jul 11 2016 - 13:41:13 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.smp/hotplug
head: b0cafca43cf443e8134f60b19bc1efe4ddceb76f
commit: 0579587ed3c87adbdbc6cf77daa7accc35871982 [32/61] KVM/x86: Remove superfluous SMP function call
config: x86_64-randconfig-r0-07120052 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
git checkout 0579587ed3c87adbdbc6cf77daa7accc35871982
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
arch/x86/kvm/x86.c: In function 'kvmclock_cpu_notifier':
>> arch/x86/kvm/x86.c:5665:15: warning: unused variable 'cpu' [-Wunused-variable]
unsigned int cpu = (unsigned long)hcpu;
^~~
vim +/cpu +5665 arch/x86/kvm/x86.c
c8076604 Gerd Hoffmann 2009-02-04 5649 * to kick the cpu out of guest context. Next time
c8076604 Gerd Hoffmann 2009-02-04 5650 * guest context is entered kvmclock will be updated,
c8076604 Gerd Hoffmann 2009-02-04 5651 * so the guest will not see stale values.
c8076604 Gerd Hoffmann 2009-02-04 5652 */
8cfdc000 Zachary Amsden 2010-08-19 5653 smp_call_function_single(freq->cpu, tsc_khz_changed, freq, 1);
c8076604 Gerd Hoffmann 2009-02-04 5654 }
c8076604 Gerd Hoffmann 2009-02-04 5655 return 0;
c8076604 Gerd Hoffmann 2009-02-04 5656 }
c8076604 Gerd Hoffmann 2009-02-04 5657
c8076604 Gerd Hoffmann 2009-02-04 5658 static struct notifier_block kvmclock_cpufreq_notifier_block = {
c8076604 Gerd Hoffmann 2009-02-04 5659 .notifier_call = kvmclock_cpufreq_notifier
c8076604 Gerd Hoffmann 2009-02-04 5660 };
c8076604 Gerd Hoffmann 2009-02-04 5661
8cfdc000 Zachary Amsden 2010-08-19 5662 static int kvmclock_cpu_notifier(struct notifier_block *nfb,
8cfdc000 Zachary Amsden 2010-08-19 5663 unsigned long action, void *hcpu)
8cfdc000 Zachary Amsden 2010-08-19 5664 {
8cfdc000 Zachary Amsden 2010-08-19 @5665 unsigned int cpu = (unsigned long)hcpu;
8cfdc000 Zachary Amsden 2010-08-19 5666
8cfdc000 Zachary Amsden 2010-08-19 5667 switch (action) {
8cfdc000 Zachary Amsden 2010-08-19 5668 case CPU_ONLINE:
8cfdc000 Zachary Amsden 2010-08-19 5669 case CPU_DOWN_FAILED:
0579587e Anna-Maria Gleixner 2016-07-11 5670 tsc_khz_changed(NULL);
8cfdc000 Zachary Amsden 2010-08-19 5671 break;
8cfdc000 Zachary Amsden 2010-08-19 5672 case CPU_DOWN_PREPARE:
0579587e Anna-Maria Gleixner 2016-07-11 5673 tsc_bad(NULL);
:::::: The code at line 5665 was first introduced by commit
:::::: 8cfdc0008542b57caadbfe013da163131a8293f4 KVM: x86: Make cpu_tsc_khz updates use local CPU
:::::: TO: Zachary Amsden <zamsden@xxxxxxxxxx>
:::::: CC: Avi Kivity <avi@xxxxxxxxxx>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: Binary data