[PATCH 78] fs/proc/vmcore.c: kmalloc + memset conversion to kzalloc

From: Mariusz Kozlowski
Date: Tue Jul 31 2007 - 18:15:17 EST


Signed-off-by: Mariusz Kozlowski <m.kozlowski@xxxxxxxxxx>

fs/proc/vmcore.c | 16780 -> 16727 (-53 bytes)
fs/proc/vmcore.o | 113032 -> 112744 (-288 bytes)

fs/proc/vmcore.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

--- linux-2.6.23-rc1-mm1-a/fs/proc/vmcore.c 2007-07-26 13:07:46.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/fs/proc/vmcore.c 2007-07-31 15:51:05.000000000 +0200
@@ -178,12 +178,7 @@ const struct file_operations proc_vmcore

static struct vmcore* __init get_new_element(void)
{
- struct vmcore *p;
-
- p = kmalloc(sizeof(*p), GFP_KERNEL);
- if (p)
- memset(p, 0, sizeof(*p));
- return p;
+ return kzalloc(sizeof(struct vmcore), GFP_KERNEL);
}

static u64 __init get_vmcore_size_elf64(char *elfptr)
-
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/