mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 06:55:13 +08:00
ide: remove needless zeroing of hwgroup fields from init_irq()
Since kmalloc_node() is called with __GFP_ZERO flag there is no need to explicitly zero hwgroup fields. While at it: * Use 'hwif' instead of 'hwif->drives[0].hwif' for kmalloc_node() call. * Fix whitespace damage. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
a6fbb1c8c3
commit
422278ef95
@ -998,19 +998,14 @@ static int init_irq (ide_hwif_t *hwif)
|
|||||||
hwgroup->hwif->next = hwif;
|
hwgroup->hwif->next = hwif;
|
||||||
spin_unlock_irq(&ide_lock);
|
spin_unlock_irq(&ide_lock);
|
||||||
} else {
|
} else {
|
||||||
hwgroup = kmalloc_node(sizeof(ide_hwgroup_t),
|
hwgroup = kmalloc_node(sizeof(*hwgroup), GFP_KERNEL|__GFP_ZERO,
|
||||||
GFP_KERNEL | __GFP_ZERO,
|
hwif_to_node(hwif));
|
||||||
hwif_to_node(hwif->drives[0].hwif));
|
if (hwgroup == NULL)
|
||||||
if (!hwgroup)
|
goto out_up;
|
||||||
goto out_up;
|
|
||||||
|
|
||||||
hwif->hwgroup = hwgroup;
|
hwif->hwgroup = hwgroup;
|
||||||
|
hwgroup->hwif = hwif->next = hwif;
|
||||||
|
|
||||||
hwgroup->hwif = hwif->next = hwif;
|
|
||||||
hwgroup->rq = NULL;
|
|
||||||
hwgroup->handler = NULL;
|
|
||||||
hwgroup->drive = NULL;
|
|
||||||
hwgroup->busy = 0;
|
|
||||||
init_timer(&hwgroup->timer);
|
init_timer(&hwgroup->timer);
|
||||||
hwgroup->timer.function = &ide_timer_expiry;
|
hwgroup->timer.function = &ide_timer_expiry;
|
||||||
hwgroup->timer.data = (unsigned long) hwgroup;
|
hwgroup->timer.data = (unsigned long) hwgroup;
|
||||||
|
Loading…
Reference in New Issue
Block a user