lkml.org 
[lkml]   [2007]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 19] drivers/md/dm-target.c: kmalloc + memset conversion to kzalloc
Date
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

drivers/md/dm-target.c | 3300 -> 3271 (-29 bytes)
drivers/md/dm-target.o | 105641 -> 105449 (-192 bytes)

drivers/md/dm-target.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

--- linux-2.6.23-rc1-mm1-a/drivers/md/dm-target.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/md/dm-target.c 2007-07-31 11:26:04.000000000 +0200
@@ -88,12 +88,11 @@ void dm_put_target_type(struct target_ty

static struct tt_internal *alloc_target(struct target_type *t)
{
- struct tt_internal *ti = kmalloc(sizeof(*ti), GFP_KERNEL);
-
- if (ti) {
- memset(ti, 0, sizeof(*ti));
+ struct tt_internal *ti;
+
+ ti = kzalloc(sizeof(*ti), GFP_KERNEL);
+ if (ti)
ti->tt = *t;
- }

return ti;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-07-31 19:33    [W:0.341 / U:46.508 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site