diff options
author | Christoph Lameter <clameter@sgi.com> | 2007-07-17 07:03:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 13:23:02 -0400 |
commit | 94f6030ca792c57422f04a73e7a872d8325946d3 (patch) | |
tree | 0197f24d82b1706f1b0521f2cf68feeff64123df /drivers/ide | |
parent | 81cda6626178cd55297831296ba8ecedbfd8b52d (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 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-probe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index cc5801399467..5a4c5ea12f89 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -1073,14 +1073,14 @@ static int init_irq (ide_hwif_t *hwif) | |||
1073 | hwgroup->hwif->next = hwif; | 1073 | hwgroup->hwif->next = hwif; |
1074 | spin_unlock_irq(&ide_lock); | 1074 | spin_unlock_irq(&ide_lock); |
1075 | } else { | 1075 | } else { |
1076 | hwgroup = kmalloc_node(sizeof(ide_hwgroup_t), GFP_KERNEL, | 1076 | hwgroup = kmalloc_node(sizeof(ide_hwgroup_t), |
1077 | GFP_KERNEL | __GFP_ZERO, | ||
1077 | hwif_to_node(hwif->drives[0].hwif)); | 1078 | hwif_to_node(hwif->drives[0].hwif)); |
1078 | if (!hwgroup) | 1079 | if (!hwgroup) |
1079 | goto out_up; | 1080 | goto out_up; |
1080 | 1081 | ||
1081 | hwif->hwgroup = hwgroup; | 1082 | hwif->hwgroup = hwgroup; |
1082 | 1083 | ||
1083 | memset(hwgroup, 0, sizeof(ide_hwgroup_t)); | ||
1084 | hwgroup->hwif = hwif->next = hwif; | 1084 | hwgroup->hwif = hwif->next = hwif; |
1085 | hwgroup->rq = NULL; | 1085 | hwgroup->rq = NULL; |
1086 | hwgroup->handler = NULL; | 1086 | hwgroup->handler = NULL; |