mtd: tests: consolidate kmalloc/memset 0 call to kzalloc
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Tue Jan 12 15:59:29 PST 2016
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=6e75632ac34d2f63ab586880f7e9747bd9b708a6
Commit: 6e75632ac34d2f63ab586880f7e9747bd9b708a6
Parent: 43584c1d42acf54464907773b0b8b7596d7b0a29
Author: Nicholas Mc Guire <hofrat at osadl.org>
AuthorDate: Thu Dec 31 16:21:22 2015 +0100
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed Jan 6 15:17:42 2016 -0800
mtd: tests: consolidate kmalloc/memset 0 call to kzalloc
This is an API consolidation only. The use of kmalloc + memset to 0
is equivalent to kzalloc.
Signed-off-by: Nicholas Mc Guire <hofrat at osadl.org>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/tests/pagetest.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mtd/tests/pagetest.c b/drivers/mtd/tests/pagetest.c
index ba1890d..ff1e056 100644
--- a/drivers/mtd/tests/pagetest.c
+++ b/drivers/mtd/tests/pagetest.c
@@ -127,13 +127,12 @@ static int crosstest(void)
unsigned char *pp1, *pp2, *pp3, *pp4;
pr_info("crosstest\n");
- pp1 = kmalloc(pgsize * 4, GFP_KERNEL);
+ pp1 = kzalloc(pgsize * 4, GFP_KERNEL);
if (!pp1)
return -ENOMEM;
pp2 = pp1 + pgsize;
pp3 = pp2 + pgsize;
pp4 = pp3 + pgsize;
- memset(pp1, 0, pgsize * 4);
addr0 = 0;
for (i = 0; i < ebcnt && bbt[i]; ++i)
More information about the linux-mtd-cvs
mailing list