Commit 5221b34e authored by Mariusz Kozlowski's avatar Mariusz Kozlowski Committed by Haavard Skinnemoen

include/asm-avr32/pgalloc.h: kmalloc + memset conversion to kcalloc

Signed-off-by: default avatarMariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: default avatarHaavard Skinnemoen <hskinnemoen@atmel.com>
parent 54bb69e2
...@@ -27,13 +27,7 @@ static __inline__ void pmd_populate(struct mm_struct *mm, pmd_t *pmd, ...@@ -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) static __inline__ pgd_t *pgd_alloc(struct mm_struct *mm)
{ {
unsigned int pgd_size = (USER_PTRS_PER_PGD * sizeof(pgd_t)); return kcalloc(USER_PTRS_PER_PGD, sizeof(pgd_t), GFP_KERNEL);
pgd_t *pgd = kmalloc(pgd_size, GFP_KERNEL);
if (pgd)
memset(pgd, 0, pgd_size);
return pgd;
} }
static inline void pgd_free(pgd_t *pgd) static inline void pgd_free(pgd_t *pgd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment