lkml.org 
[lkml]   [2019]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] arch/x86/kernel/cpu/umwait.c - remove unused variable
Date
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);
\
 
 \ /
  Last update: 2019-08-08 15:53    [W:0.054 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site