2006-11-21 20:05:30

by David Binderman

[permalink] [raw]
Subject: arch/x86_64/kernel/smpboot.c(273): remark #593: variable "bound" was set but nev


Hello there,

I just tried to compile Linux kernel 2.6.18.3 with the Intel C
C compiler.

The compiler said

arch/x86_64/kernel/smpboot.c(273): remark #593: variable "bound" was set but
never used

The source code is

unsigned long flags, rt, master_time_stamp, bound;

I have checked the source code and I agree with the compiler.
Suggest delete local variable.

Regards

David Binderman

_________________________________________________________________
Download the new Windows Live Toolbar, including Desktop search!
http://toolbar.live.com/?mkt=en-gb


2006-11-21 20:20:27

by David Rientjes

[permalink] [raw]
Subject: [PATCH] x86_64 smpboot: remove unused variable

Remove unused bound variable in sync_tsc().

Reported by D Binderman <[email protected]>.

Cc: Andi Kleen <[email protected]>
Cc: Alan Cox <[email protected]>
Signed-off-by: David Rientjes <[email protected]>
---
arch/x86_64/kernel/smpboot.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c
index 62c2e74..6bc0ec5 100644
--- a/arch/x86_64/kernel/smpboot.c
+++ b/arch/x86_64/kernel/smpboot.c
@@ -271,7 +271,7 @@ static __cpuinit void sync_tsc(unsigned
{
int i, done = 0;
long delta, adj, adjust_latency = 0;
- unsigned long flags, rt, master_time_stamp, bound;
+ unsigned long flags, rt, master_time_stamp;
#ifdef DEBUG_TSC_SYNC
static struct syncdebug {
long rt; /* roundtrip time */
@@ -300,11 +300,8 @@ #endif
{
for (i = 0; i < NUM_ROUNDS; ++i) {
delta = get_delta(&rt, &master_time_stamp);
- if (delta == 0) {
+ if (delta == 0)
done = 1; /* let's lock on to this... */
- bound = rt;
- }
-
if (!done) {
unsigned long t;
if (i > 0) {