Skip to contentSkip to conversation

cpu.c: remove unused variable

PATCH In review Dhaval Giani 2 participants 3 messages Nov 18, 2010 CPU hotplug

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpu.c: remove unused variable

cpu.c: remove unused variable

kernel/cpu.c: In function ‘take_cpu_down’:
kernel/cpu.c:200:15: warning: unused variable ‘cpu’

This variable is unused since param->hcpu is directly used later on in cpu_notify.

---
 kernel/cpu.c |    1 -
 1 file changed, 1 deletion(-)
kernel/cpu.c +0 -1
Index: linux-2.6/kernel/cpu.c
===================================================================
@@ -197,7 +197,6 @@ struct take_cpu_down_param {
 static int __ref take_cpu_down(void *_param)
 {
 	struct take_cpu_down_param *param = _param;
-	unsigned int cpu = (unsigned long)param->hcpu;
 	int err;
 
 	/* Ensure this CPU doesn't handle any more interrupts. */
#1 lore raw

kernel/cpu.c struct take_cpu_down_param { · line 200

Quoted 9 lines · Dhaval Giani
kernel/cpu.c +0 -1
@@ -197,7 +197,6 @@ struct take_cpu_down_param {
 static int __ref take_cpu_down(void *_param)
 {
 	struct take_cpu_down_param *param = _param;
-	unsigned int cpu = (unsigned long)param->hcpu;
 	int err;

This is on top of Peter's patch, I guess.

Agreed, it looks unused.

Oleg.

#2 lore raw
Quoted 13 lines · Oleg Nesterov

kernel/cpu.c struct take_cpu_down_param { · line 200

Quoted 9 lines · Dhaval Giani
kernel/cpu.c +0 -1
@@ -197,7 +197,6 @@ struct take_cpu_down_param {
  static int __ref take_cpu_down(void *_param)
  {
       struct take_cpu_down_param *param = _param;
-     unsigned int cpu = (unsigned long)param->hcpu;
       int err;

This is on top of Peter's patch, I guess.

current tip/master, so I guess so :-) Now if I can just figure out why this configuration mess does not boot for me ;-)

Dhaval