Skip to content

Commit

Permalink
x86: Convert vmalloc()+memset() to vzalloc()
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Jiri Kosina <trivial@kernel.org>
Link: http://lkml.kernel.org/r/10e35243fda0b8739c89ac32a7bdf348ec4752e1.1306603968.git.joe@perches.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Joe Perches authored and Ingo Molnar committed May 28, 2011
1 parent 29a6ccc commit c4d017f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/x86/mm/pageattr-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,11 @@ static int pageattr_test(void)
if (print)
printk(KERN_INFO "CPA self-test:\n");

bm = vmalloc((max_pfn_mapped + 7) / 8);
bm = vzalloc((max_pfn_mapped + 7) / 8);
if (!bm) {
printk(KERN_ERR "CPA Cannot vmalloc bitmap\n");
return -ENOMEM;
}
memset(bm, 0, (max_pfn_mapped + 7) / 8);

failed += print_split(&sa);
srandom32(100);
Expand Down

0 comments on commit c4d017f

Please sign in to comment.