From: Peter Zijlstra Date: Fri, 17 Oct 2008 10:58:19 +0000 (+0200) Subject: sched: fix the wrong mask_len, cleanup X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b968905292eaa52b25abb7b3e6c0841dac9f03ae;p=linux-beck.git sched: fix the wrong mask_len, cleanup Clean up the division in show_schedstat(). Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched_stats.h b/kernel/sched_stats.h index 81365b3d89f8..67579253b53b 100644 --- a/kernel/sched_stats.h +++ b/kernel/sched_stats.h @@ -9,7 +9,7 @@ static int show_schedstat(struct seq_file *seq, void *v) { int cpu; - int mask_len = (NR_CPUS/32 + 1) * 9; + int mask_len = DIV_ROUND_UP(NR_CPUS, 32) * 9; char *mask_str = kmalloc(mask_len, GFP_KERNEL); if (mask_str == NULL)