lkml.org 
[lkml]   [2007]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 62] include/asm-avr32/pgalloc.h: kmalloc + memset conversion to kcalloc
Date
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

include/asm-avr32/pgalloc.h | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

--- linux-2.6.23-rc1-mm1-a/include/asm-avr32/pgalloc.h 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/include/asm-avr32/pgalloc.h 2007-07-31 15:05:25.000000000 +0200
@@ -27,13 +27,7 @@ static __inline__ void pmd_populate(stru
*/
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)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-07-31 23:43    [W:2.104 / U:0.832 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site