Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=422278ef9585b0be62b1bd6d48935a7529aa5094
Commit:     422278ef9585b0be62b1bd6d48935a7529aa5094
Parent:     a6fbb1c8c312be902f1085824c98ca50c86d5893
Author:     Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Fri Feb 1 23:09:35 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Fri Feb 1 23:09:35 2008 +0100

    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 <[EMAIL PROTECTED]>
---
 drivers/ide/ide-probe.c |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 00b2b07..84810aa 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -998,19 +998,14 @@ static int init_irq (ide_hwif_t *hwif)
                hwgroup->hwif->next = hwif;
                spin_unlock_irq(&ide_lock);
        } else {
-               hwgroup = kmalloc_node(sizeof(ide_hwgroup_t),
-                                       GFP_KERNEL | __GFP_ZERO,
-                                       hwif_to_node(hwif->drives[0].hwif));
-               if (!hwgroup)
-                       goto out_up;
+               hwgroup = kmalloc_node(sizeof(*hwgroup), GFP_KERNEL|__GFP_ZERO,
+                                      hwif_to_node(hwif));
+               if (hwgroup == NULL)
+                       goto out_up;
 
                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);
                hwgroup->timer.function = &ide_timer_expiry;
                hwgroup->timer.data = (unsigned long) hwgroup;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to