Messages in this thread Patch in this message | | | From | "Valdis Klētnieks" <> | Subject | [PATCH] arch/x86/kernel/cpu/umwait.c - remove unused variable | Date | Thu, 08 Aug 2019 09:52:09 -0400 |
| |
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);
| |