linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hv: hide unused label
@ 2017-02-14 21:17 Arnd Bergmann
  2017-02-17 17:03 ` Stephen Hemminger
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Arnd Bergmann @ 2017-02-14 21:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Arnd Bergmann, K. Y. Srinivasan, Haiyang Zhang,
	Stephen Hemminger, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Vitaly Kuznetsov, devel, linux-kernel

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@arndb.de>
---
 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:
 	hyperv_cs = &hyperv_cs_msr;
 	if (ms_hyperv.features & HV_X64_MSR_TIME_REF_COUNT_AVAILABLE)
 		clocksource_register_hz(&hyperv_cs_msr, NSEC_PER_SEC/100);
-- 
2.9.0

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

* Re: [PATCH] hv: hide unused label
  2017-02-14 21:17 [PATCH] hv: hide unused label Arnd Bergmann
@ 2017-02-17 17:03 ` Stephen Hemminger
  2017-03-01  9:26 ` Ingo Molnar
  2017-03-01  9:54 ` [tip:x86/urgent] x86/hyperv: Hide " tip-bot for Arnd Bergmann
  2 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2017-02-17 17:03 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Greg Kroah-Hartman, Stephen Hemminger, Haiyang Zhang, x86,
	linux-kernel, Ingo Molnar, H. Peter Anvin, devel,
	Thomas Gleixner

On Tue, 14 Feb 2017 22:17:17 +0100
Arnd Bergmann <arnd@arndb.de> 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@arndb.de>

Acked-by: Stephen Hemminger <sthemmin@microsoft.com>

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

* Re: [PATCH] hv: hide unused label
  2017-02-14 21:17 [PATCH] hv: hide unused label Arnd Bergmann
  2017-02-17 17:03 ` Stephen Hemminger
@ 2017-03-01  9:26 ` Ingo Molnar
  2017-03-01  9:54 ` [tip:x86/urgent] x86/hyperv: Hide " tip-bot for Arnd Bergmann
  2 siblings, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2017-03-01  9:26 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Greg Kroah-Hartman, K. Y. Srinivasan, Haiyang Zhang,
	Stephen Hemminger, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Vitaly Kuznetsov, devel, linux-kernel


* Arnd Bergmann <arnd@arndb.de> 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@arndb.de>
> ---
>  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

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

* [tip:x86/urgent] x86/hyperv: Hide unused label
  2017-02-14 21:17 [PATCH] hv: hide unused label Arnd Bergmann
  2017-02-17 17:03 ` Stephen Hemminger
  2017-03-01  9:26 ` Ingo Molnar
@ 2017-03-01  9:54 ` tip-bot for Arnd Bergmann
  2 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Arnd Bergmann @ 2017-03-01  9:54 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, mingo, haiyangz, tglx, arnd, sthemmin, vkuznets,
	hpa, gregkh, kys

Commit-ID:  73667e31a153a66da97feb1584726222504924f8
Gitweb:     http://git.kernel.org/tip/73667e31a153a66da97feb1584726222504924f8
Author:     Arnd Bergmann <arnd@arndb.de>
AuthorDate: Tue, 14 Feb 2017 22:17:17 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 1 Mar 2017 10:51:40 +0100

x86/hyperv: Hide unused label

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@arndb.de>
Acked-by: Stephen Hemminger <sthemmin@microsoft.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: devel@linuxdriverproject.org
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Link: http://lkml.kernel.org/r/20170214211736.2641241-1-arnd@arndb.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 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 db64baf0..8bef70e 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:
 	hyperv_cs = &hyperv_cs_msr;
 	if (ms_hyperv.features & HV_X64_MSR_TIME_REF_COUNT_AVAILABLE)
 		clocksource_register_hz(&hyperv_cs_msr, NSEC_PER_SEC/100);

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

end of thread, other threads:[~2017-03-01 10:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-14 21:17 [PATCH] hv: hide unused label Arnd Bergmann
2017-02-17 17:03 ` Stephen Hemminger
2017-03-01  9:26 ` Ingo Molnar
2017-03-01  9:54 ` [tip:x86/urgent] x86/hyperv: Hide " tip-bot for Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).