From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752098AbdCAJ1s (ORCPT ); Wed, 1 Mar 2017 04:27:48 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33828 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751954AbdCAJ1k (ORCPT ); Wed, 1 Mar 2017 04:27:40 -0500 Date: Wed, 1 Mar 2017 10:26:07 +0100 From: Ingo Molnar To: Arnd Bergmann Cc: Greg Kroah-Hartman , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Vitaly Kuznetsov , devel@linuxdriverproject.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] hv: hide unused label Message-ID: <20170301092607.GA7165@gmail.com> References: <20170214211736.2641241-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170214211736.2641241-1-arnd@arndb.de> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Arnd Bergmann 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 > --- > 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