aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/timer.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2007-07-17 07:03:29 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-17 13:23:02 -0400
commit94f6030ca792c57422f04a73e7a872d8325946d3 (patch)
tree0197f24d82b1706f1b0521f2cf68feeff64123df /kernel/timer.c
parent81cda6626178cd55297831296ba8ecedbfd8b52d (diff)
Slab allocators: Replace explicit zeroing with __GFP_ZERO
kmalloc_node() and kmem_cache_alloc_node() were not available in a zeroing variant in the past. But with __GFP_ZERO it is possible now to do zeroing while allocating. Use __GFP_ZERO to remove the explicit clearing of memory via memset whereever we can. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/timer.c')
-rw-r--r--kernel/timer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/timer.c b/kernel/timer.c
index 1258371e0d2b..b7792fb03387 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1221,7 +1221,8 @@ static int __devinit init_timers_cpu(int cpu)
1221 /* 1221 /*
1222 * The APs use this path later in boot 1222 * The APs use this path later in boot
1223 */ 1223 */
1224 base = kmalloc_node(sizeof(*base), GFP_KERNEL, 1224 base = kmalloc_node(sizeof(*base),
1225 GFP_KERNEL | __GFP_ZERO,
1225 cpu_to_node(cpu)); 1226 cpu_to_node(cpu));
1226 if (!base) 1227 if (!base)
1227 return -ENOMEM; 1228 return -ENOMEM;
@@ -1232,7 +1233,6 @@ static int __devinit init_timers_cpu(int cpu)
1232 kfree(base); 1233 kfree(base);
1233 return -ENOMEM; 1234 return -ENOMEM;
1234 } 1235 }
1235 memset(base, 0, sizeof(*base));
1236 per_cpu(tvec_bases, cpu) = base; 1236 per_cpu(tvec_bases, cpu) = base;
1237 } else { 1237 } else {
1238 /* 1238 /*