[PATCH 16] drivers/md/dm-hw-handler.c: kmalloc + memset conversion to kzalloc
- From: Mariusz Kozlowski <m.kozlowski@xxxxxxxxxx>
- Date: Tue, 31 Jul 2007 19:23:36 +0200
Signed-off-by: Mariusz Kozlowski <m.kozlowski@xxxxxxxxxx>
drivers/md/dm-hw-handler.c | 4424 -> 4393 (-31 bytes)
drivers/md/dm-hw-handler.o | 101828 -> 101652 (-176 bytes)
drivers/md/dm-hw-handler.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/md/dm-hw-handler.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/md/dm-hw-handler.c 2007-07-31 11:28:10.000000000 +0200
@@ -91,12 +91,11 @@ void dm_put_hw_handler(struct hw_handler
static struct hwh_internal *_alloc_hw_handler(struct hw_handler_type *hwht)
{
- struct hwh_internal *hwhi = kmalloc(sizeof(*hwhi), GFP_KERNEL);
-
- if (hwhi) {
- memset(hwhi, 0, sizeof(*hwhi));
+ struct hwh_internal *hwhi;
+
+ hwhi = kzalloc(sizeof(*hwhi), GFP_KERNEL);
+ if (hwhi)
hwhi->hwht = *hwht;
- }
return hwhi;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc
- From: Mariusz Kozlowski
- [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc
- Prev by Date: [PATCH 15] kmalloc + memset conversion to kzalloc
- Next by Date: Re: [PATCH] argv_split: allow argv_split to handle NULL pointer in argcp parameter gracefully
- Previous by thread: [PATCH 15] kmalloc + memset conversion to kzalloc
- Next by thread: [PATCH 17] drivers/md/dm-path-selector.c: kmalloc + memset conversion to kzalloc
- Index(es):