]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
x86: Convert vmalloc()+memset() to vzalloc()
authorJoe Perches <joe@perches.com>
Sat, 28 May 2011 17:36:22 +0000 (10:36 -0700)
committerIngo Molnar <mingo@elte.hu>
Sat, 28 May 2011 17:53:57 +0000 (19:53 +0200)
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>
arch/x86/mm/pageattr-test.c

index e1d106909218681f35cd4e736987ce017a7de798..b0086567271c9956b2196e3ba302e4a77009e811 100644 (file)
@@ -123,12 +123,11 @@ static int pageattr_test(void)
        if (print)
                printk(KERN_INFO "CPA self-test:\n");
 
        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;
        }
        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);
 
        failed += print_split(&sa);
        srandom32(100);