include/asm-avr32/pgalloc.h: kmalloc + memset conversion to kcalloc
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>
Tue, 31 Jul 2007 21:41:00 +0000 (23:41 +0200)
committerHaavard Skinnemoen <hskinnemoen@atmel.com>
Wed, 15 Aug 2007 14:36:56 +0000 (16:36 +0200)
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
include/asm-avr32/pgalloc.h

index bb82e70cde8d048fb01c3594b0233ba8c9d83fbd..75248141c6137212893aafcc669e1bbd44e2100d 100644 (file)
@@ -27,13 +27,7 @@ static __inline__ void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
  */
 static __inline__ pgd_t *pgd_alloc(struct mm_struct *mm)
 {
-       unsigned int pgd_size = (USER_PTRS_PER_PGD * sizeof(pgd_t));
-       pgd_t *pgd = kmalloc(pgd_size, GFP_KERNEL);
-
-       if (pgd)
-               memset(pgd, 0, pgd_size);
-
-       return pgd;
+       return kcalloc(USER_PTRS_PER_PGD, sizeof(pgd_t), GFP_KERNEL);
 }
 
 static inline void pgd_free(pgd_t *pgd)