Skip to contentSkip to conversation

kexec gcc 4.1 warning fix

PATCH New Daniel Walker 1 participant 1 message May 10, 2006 kexec

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kexec gcc 4.1 warning fix

Fixes the following warning,

kernel/kexec.c: In function 'sys_kexec_load':
kernel/kexec.c:998: warning: value computed is not used kernel/kexec.c: In function 'crash_kexec':
kernel/kexec.c:1066: warning: value computed is not used

kernel/kexec.c +2 -2
Index: linux-2.6.16/kernel/kexec.c
===================================================================
@@ -995,7 +995,7 @@ asmlinkage long sys_kexec_load(unsigned 
 	image = xchg(dest_image, image);
 
 out:
-	xchg(&kexec_lock, 0); /* Release the mutex */
+	locked = xchg(&kexec_lock, 0); /* Release the mutex */
 	kimage_free(image);
 
 	return result;
@@ -1063,7 +1063,7 @@ void crash_kexec(struct pt_regs *regs)
 			machine_crash_shutdown(&fixed_regs);
 			machine_kexec(image);
 		}
-		xchg(&kexec_lock, 0);
+		locked = xchg(&kexec_lock, 0);
 	}
 }