Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4530a16967a52e7ff6f8840d7e323cfb589fa2ae
Commit:     4530a16967a52e7ff6f8840d7e323cfb589fa2ae
Parent:     b7405e16435f710edfae6ba32bef4ca20d3de145
Author:     [EMAIL PROTECTED] <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 16 11:35:33 2007 +0530
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Sun May 6 09:33:11 2007 -0500

    [SCSI] ch: kmalloc/memset->kzalloc
    
    Replacing kmalloc/memset combination with kzalloc.
    
    Signed-off-by: vignesh babu <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
---
 drivers/scsi/ch.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c
index 2a2cc6c..2311019 100644
--- a/drivers/scsi/ch.c
+++ b/drivers/scsi/ch.c
@@ -319,10 +319,9 @@ ch_readconfig(scsi_changer *ch)
        int     result,id,lun,i;
        u_int   elem;
 
-       buffer = kmalloc(512, GFP_KERNEL | GFP_DMA);
+       buffer = kzalloc(512, GFP_KERNEL | GFP_DMA);
        if (!buffer)
                return -ENOMEM;
-       memset(buffer,0,512);
        
        memset(cmd,0,sizeof(cmd));
        cmd[0] = MODE_SENSE;
@@ -530,10 +529,9 @@ ch_set_voltag(scsi_changer *ch, u_int elem,
        u_char  *buffer;
        int result;
 
-       buffer = kmalloc(512, GFP_KERNEL);
+       buffer = kzalloc(512, GFP_KERNEL);
        if (!buffer)
                return -ENOMEM;
-       memset(buffer,0,512);
 
        dprintk("%s %s voltag: 0x%x => \"%s\"\n",
                clear     ? "clear"     : "set",
@@ -922,11 +920,10 @@ static int ch_probe(struct device *dev)
        if (sd->type != TYPE_MEDIUM_CHANGER)
                return -ENODEV;
     
-       ch = kmalloc(sizeof(*ch), GFP_KERNEL);
+       ch = kzalloc(sizeof(*ch), GFP_KERNEL);
        if (NULL == ch)
                return -ENOMEM;
 
-       memset(ch,0,sizeof(*ch));
        ch->minor = ch_devcount;
        sprintf(ch->name,"ch%d",ch->minor);
        mutex_init(&ch->lock);
-
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