[RFC PATCH 0/8] mtd_tests: Remove duplicate code and cleanups

Vikram Narayanan vikram186 at gmail.com
Tue Oct 2 10:26:13 EDT 2012


Cc: Artem Bityutskiy <dedekind1 at gmail.com>
Cc: Brian Norris <computersforpeace at gmail.com>
Cc: Adrian Hunter <ext-adrian.hunter at nokia.com>
Cc: Iwo Mergler <Iwo.Mergler at netcommwireless.com.au>

This RFC patchset moves some common code in all the tests to a common header
file. Also, all the printk,PRINT_PREF are replaced with pr_info style prints.
This way duplicates are eliminated and the code looks clean.

I deliberately missed out the mtd_oobtest as Brian Norris has already sent a
patch for that.

All the patches are compile tested and checkpatch clean(No checkpatch warnings
are introduced by the code that is added in this patch).

Vikram Narayanan(8):
  mtd_tests: Refactor duplicate code
  mtd_pagetest: Replace printk with pr_{info,crit}
  mtd_torturetest: Replace printk with pr_{info,crit}
  mtd_subpagetest: Replace printk with pr_info
  mtd_stresstest: Replace printk with pr_{info,crit}
  mtd_speedtest: Replace printk with pr_{info,crit}
  mtd_readtest: Replace printk with pr_info
  mtd_nandbiterrs: Replace msg macro with pr_info

 drivers/mtd/tests/mtd_nandbiterrs.c |   97 +++++++-----------
 drivers/mtd/tests/mtd_oobtest.c     |   31 +-----
 drivers/mtd/tests/mtd_pagetest.c    |  191 +++++++++++++++--------------------
 drivers/mtd/tests/mtd_readtest.c    |   42 ++++----
 drivers/mtd/tests/mtd_speedtest.c   |  140 ++++++++------------------
 drivers/mtd/tests/mtd_stresstest.c  |   71 ++++---------
 drivers/mtd/tests/mtd_subpagetest.c |  147 +++++++++++----------------
 drivers/mtd/tests/mtd_tests.h       |   60 +++++++++++
 drivers/mtd/tests/mtd_torturetest.c |  104 +++++++------------
 9 files changed, 370 insertions(+), 513 deletions(-)



More information about the linux-mtd mailing list