Jack> } Jack> + Jack> +bool is_affinity_mask_valid(cpumask_t cpumask) Jack> +{ Jack> + if (ia64_platform_is("sn2")) { Jack> + /* Only allow one CPU to be specified in the smp_affinity mask */ Jack> + if (cpus_weight(cpumask) != 1) Jack> + return false; Why not just: return cpus_weight(cpumask) == 1; It's a Boolean; treat it as one. (If you thought the average kernel programmer (who's s/he?) understood the logical implication rule it could be: return !ia64_platform_is("sn2") || cpus_weight(cpumask) == 1; ) -- Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au http://www.ertos.nicta.com.au ERTOS within National ICT Australia - To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |