Skip to contentSkip to conversation

arch/x86/smpboot.c: Fix GCC Warning (unused variable)!

PATCH In review Raphael S.Carvalho 3 participants 3 messages Mar 5, 2013 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch/x86/smpboot.c: Fix GCC Warning (unused variable)!

GCC complained about the unused variable c, thus I'm sending this patch in order to calm it down.
I compiled the file and everything seems be ok!

---
 arch/x86/kernel/smpboot.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/smpboot.c +1 -1
index a6ceaed..77a5616 100644
@@ -1367,7 +1367,7 @@ static inline void mwait_play_dead(void)
 	unsigned int highest_subcstate = 0;
 	int i;
 	void *mwait_ptr;
-	struct cpuinfo_x86 *c = __this_cpu_ptr(&cpu_info);
+	__this_cpu_ptr(&cpu_info);
 
 	if (!this_cpu_has(X86_FEATURE_MWAIT))
 		return;
Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 3 lines · Raphael S.Carvalho

GCC complained about the unused variable c, thus I'm sending this patch in order to calm it down.
I compiled the file and everything seems be ok!

What is your patch solving? How about removing the line completely? And how about providing a changelog which makes sense ?

Thanks,

tglx

Quoted 22 lines
---
 arch/x86/kernel/smpboot.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/smpboot.c +1 -1
index a6ceaed..77a5616 100644
@@ -1367,7 +1367,7 @@ static inline void mwait_play_dead(void)
 	unsigned int highest_subcstate = 0;
 	int i;
 	void *mwait_ptr;
-	struct cpuinfo_x86 *c = __this_cpu_ptr(&cpu_info);
+	__this_cpu_ptr(&cpu_info);
 
 	if (!this_cpu_has(X86_FEATURE_MWAIT))
 		return;
Signature · 1 line
1.7.2.5
#2 lore raw
Quoted 8 lines · Thomas Gleixner

What is your patch solving? How about removing the line completely? And how about providing a changelog which makes sense ?

Thanks,

tglx

We already have an actually correct patch for this warning; I will apply it later.

-hpa