Re: [PATCH] hv: hide unused label

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Arnd Bergmann <arnd@xxxxxxxx> wrote:

> This new 32-bit warning just showed up:
> 
> arch/x86/hyperv/hv_init.c: In function 'hyperv_init':
> arch/x86/hyperv/hv_init.c:167:1: error: label 'register_msr_cs' defined but not used [-Werror=unused-label]
> 
> The easiest solution is to move the label up into the existing #ifdef that
> has the goto.
> 
> Fixes: dee863b571b0 ("hv: export current Hyper-V clocksource")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
>  arch/x86/hyperv/hv_init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c
> index db64baf0e500..8bef70e7f3cc 100644
> --- a/arch/x86/hyperv/hv_init.c
> +++ b/arch/x86/hyperv/hv_init.c
> @@ -158,13 +158,13 @@ void hyperv_init(void)
>  		clocksource_register_hz(&hyperv_cs_tsc, NSEC_PER_SEC/100);
>  		return;
>  	}
> +register_msr_cs:
>  #endif
>  	/*
>  	 * For 32 bit guests just use the MSR based mechanism for reading
>  	 * the partition counter.
>  	 */
>  
> -register_msr_cs:

Now the warning triggers upstream:

 arch/x86/hyperv/hv_init.c: In function ‘hyperv_init’:
 arch/x86/hyperv/hv_init.c:167:1: warning: label ‘register_msr_cs’ defined but not used [-Wunused-label]

Thanks,

	Ingo
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux