ChangeSet 1.2231.1.169, 2005/03/28 20:03:25-08:00, [EMAIL PROTECTED]
[PATCH] alpha: elimitate two warnings from gcc4
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
smp.c | 43 -------------------------------------------
srmcons.c | 27 ++++++++++-----------------
2 files changed, 10 insertions(+), 60 deletions(-)
diff -Nru a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
--- a/arch/alpha/kernel/smp.c 2005-03-28 21:43:46 -08:00
+++ b/arch/alpha/kernel/smp.c 2005-03-28 21:43:46 -08:00
@@ -175,48 +175,6 @@
cpu_idle();
}
-
-/*
- * Rough estimation for SMP scheduling, this is the number of cycles it
- * takes for a fully memory-limited process to flush the SMP-local cache.
- *
- * We are not told how much cache there is, so we have to guess.
- */
-static void __init
-smp_tune_scheduling (int cpuid)
-{
- struct percpu_struct *cpu;
- unsigned long on_chip_cache; /* kB */
- unsigned long freq; /* Hz */
- unsigned long bandwidth = 350; /* MB/s */
-
- cpu = (struct percpu_struct*)((char*)hwrpb + hwrpb->processor_offset
- + cpuid * hwrpb->processor_size);
- switch (cpu->type)
- {
- case EV45_CPU:
- on_chip_cache = 16 + 16;
- break;
-
- case EV5_CPU:
- case EV56_CPU:
- on_chip_cache = 8 + 8 + 96;
- break;
-
- case PCA56_CPU:
- on_chip_cache = 16 + 8;
- break;
-
- case EV6_CPU:
- case EV67_CPU:
- default:
- on_chip_cache = 64 + 64;
- break;
- }
-
- freq = hwrpb->cycle_freq ? : est_cycle_freq;
-}
-
/* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */
static int __init
wait_for_txrdy (unsigned long cpumask)
@@ -517,7 +475,6 @@
current_thread_info()->cpu = boot_cpuid;
smp_store_cpu_info(boot_cpuid);
- smp_tune_scheduling(boot_cpuid);
smp_setup_percpu_timer(boot_cpuid);
/* Nothing to do on a UP box, or when told not to. */
diff -Nru a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c
--- a/arch/alpha/kernel/srmcons.c 2005-03-28 21:43:46 -08:00
+++ b/arch/alpha/kernel/srmcons.c 2005-03-28 21:43:46 -08:00
@@ -164,29 +164,22 @@
unsigned long flags;
int retval = 0;
- spin_lock_irqsave(&srmconsp_lock, flags);
-
- do {
- if (srmconsp != NULL) {
- *ps = srmconsp;
- break;
- }
+ if (srmconsp == NULL) {
+ spin_lock_irqsave(&srmconsp_lock, flags);
srmconsp = kmalloc(sizeof(*srmconsp), GFP_KERNEL);
- if (srmconsp == NULL) {
+ if (srmconsp == NULL)
retval = -ENOMEM;
- break;
+ else {
+ srmconsp->tty = NULL;
+ spin_lock_init(&srmconsp->lock);
+ init_timer(&srmconsp->timer);
}
- srmconsp->tty = NULL;
- spin_lock_init(&srmconsp->lock);
- init_timer(&srmconsp->timer);
-
- *ps = srmconsp;
- } while(0);
-
- spin_unlock_irqrestore(&srmconsp_lock, flags);
+ spin_unlock_irqrestore(&srmconsp_lock, flags);
+ }
+ *ps = srmconsp;
return retval;
}
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html