[PATCH 17] drivers/md/dm-path-selector.c: kmalloc + memset conversion to kzalloc
- From: Mariusz Kozlowski <m.kozlowski@xxxxxxxxxx>
- Date: Tue, 31 Jul 2007 19:25:26 +0200
Signed-off-by: Mariusz Kozlowski <m.kozlowski@xxxxxxxxxx>
drivers/md/dm-path-selector.c | 2666 -> 2636 (-30 bytes)
drivers/md/dm-path-selector.o | 101207 -> 101031 (-176 bytes)
drivers/md/dm-path-selector.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/md/dm-path-selector.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/md/dm-path-selector.c 2007-07-31 11:26:53.000000000 +0200
@@ -94,12 +94,11 @@ out:
static struct ps_internal *_alloc_path_selector(struct path_selector_type *pst)
{
- struct ps_internal *psi = kmalloc(sizeof(*psi), GFP_KERNEL);
-
- if (psi) {
- memset(psi, 0, sizeof(*psi));
+ struct ps_internal *psi;
+
+ psi = kzalloc(sizeof(*psi), GFP_KERNEL);
+ if (psi)
psi->pst = *pst;
- }
return psi;
}
-
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: Re: [PATCH] argv_split: allow argv_split to handle NULL pointer in argcp parameter gracefully
- Next by Date: [PATCH 18] drivers/md/dm-table.c: kmalloc + memset conversion to kzalloc
- Previous by thread: [PATCH 16] drivers/md/dm-hw-handler.c: kmalloc + memset conversion to kzalloc
- Next by thread: [PATCH 18] drivers/md/dm-table.c: kmalloc + memset conversion to kzalloc
- Index(es):