]> git.hungrycats.org Git - linux/commitdiff
Drivers: hv: vmbus: fix build warning
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Fri, 11 Dec 2015 08:53:11 +0000 (14:23 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:03:46 +0000 (11:03 +0100)
commit 9220e39b5c900c67ddcb517d52fe52d90fb5e3c8 upstream.

We were getting build warning about unused variable "tsc_msr" and
"va_tsc" while building for i386 allmodconfig.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/hv.c

index d415a804fd2656fd6ea8d32836c0dd39a52f3380..9a8976a79b29283799bc650595eb0bf12692cfdc 100644 (file)
@@ -195,9 +195,7 @@ int hv_init(void)
 {
        int max_leaf;
        union hv_x64_msr_hypercall_contents hypercall_msr;
-       union hv_x64_msr_hypercall_contents tsc_msr;
        void *virtaddr = NULL;
-       void *va_tsc = NULL;
 
        memset(hv_context.synic_event_page, 0, sizeof(void *) * NR_CPUS);
        memset(hv_context.synic_message_page, 0,
@@ -243,6 +241,9 @@ int hv_init(void)
 
 #ifdef CONFIG_X86_64
        if (ms_hyperv.features & HV_X64_MSR_REFERENCE_TSC_AVAILABLE) {
+               union hv_x64_msr_hypercall_contents tsc_msr;
+               void *va_tsc;
+
                va_tsc = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL);
                if (!va_tsc)
                        goto cleanup;