public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
To: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] arch/x86/kernel/cpu/umwait.c - remove unused variable
Date: Thu, 08 Aug 2019 09:52:09 -0400	[thread overview]
Message-ID: <79734.1565272329@turing-police> (raw)

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);


             reply	other threads:[~2019-08-08 13:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08 13:52 Valdis Klētnieks [this message]
2019-08-08 20:04 ` [PATCH] arch/x86/kernel/cpu/umwait.c - remove unused variable 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=79734.1565272329@turing-police \
    --to=valdis.kletnieks@vt.edu \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox