Name: Remove Useless cpumask Initializers Status: Untested Signed-off-by: Rusty Russell Some places cpumasks are initialized and don't need to be, AFAICT. Index: linux-2.6.13-rc4-git3-Misc/arch/i386/kernel/cpu/cpufreq/powernow-k8.c =================================================================== --- linux-2.6.13-rc4-git3-Misc.orig/arch/i386/kernel/cpu/cpufreq/powernow-k8.c 2005-08-01 11:31:21.000000000 +1000 +++ linux-2.6.13-rc4-git3-Misc/arch/i386/kernel/cpu/cpufreq/powernow-k8.c 2005-08-01 16:31:35.000000000 +1000 @@ -447,7 +447,7 @@ static int check_supported_cpu(unsigned int cpu) { - cpumask_t oldmask = CPU_MASK_ALL; + cpumask_t oldmask; u32 eax, ebx, ecx, edx; unsigned int rc = 0; @@ -893,7 +893,7 @@ /* Driver entry point to switch to the target frequency */ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsigned relation) { - cpumask_t oldmask = CPU_MASK_ALL; + cpumask_t oldmask; struct powernow_k8_data *data = powernow_data[pol->cpu]; u32 checkfid = data->currfid; u32 checkvid = data->currvid; @@ -976,7 +976,7 @@ static int __init powernowk8_cpu_init(struct cpufreq_policy *pol) { struct powernow_k8_data *data; - cpumask_t oldmask = CPU_MASK_ALL; + cpumask_t oldmask; int rc, i; if (!check_supported_cpu(pol->cpu)) Index: linux-2.6.13-rc4-git3-Misc/arch/ppc64/kernel/xics.c =================================================================== --- linux-2.6.13-rc4-git3-Misc.orig/arch/ppc64/kernel/xics.c 2005-08-01 11:29:55.000000000 +1000 +++ linux-2.6.13-rc4-git3-Misc/arch/ppc64/kernel/xics.c 2005-08-01 16:31:35.000000000 +1000 @@ -242,22 +242,19 @@ static int get_irq_server(unsigned int irq) { unsigned int server; - /* For the moment only implement delivery to all cpus or one cpu */ - cpumask_t cpumask = irq_affinity[irq]; - cpumask_t tmp = CPU_MASK_NONE; if (!distribute_irqs) return default_server; + /* For the moment only implement delivery to all cpus or one cpu */ if (cpus_equal(cpumask, CPU_MASK_ALL)) { server = default_distrib_server; } else { - cpus_and(tmp, cpu_online_map, cpumask); - - if (cpus_empty(tmp)) + int cpu = any_online_cpu(irq_affinity[irq]); + if (cpu == NR_CPUS) server = default_distrib_server; else - server = get_hard_smp_processor_id(first_cpu(tmp)); + server = get_hard_smp_processor_id(cpu); } return server; @@ -613,7 +610,6 @@ int status; int xics_status[2]; unsigned long newmask; - cpumask_t tmp = CPU_MASK_NONE; irq = virt_irq_to_real(irq_offset_down(virq)); if (irq == XICS_IPI || irq == NO_IRQ)