mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
include/asm-avr32/pgalloc.h: kmalloc + memset conversion to kcalloc
Signed-off-by: Mariusz Kozlowski <[email protected]> Signed-off-by: Haavard Skinnemoen <[email protected]>
This commit is contained in:
parent
54bb69e250
commit
5221b34edf
1 changed files with 1 additions and 7 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue