public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 20/30] drivers/scsi/gdth.c: kmalloc + memset conversion to kzalloc
@ 2007-08-10 21:50 akpm
  2007-08-11  1:00 ` James Bottomley
  0 siblings, 1 reply; 4+ messages in thread
From: akpm @ 2007-08-10 21:50 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, akpm, m.kozlowski

From: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

 drivers/scsi/gdth.c | 189401 -> 189342 (-59 bytes)
 drivers/scsi/gdth.o | 331028 -> 330324 (-704 bytes)

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/scsi/gdth.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN drivers/scsi/gdth.c~drivers-scsi-gdthc-kmalloc-memset-conversion-to-kzalloc drivers/scsi/gdth.c
--- a/drivers/scsi/gdth.c~drivers-scsi-gdthc-kmalloc-memset-conversion-to-kzalloc
+++ a/drivers/scsi/gdth.c
@@ -726,10 +726,10 @@ int __gdth_execute(struct scsi_device *s
     DECLARE_COMPLETION_ONSTACK(wait);
     int rval;
 
-    scp = kmalloc(sizeof(*scp), GFP_KERNEL);
+    scp = kzalloc(sizeof(*scp), GFP_KERNEL);
     if (!scp)
         return -ENOMEM;
-    memset(scp, 0, sizeof(*scp));
+
     scp->device = sdev;
     /* use request field to save the ptr. to completion struct. */
     scp->request = (struct request *)&wait;
_

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-11 16:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-10 21:50 [patch 20/30] drivers/scsi/gdth.c: kmalloc + memset conversion to kzalloc akpm
2007-08-11  1:00 ` James Bottomley
2007-08-11  8:13   ` Mariusz Kozlowski
2007-08-11 16:26     ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox