The patch titled mtrr: replace kmalloc+memset with kzalloc has been added to the -mm tree. Its filename is mtrr-replace-kmallocmemset-with-kzalloc.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: mtrr: replace kmalloc+memset with kzalloc From: "Burman Yan" <yan_952@xxxxxxxxxxx> Cc: Andi Kleen <ak@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- arch/i386/kernel/cpu/mtrr/if.c | 3 +-- arch/i386/kernel/cpu/mtrr/main.c | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff -puN arch/i386/kernel/cpu/mtrr/if.c~mtrr-replace-kmallocmemset-with-kzalloc arch/i386/kernel/cpu/mtrr/if.c --- a/arch/i386/kernel/cpu/mtrr/if.c~mtrr-replace-kmallocmemset-with-kzalloc +++ a/arch/i386/kernel/cpu/mtrr/if.c @@ -44,10 +44,9 @@ mtrr_file_add(unsigned long base, unsign max = num_var_ranges; if (fcount == NULL) { - fcount = kmalloc(max * sizeof *fcount, GFP_KERNEL); + fcount = kzalloc(max * sizeof *fcount, GFP_KERNEL); if (!fcount) return -ENOMEM; - memset(fcount, 0, max * sizeof *fcount); FILE_FCOUNT(file) = fcount; } if (!page) { diff -puN arch/i386/kernel/cpu/mtrr/main.c~mtrr-replace-kmallocmemset-with-kzalloc arch/i386/kernel/cpu/mtrr/main.c --- a/arch/i386/kernel/cpu/mtrr/main.c~mtrr-replace-kmallocmemset-with-kzalloc +++ a/arch/i386/kernel/cpu/mtrr/main.c @@ -596,10 +596,8 @@ static int mtrr_save(struct sys_device * int i; int size = num_var_ranges * sizeof(struct mtrr_value); - mtrr_state = kmalloc(size,GFP_ATOMIC); - if (mtrr_state) - memset(mtrr_state,0,size); - else + mtrr_state = kzalloc(size,GFP_ATOMIC); + if (!mtrr_state) return -ENOMEM; for (i = 0; i < num_var_ranges; i++) { _ Patches currently in -mm which might be from yan_952@xxxxxxxxxxx are acpi-replace-kmallocmemset-with-kzalloc.patch mtd-replace-kmallocmemset-with-kzalloc.patch mtrr-replace-kmallocmemset-with-kzalloc.patch isdn-replace-kmallocmemset-with-kzalloc.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html