public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arch/x86/kernel/cpu/umwait.c - remove unused variable
@ 2019-08-08 13:52 Valdis Klētnieks
  2019-08-08 20:04 ` Thomas Gleixner
  0 siblings, 1 reply; 9+ messages in thread
From: Valdis Klētnieks @ 2019-08-08 13:52 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov; +Cc: x86, linux-kernel

We get a warning when building with W=1:

  CC      arch/x86/kernel/cpu/umwait.o
arch/x86/kernel/cpu/umwait.c: In function 'umwait_init':
arch/x86/kernel/cpu/umwait.c:183:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
  183 |  int ret;
      |      ^~~

And indeed, we don't do anything with it, so clean it  up.

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>

diff --git a/arch/x86/kernel/cpu/umwait.c b/arch/x86/kernel/cpu/umwait.c
index 6a204e7336c1..3d1d3952774a 100644
--- a/arch/x86/kernel/cpu/umwait.c
+++ b/arch/x86/kernel/cpu/umwait.c
@@ -180,12 +180,11 @@ static struct attribute_group umwait_attr_group = {
 static int __init umwait_init(void)
 {
 	struct device *dev;
-	int ret;
 
 	if (!boot_cpu_has(X86_FEATURE_WAITPKG))
 		return -ENODEV;
 
-	ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "umwait:online",
+	cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "umwait:online",
 				umwait_cpu_online, NULL);
 
 	register_syscore_ops(&umwait_syscore_ops);


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

end of thread, other threads:[~2019-08-09 19:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-08 13:52 [PATCH] arch/x86/kernel/cpu/umwait.c - remove unused variable Valdis Klētnieks
2019-08-08 20:04 ` Thomas Gleixner
2019-08-08 20:24   ` Valdis Klētnieks
2019-08-08 20:32     ` Thomas Gleixner
2019-08-08 22:04       ` Valdis Klētnieks
2019-08-09  0:44       ` Fenghua Yu
2019-08-09  9:49         ` Thomas Gleixner
2019-08-09 15:30           ` Fenghua Yu
2019-08-09 19:37             ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox