2.1.81 (UP) - warnings in sched.c and floppy.c

rjc@snoopy.virtual.net.au
Mon, 26 Jan 1998 20:12:16 +1100 (EST)


When compiling 2.1.81 I get the warning "sched.c:318: warning:
`timerlist_lock' defined but not used".

Here's a patch which solves this:

diff -ru linux/kernel/sched.c linux-patched/kernel/sched.c
--- linux/kernel/sched.c Mon Jan 26 19:43:30 1998
+++ linux-patched/kernel/sched.c Mon Jan 26 19:44:18 1998
@@ -315,7 +315,9 @@
}
}

+#ifdef __SMP__
static spinlock_t timerlist_lock = SPIN_LOCK_UNLOCKED;
+#endif

void add_timer(struct timer_list *timer)
{

Here's a patch that stops a warning about an unused variable in floppy.c:

diff -ru linux/drivers/block/floppy.c linux-patched/drivers/block/floppy.c
--- linux/drivers/block/floppy.c Mon Jan 26 19:50:56 1998
+++ linux-patched/drivers/block/floppy.c Mon Jan 26 20:11:05 1998
@@ -1710,7 +1710,9 @@
} while ((ST0 & 0x83) != UNIT(current_drive) && inr == 2);
}
if (handler) {
+#ifdef __SMP__
int cpu = smp_processor_id();
+#endif
if(softirq_trylock(cpu)) {
/* got the lock, call the handler immediately */
handler();